delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/04/14:28:06

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
X-Mail-Handler: MailHop Outbound by DynDNS
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+79ayms+ob1ARvvHKmE45z
Date: Sun, 4 Dec 2011 14:27:41 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: gnome-keyring bug in snapshots
Message-ID: <20111204192741.GA21203@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAGvSfew2TFPGwp=Kq_bkJ0891+vJiAueAd1H+K_SHNimMw0y1Q AT mail DOT gmail DOT com> <20111203184459 DOT GA21371 AT ednor DOT casa DOT cgf DOT cx> <20111203213047 DOT GA24925 AT ednor DOT casa DOT cgf DOT cx> <20111203230408 DOT GC12518 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20111203230408.GC12518@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019