Re: [patch] flexible-mmap-2.6.7-D5

From: Ingo Molnar
Date: Sat Jun 19 2004 - 03:20:21 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> - i also introduced a new personality bit (ADDR_COMPAT_LAYOUT) to signal
> older binaries that dont have PT_GNU_STACK. x86 uses this to revert
> back to the stock layout. [...]

i've also attached a patch below against setarch that adds the -L option
which turns on the old layout. Thus if there's any old broken app that
relies on mmap()s being below 2GB then the following can be used:

setarch -L oldapp <params>

and 'oldapp' (and all its children) will run with the old layout. But
this should be an extremely rare occurance, i've added it more for
completeness and paranoia reasons than necessity.

Ingo

--- setarch-1.4/setarch.c.orig
+++ setarch-1.4/setarch.c
@@ -118,6 +118,15 @@ int main(int argc, char *argv[])
if(got_arch)
p = argv[0];
}
+ if(!strcmp(p, "-L"))
+ {
+ argv++;
+ argc--;
+ options |= 0x0200000 /* ADDR_COMPAT_LAYOUT */;
+ if(got_arch)
+ p = argv[0];
+ }
+

if(set_arch(p, options))
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/