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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 3 Aug 2008 23:24:21 -0400
From:	"Mike Frysinger" <vapier.adi@...il.com>
To:	"Paul Mundt" <lethal@...ux-sh.org>,
	"Wu, Bryan" <Bryan.Wu@...log.com>
Cc:	"David Howells" <dhowells@...hat.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] binfmt_elf_fdpic: Convert initial stack alignment to arch_align_stack().

On Fri, Aug 1, 2008 at 5:44 PM, Paul Mundt wrote:
> On Fri, Aug 01, 2008 at 03:01:19PM +0100, David Howells wrote:
>> Paul Mundt <lethal@...ux-sh.org> wrote:
>> > +    * In some cases (e.g. Hyper-Threading), we want to avoid L1
>> > +    * evictions by the processes running on the same package. One
>> > +    * thing we can do is to shuffle the initial stack for them, so
>> > +    * we give the architecture an opportunity to do so here.
>> > +    */
>> >  #ifdef CONFIG_MMU
>> > -   sp = bprm->p;
>> > +   sp = arch_align_stack(bprm->p);
>> >  #else
>> > -   sp = mm->start_stack;
>> > +   sp = arch_align_stack(mm->start_stack);
>>
>> Ummm...  You're calling arch_align_stack() under NOMMU...  Is that really a
>> good idea?
>
> Not particularly, no.
>
>> You can't necessarily move the stack pointer without exiting the allocated
>> region or shrinking the amount of stack space the executable asked for.  If
>> you want to do this sort of thing, you need to tell the memory allocator what
>> you're up to - or at the very least allocate some slack.
>
> Yes, that's a good point, and one that probably ought to be documented
> alongside the initial alignment. I'll send an updated patch.

fs/binfmt_elf_fdpic.c: In function 'create_elf_fdpic_tables':
fs/binfmt_elf_fdpic.c:497: error: implicit declaration of function
'arch_align_stack'
make[1]: *** [fs/binfmt_elf_fdpic.o] Error 1
make: *** [fs] Error 2

Blackfin lacks a arch_align_stack(x) in asm-blackfin/system.h ... i
imagine a stub will work for us like every other arch though

feel like doing that Bryan ?  i'm guessing Paul doesnt want to ... ;)
-mike
--
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