LKML Archive on
help / color / mirror / Atom feed
From: Dmitry Torokhov <>
To: Andreas Schwab <>
Cc: Geert Uytterhoeven <>,
	Rusty Russell <>,
	"" <>,
	Linux/m68k <>,
	Linux-Arch <>
Subject: Re: Early crash (was: Re: module: show version information for built-in modules in sysfs)
Date: Wed, 2 Feb 2011 16:24:59 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <m2bp2udllv.fsf@igel.home>

On Wed, Feb 02, 2011 at 04:10:04PM -0800, Andreas Schwab wrote:
> Dmitry Torokhov <> 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

    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.


  reply	other threads:[~2011-02-03  0:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 20:33 Geert Uytterhoeven
2011-02-01 21:09 ` Dmitry Torokhov
2011-02-01 22:03   ` Geert Uytterhoeven
2011-02-01 22:26     ` Dmitry Torokhov
2011-02-02 14:48       ` Geert Uytterhoeven
2011-02-02 19:42         ` Dmitry Torokhov
2011-02-02 22:52           ` Andreas Schwab
2011-02-02 23:59             ` Dmitry Torokhov
2011-02-03  0:10               ` Andreas Schwab
2011-02-03  0:24                 ` Dmitry Torokhov [this message]
2011-02-03 17:38                   ` Andreas Schwab
2011-02-07  8:19                   ` Dmitry Torokhov
2011-02-07  8:50                     ` Early crash David Miller
2011-02-07 16:58                       ` Dmitry Torokhov
2011-02-07 19:27                         ` David Miller
2011-02-07 19:28                           ` Dmitry Torokhov
2011-02-08  3:12                           ` Rusty Russell
2011-02-08  3:31                             ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: Early crash (was: Re: module: show version information for built-in modules in sysfs)' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).