[PATCH 1/5 V2] Align stack boundaries based on personality
Dave Hansen
dave at linux.vnet.ibm.com
Tue Jul 29 06:09:53 EST 2008
On Mon, 2008-07-28 at 12:17 -0700, Eric Munson wrote:
>
> +static unsigned long personality_page_align(unsigned long addr)
> +{
> + if (current->personality & HUGETLB_STACK)
> +#ifdef CONFIG_STACK_GROWSUP
> + return HPAGE_ALIGN(addr);
> +#else
> + return addr & HPAGE_MASK;
> +#endif
> +
> + return PAGE_ALIGN(addr);
> +}
...
> - stack_top = PAGE_ALIGN(stack_top);
> + stack_top = personality_page_align(stack_top);
Just out of curiosity, why doesn't the existing small-page case seem to
care about the stack growing up/down? Why do you need to care in the
large page case?
-- Dave
More information about the Linuxppc-dev
mailing list