public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: gnome-keyring bug in snapshots
Date: Sun, 04 Dec 2011 19:27:00 -0000	[thread overview]
Message-ID: <20111204192741.GA21203@ednor.casa.cgf.cx> (raw)
In-Reply-To: <20111203230408.GC12518@calimero.vinschen.de>

On Sun, Dec 04, 2011 at 12:04:08AM +0100, Corinna Vinschen wrote:
>On Dec  3 16:30, Christopher Faylor wrote:
>> On Sat, Dec 03, 2011 at 01:44:59PM -0500, Christopher Faylor wrote:
>> >On Tue, Nov 29, 2011 at 09:19:10PM -0600, Yaakov (Cygwin/X) wrote:
>> >>For some time now, snapshots have displayed a bug wrt gnome-keyring,
>> >>namely that passwords don't "register" when entered.  This wreaks
>> >>havoc on the GNOME desktop where so many programs rely on
>> >>gnome-keyring.
>> >>[...]
>> According to strace, the "couldn't allocate secure memory..." messages
>> seems to be caused by this:
>> 
>> gnome-keyring-daemon 3820 seterrno_from_nt_status: /cygnus/src/uberbaum/winsup/cygwin/mmap.cc:1399 status 0xC0000061
>> 
>> That is coming from mlock() which hasn't changed in months.
>> 
>> The status above translates to: STATUS_PRIVILEGE_NOT_HELD and that is
>> coming from NtLockVirtualMemory() .
>> 
>> Yaakov or Corinna does any of the above mean anything to you?
>
>As documented in mmap.cc, mlock functionality requires the SE_LOCK_MEMORY
>privilege which only the SYSTEM account holds by default.  Mlock is
>unchanged since it has been introduced in 2005.
>
>Having said that, after searching the net for a while I found out that
>the privilege requirement is excessive.  In 2005 I stumbled over the
>wrong interpretation of what the VirtualLock function is doing.  Not
>even Microsoft guys are immune to that(*), apparently.
>
>I dropped the requirement for the SE_LOCK_MEMORY privilege in CVS so
>every process should be able to call mlock successfully now.

Thanks.  As you surmised this had nothing to do with the problem.  It
apparently just a random error in a log file from gnome-keyring-daemon.

The real problem seemed to be a change introduced after 1.7.9 which
subtly broke the handling of signals during I/O.  That should be fixed
in the latest snapshot but, like so much of what I've worked on in Cygwin
lately, it touched a fundamental part of the code.  I wish I hadn't had
to make this change just before 1.7.10 but, in theory, it should make
it possible for a signal handler to be caught in a thread - that's a first
for Cygwin and it's something I've been meaning to get to for a while.

This isn't perfect though and I hope that doesn't mean that I've
introduced other corner case problems.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2011-12-04 19:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30  4:14 Yaakov (Cygwin/X)
2011-12-03 18:45 ` Christopher Faylor
2011-12-03 21:31   ` Christopher Faylor
2011-12-03 23:04     ` Corinna Vinschen
2011-12-04 19:27       ` Christopher Faylor [this message]
2011-12-05  2:03         ` Yaakov (Cygwin/X)
2011-12-05  5:02           ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111204192741.GA21203@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).