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: <AANLkTimnerGW-qsZNKINW5GmTdMCpT39RmhcWH5Br-iX@mail.gmail.com>
Date:	Wed, 26 May 2010 03:36:08 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	Paul Mundt <lethal@...ux-sh.org>
Cc:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Jie Zhang <jie@...esourcery.com>, uclinux-dev@...inux.org,
	David Howells <dhowells@...hat.com>,
	David McCullough <davidm@...pgear.com>,
	Greg Ungerer <gerg@...inux.org>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	microblaze-uclinux@...e.uq.edu.au, Michal Simek <monstr@...str.eu>,
	linux-m32r@...linux-m32r.org,
	Hirokazu Takata <takata@...ux-m32r.org>,
	linux-kernel@...r.kernel.org,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>
Subject: Re: [PATCH] FLAT: allow arches to declare a larger alignment than the 
	slab

On Wed, May 26, 2010 at 03:33, Paul Mundt wrote:
> On Wed, May 26, 2010 at 03:23:02AM -0400, Mike Frysinger wrote:
>> On Wed, May 26, 2010 at 02:59, Geert Uytterhoeven wrote:
>> > From looking at <linux/flat.h>, it looks like the FLAT binary format
>> > doesn't contain any
>> > alignment information? So if I put __attribute__((aligned(4096))) in a
>> > file, there's still
>> > no guarantee it will actually be in memory at a 4Ki-aligned address?
>>
>> i believe that is correct.  FLAT behavior today provides alignment of
>> either sizeof(unsigned long) or ARCH_SLAB_MINALIGN.
>>
>> i imagine something like this would work today because everyone
>> defines it to a constant:
>> -#ifdef ARCH_SLAB_MINALIGN
>> +#if defined(ARCH_SLAB_MINALIGN) && ARCH_SLAB_MINALIGN != 0
>> but this would break if someone tried using gcc sizeof/alignof/etc...
>
> alignof is used by SLUB/SLOB to set the ARCH_SLAB_MINALIGN value if the
> architecture hasn't already specified one, so that wouldn't work.

sorry, the implied file here is the FLAT loader, not some other
header.  and the FLAT loader either uses the define directly in its
math, or uses the ALIGN() macro.  so alignof shouldnt matter.
-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