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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080813160218.GB18037@elte.hu>
Date:	Wed, 13 Aug 2008 18:02:18 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Ulrich Drepper <drepper@...hat.com>
Cc:	Arjan van de Ven <arjan@...radead.org>, akpm@...ux-foundation.org,
	hugh@...itas.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	briangrant@...gle.com, cgd@...gle.com, mbligh@...gle.com,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: pthread_create() slow for many threads; also time to revisit
	64b context switch optimization?


* Ulrich Drepper <drepper@...hat.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ingo Molnar wrote:
> > Btw., can you see any problems with option #1: simply removing MAP_32BIT 
> > from 64-bit stack allocations in glibc unconditionally?
> 
> Yes, as we both agree, there are still such machines out there.
> 
> The real problem is: what to do if somebody complains?  If we would 
> have the extra flag such people could be accommodated.  If there is no 
> such flag then distributions cannot just add the flag (it's part of 
> the kernel API) and they would be caught between a rock and a hard 
> place. Option #2 provides the biggest flexibility.
> 
> I upstream kernel truly doesn't care about such machines anymore there
> are two options:
> 
> - - really do nothing at all

do nothing at all is not an option - thread creation can take 10 msecs 
on top-of-the-line hardware.

> - - at least reserve a flag in case somebody wants/has to implement option
>   #2

yeah, i already had a patch for that when i wrote my first mail 
[attached below] and listed it as option #4 - then erased the comment 
figuring that we'd want to do #1 ;-)

As unimplemented flags just get ignored by the kernel, if this flag goes 
into v2.6.27 as-is and is ignored by the kernel (i.e. we just use a 
plain old 64-bit [47-bit] allocation), then you could do the glibc 
change straight away, correct? So then if people complain we can fix it 
in the kernel purely.

how about this then?

	Ingo

--------------------->
Subject: mmap: add MAP_64BIT_STACK
From: Ingo Molnar <mingo@...e.hu>
Date: Wed Aug 13 12:41:54 CEST 2008

Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 include/asm-x86/mman.h |    1 +
 1 file changed, 1 insertion(+)

Index: linux/include/asm-x86/mman.h
===================================================================
--- linux.orig/include/asm-x86/mman.h
+++ linux/include/asm-x86/mman.h
@@ -12,6 +12,7 @@
 #define MAP_NORESERVE	0x4000		/* don't check for reservations */
 #define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
 #define MAP_NONBLOCK	0x10000		/* do not block on IO */
+#define MAP_64BIT_STACK	0x20000		/* give out 32bit addresses on old CPUs */
 
 #define MCL_CURRENT	1		/* lock all current mappings */
 #define MCL_FUTURE	2		/* lock all future mappings */

--
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