LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@vmware.com>
To: David Miller <davem@davemloft.net>
Cc: "schwab@linux-m68k.org" <schwab@linux-m68k.org>,
"geert@linux-m68k.org" <geert@linux-m68k.org>,
"rusty@rustcorp.com.au" <rusty@rustcorp.com.au>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-m68k@vger.kernel.org" <linux-m68k@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Subject: Re: Early crash
Date: Mon, 7 Feb 2011 08:58:29 -0800 [thread overview]
Message-ID: <20110207165829.GA13101@dtor-ws.eng.vmware.com> (raw)
In-Reply-To: <20110207.005010.28814928.davem@davemloft.net>
On Mon, Feb 07, 2011 at 12:50:10AM -0800, David Miller wrote:
> From: Dmitry Torokhov <dtor@vmware.com>
> Date: Mon, 7 Feb 2011 00:19:33 -0800
>
> > So here is the patch that explicitly specifies alignment for struct
> > module_version_attribute. I tested it on i386 and x86_64 and I believe
> > it will fix the issue with m68k but I do not have access to such a box.
>
> While this may or may not fix the m68k issue, this isn't really
> sufficient to make this thing work in all cases. And the older
> tracepoint commits referenced in this thread are known to cause
> problems with platforms such as sparc64.
>
> You can't reliably put structures into independent objects, put them
> into a special section, and then expect array access over them (via
> the section boundaries) after linking the objects together to just
> "work".
>
> Your attribute specification is only a lower-bound.
Right.
>
> GCC can and does use variable alignment choices in different situations,
> so the align directive in the various objects can all be different. So
> the array iteration will assume the iterations should use one object
> size, but within the linked together section the alignments are all
> different so the inter-struct gap is different.
>
> The only portable mechanism that will work in all cases, as we've
> found recently for tracepoints and similar, is to make an array of
> plain pointers to the objects in the special section.
But, theoretically speaking, nothing stops GCC to align pointers with
"gaps" as well? Let's say having everything (or some) aligned on
quadword boundary even though arch is 32 bit?
Thanks,
Dmitry
next prev parent reply other threads:[~2011-02-07 16:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 20:33 Early crash (was: Re: module: show version information for built-in modules in sysfs) 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
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 [this message]
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=20110207165829.GA13101@dtor-ws.eng.vmware.com \
--to=dtor@vmware.com \
--cc=davem@davemloft.net \
--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' \
/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).