lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 15 Jul 2006 04:45:45 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Arjan van de Ven <arjan@...radead.org>,
	Jakub Jelinek <jakub@...hat.com>,
	Ulrich Drepper <drepper@...hat.com>,
	Roland McGrath <roland@...hat.com>,
	"Randy.Dunlap" <rdunlap@...otime.net>, akpm@...l.org,
	linux-kernel@...r.kernel.org, libc-alpha@...rceware.org
Subject: Re: [PATCH] Use uname not sysctl to get the kernel revision

On Thu, 2006-07-13 at 00:07 +0100, Alan Cox wrote:
> Ar Mer, 2006-07-12 am 16:26 -0600, ysgrifennodd Eric W. Biederman:
> > If the lock is not short lived then the release is like to be a long
> > ways off.  If the lock is not highly contended then you are not likely
> > to hit the window when someone else as the contended lock.
> > 
> > How frequent are highly contended short lived locks in user space?
> 
> I'm not sure it matters.
> 
> If you want to do the job right then do this
> 
> - Stick an indicator of how much else wants to run on this CPU in the
> vsyscall page or similar location

Except that "this cpu" doesn't really mean anything in userspace, and
while I think Andi has some tricks to get some sort of CPU number to
userspace (though it's really only valid during the execution of the
instruction that reads it :) I haven't yet found an equivalent for
powerpc (and possibly other architectures will have the same problem).

> In your locks you can now do
> 
>               while(try_and_grab_lock() == FAILED) {
>                        if (kernelpage->waiting > 0)
>                               sys_somelockwaitthing()
>               }
> 
> Furthermore the kernel can be intelligent about the waiting indicator
> for power or other global scheduling reasons
> 
> [Disclaimer: There is a patent issue around this technique but its not
> one that will impact GPL code as permissions are given for GPL use.]
> 
> Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ