[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1179836645.7019.86.camel@twins>
Date: Tue, 22 May 2007 14:24:05 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Ollie Wild <aaw@...gle.com>, linux-kernel@...r.kernel.org,
parisc-linux@...ts.parisc-linux.org, linux-mm@...ck.org,
linux-arch@...r.kernel.org, Andrew Morton <akpm@...l.org>,
Ingo Molnar <mingo@...e.hu>, Andi Kleen <ak@...e.de>
Subject: RE: [patch] removes MAX_ARG_PAGES
On Mon, 2007-05-07 at 10:46 -0700, Luck, Tony wrote:
> > We've tested the following architectures: i386, x86_64, um/i386,
> > parisc, and frv. These are representative of the various scenarios
> > which this patch addresses, but other architecture teams should try it
> > out to make sure there aren't any unexpected gotchas.
>
> Doesn't build on ia64: complaints from arch/ia64/ia32/binfmt_elf.c
> (which #includes ../../../fs/binfmt_elf.c) ...
>
> arch/ia64/ia32/binfmt_elf32.c: In function `ia32_setup_arg_pages':
> arch/ia64/ia32/binfmt_elf32.c:206: error: `MAX_ARG_PAGES' undeclared (first use in this function)
> arch/ia64/ia32/binfmt_elf32.c:206: error: (Each undeclared identifier is reported only once
> arch/ia64/ia32/binfmt_elf32.c:206: error: for each function it appears in.)
> arch/ia64/ia32/binfmt_elf32.c:240: error: structure has no member named `page'
> arch/ia64/ia32/binfmt_elf32.c:242: error: structure has no member named `page'
> arch/ia64/ia32/binfmt_elf32.c:243: warning: implicit declaration of function `install_arg_page'
> make[1]: *** [arch/ia64/ia32/binfmt_elf32.o] Error 1
>
> Turning off CONFIG_IA32-SUPPORT, the kernel built, but oops'd during boot.
> My serial connection to my test machine is currently broken, so I didn't
> get a capture of the stack trace, sorry.
Ok, I found the problem. IA64 places constraints on virtual address
space. We initially place the stack at TASK_SIZE, and once the binfmt
tells us where it should have gone, we move it down to the new location.
However IA64 has v-space carved up in regions, and the top of the user
accessible address space is reserved for hugetlbfs.
So we should be using STACK_TOP, which provides the highest stack
address, however, some arches have conditions in the STACK_TOP macros
such that the result is not what is expected until the binfmt
personality is set.
In order to solve this, I added a STACK_TOP_MAX macro for each arch and
use that. This made IA64 boot properly.
The second patch makes the compat stuff compile, untested though, as I
have no idea how that works on ia64.
View attachment "stack_top_max.patch" of type "text/x-patch" (11839 bytes)
View attachment "setup_arg_pages.patch" of type "text/x-patch" (4762 bytes)
Powered by blists - more mailing lists