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]
Message-ID: <20090305084307.GB16451@linux-sh.org>
Date:	Thu, 5 Mar 2009 17:43:07 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Johannes Weiner <jw@...ix.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Russell King <rmk@....linux.org.uk>,
	Bryan Wu <cooloney@...nel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Greg Ungerer <gerg@...inux.org>, linux-kernel@...r.kernel.org
Subject: Re: [patch -v2] flat: fix data sections alignment

On Wed, Mar 04, 2009 at 02:51:17PM +0100, Johannes Weiner wrote:
> Paul, please note that on sh ARCH_SLAB_MINALIGN is defined to be 8
> while the userspace stack was aligned to 4 before.  I suppose aligning
> the stack (and data sections) to 8 as well is the right thing...?
> 
This is intentional. As I noted before, the ARCH_SLAB_MINALIGN on SH
refers specifically to SH-5 (or anything implementing a 32-bit sh64 ABI),
which presently does not support nommu, but could in theory. The SH parts
that do nommu today generally need ARCH_KMALLOC_MINALIGN, but do not have
the ARCH_SLAB_MINALIGN requirement that SH-5 does.

> --- a/fs/binfmt_flat.c
> +++ b/fs/binfmt_flat.c
> @@ -41,6 +41,7 @@
>  #include <asm/uaccess.h>
>  #include <asm/unaligned.h>
>  #include <asm/cacheflush.h>
> +#include <asm/page.h>
>  
>  /****************************************************************************/
>  
> @@ -54,6 +55,12 @@
>  #define	DBG_FLT(a...)
>  #endif
>  
> +#ifdef ARCH_SLAB_MINALIGN
> +#define FLAT_DATA_ALIGN	(ARCH_SLAB_MINALIGN)
> +#else
> +#define FLAT_DATA_ALIGN	(sizeof(void *))
> +#endif
> +
As it's not entirely obvious what this is used for outside of the slab
context, you will want to have a comment here explaining the situation,
and particularly what the implication for stack alignment is.
--
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