LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@vmware.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux/m68k <linux-m68k@vger.kernel.org>,
	Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: Early crash (was: Re: module: show version information for built-in modules in sysfs)
Date: Wed, 2 Feb 2011 15:59:49 -0800	[thread overview]
Message-ID: <20110202235948.GA8676@dtor-ws.eng.vmware.com> (raw)
In-Reply-To: <m2ipx2dp7v.fsf@igel.home>

On Wed, Feb 02, 2011 at 02:52:04PM -0800, Andreas Schwab wrote:
> Dmitry Torokhov <dtor@vmware.com> writes:
> 
> > But why is it aligned on 2-byte boundary and why m64k is not happy with
> > module_version_attribute but is happy with kernel_param which is also
> > aligned similarly?
> 
> struct kernel_parm doesn't contain internal padding on 32 bit
> architectures (it does on 64bit architectures though).
> 
> > If we unroll module_version_attribute it woud look like this:
> >
> > struct module_version_attribute {
> >
> > 	struct module_attribute {
> >
> > 		struct attribute {
> > 			const char *name;
> > 			mode_t mode;
> > 		} attr;
> > 		...
> >
> > 	} mattr;
> >
> > 	const char *module_name;
> > 	const char *version;
> > };
> >
> > So I would expect it be aligned on (char *) boundary which should be the
> > same as (void *).
> 
> mode_t is a 16 bit type, thus any following member becomes aligned on an
> odd 2 byte boundary.

Even pointers? I'd expect pointers to be aligned on 4-bytes boundaries?

Thanks,

Dmitry

  reply	other threads:[~2011-02-02 23:59 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 [this message]
2011-02-03  0:10               ` Andreas Schwab
2011-02-03  0:24                 ` Dmitry Torokhov
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20110202235948.GA8676@dtor-ws.eng.vmware.com \
    --to=dtor@vmware.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=schwab@linux-m68k.org \
    --subject='Re: Early crash (was: Re: module: show version information for built-in modules in sysfs)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).