public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* arch_align_stack() seems useless
@ 2007-08-27 14:08 Franck Bui-Huu
  2007-08-27 14:14 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: Franck Bui-Huu @ 2007-08-27 14:08 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hello folks,

I recently pick up the implementation of arch_align_stack() from x86
architectures to make it available for mips.

But now I just realised that this function seems useless because of
the way it's used.

Currently, this function seems to be only used to randomize the stack
pointer inside a page during an execve() syscall. Only i386, x86_64
and recently mips do that. Here is the code taken from exec.c which
calls it:

	int setup_arg_pages(struct linux_binprm *bprm,
			    unsigned long stack_top,
			    int executable_stack)
	{
		[...]
	
		stack_top = arch_align_stack(stack_top);
		stack_top = PAGE_ALIGN(stack_top);
	
		[...]
	}

Since PAGE_ALIGN() is called right after arch_align_stack(), it seems
to me that the call to the latter function is useless...

Am I missing something ?

thanks

		Franck

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-30  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 14:08 arch_align_stack() seems useless Franck Bui-Huu
2007-08-27 14:14 ` Arjan van de Ven
2007-08-28 13:17   ` Franck Bui-Huu
2007-08-30  8:22     ` Franck Bui-Huu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox