[PATCH 1/2] mmap: decode MAP_UNINITIALIZE

Mike Frysinger vapier at gentoo.org
Tue Jan 22 21:58:11 UTC 2013


On Tuesday 22 January 2013 13:56:24 Dmitry V. Levin wrote:
> On Tue, Jan 22, 2013 at 01:10:13PM -0500, Mike Frysinger wrote:
> > On Tuesday 22 January 2013 04:16:42 Bernhard Reutner-Fischer wrote:
> > > On 21 January 2013 15:23, Dmitry V. Levin wrote:
> > > > On Mon, Jan 21, 2013 Bernhard Reutner-Fischer wrote:
> > > >> --- a/mem.c
> > > >> +++ b/mem.c
> > > >> 
> > > >> +#ifdef MAP_UNINITIALIZE
> > > >> +     { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"},
> > > >> +#endif
> > > > 
> > > > You mean MAP_UNINITIALIZED?
> > > 
> > > ugh, it seems that the name changed mid-flight :(
> > > So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'.
> > > Do you want me to resend this hunk with the D added or can you take
> > > care of this?
> > 
> > we named it MAP_UNINITIALIZE when we first implemented it on the Blackfin
> > side, but it was tweaked while getting merged to mainline linux.  we
> > forgot to update the uClibc side and no one noticed because userland
> > provides its own defines rather than including kernel headers :).
> 
> Shouldn't MAP_UNINITIALIZED be also added to glibc then?

in theory, yes, and someone will probably do it at some point as part of a 
general sync.  in practice, it doesn't really matter because the flag is only 
respected on nommu kernel builds (and only if you opted into it in your kernel 
build), and glibc cannot run under a nommu kernel.

i guess the only time it might matter is if you took a program compiled 
against uClibc for a nommu target (e.g. arm/nommu) and ran it under a kernel 
that had mmu support (e.g. arm/mmu) with a glibc userland.  but that seems 
pretty uncommon :).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20130122/076dc088/attachment.bin>


More information about the Strace-devel mailing list