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: <20110203002459.GA26729@dtor-ws.eng.vmware.com>
Date:	Wed, 2 Feb 2011 16:24:59 -0800
From:	Dmitry Torokhov <dtor@...are.com>
To:	Andreas Schwab <schwab@...ux-m68k.org>
Cc:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux/m68k <linux-m68k@...r.kernel.org>,
	Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: Early crash (was: Re: module: show version information for
 built-in modules in sysfs)

On Wed, Feb 02, 2011 at 04:10:04PM -0800, Andreas Schwab wrote:
> Dmitry Torokhov <dtor@...are.com> writes:
> 
> > Even pointers? I'd expect pointers to be aligned on 4-bytes boundaries?
> 
> Pointers are not special in any way.  Why should they?  On the machine
> level pointers are just numbers.

Are pointers (along with ints/longs) on m68k naturally aligned on word
boundary even though they are 32 bit?

Anyway, here is the description that introduced alignment statement:

commit 02dba5c6439cff34936460b95cd1ba42b370f345
Author: ak <ak>
Date:   Sat Jun 21 16:18:16 2003 +0000

    [PATCH] Fix over-alignment problem on x86-64

    Thanks to Jan Hubicka who suggested this fix.

    The problem seems to be that gcc generates a 32byte alignment for static
    objects > 32bytes.  This causes gas to set a high alignment on the
    section, which causes the uneven (not multiple of sizeof(struct
    kernel_param)) section size.  The pointer division with a base not being
    a multiple of sizeof(*ptr) then causes the invalid result.

    This just forces a small alignment, which makes the section end come out
    with the correct alignment.

    The only mystery left is why ld chose a 16 byte padding instead of
    32byte.

    BKrev: 3ef485487jZN-h3PtASDeL2Vs55NIg


I guess this does not directly apply to modversions since they are
currently under 32 bytes, but I wonder what happen if we decide to
extend one of the structures involved...

I guess explicitly setting alignment requirement for struct
module_version_attribute is the best option.

Thanks,
Dmitry


--
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