From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
mingo@elte.hu, tglx@linutronix.de, linux-arch@vger.kernel.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
hpa@zytor.com
Subject: Re: [PATCH] allow placing exception table in .rodata (and do so on x86)
Date: Thu, 28 Apr 2011 15:44:13 +0200 [thread overview]
Message-ID: <BANLkTinpjyKFMChWh5rVfRbpOsp6kGEXYw@mail.gmail.com> (raw)
In-Reply-To: <4DB98854020000780003EA4D@vpn.id2.novell.com>
On Thu, Apr 28, 2011 at 15:31, Jan Beulich <JBeulich@novell.com> wrote:
>>>> On 28.04.11 at 14:53, Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
>> On Thu, Apr 28, 2011 at 01:07:07PM +0100, Jan Beulich wrote:
>>> >>> On 28.04.11 at 13:47, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>> > On Thu, Apr 28, 2011 at 13:40, Jan Beulich <JBeulich@novell.com> wrote:
>>> >>>>> On 28.04.11 at 12:43, Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
>>> >>> On Wed, Apr 27, 2011 at 04:36:04PM +0100, Jan Beulich wrote:
>>> >>> That's odd. The kernel actually writes to it (sort_main_extable()), so
>>> >>> it shouldn't be in the ro data section, but the data section.
>>> >>
>>> >> This area does get written, but only at boot time, before read-only
>>> >> data gets set to r/o (on x86 at least). With this in mind, it's better
>>> >> to place it in .rodata, as that way run-time protection will be in place
>>> >> (and I think you agree that it was misplaced in .text in any case).
>>> >
>>> > Which means it may be in ROM (which is really read-only) on some embedded
>>> > devices, so it cannot be sorted?
>>>
>>> Perhaps - but since sorting is a requirement, people building such
>>> systems must have found a way... Anyway, I don't see where both
>>
>> Yes, we found a way on s390: we put the exception table in the data section.
>>
>>> your and Heiko's comment are heading, since the situation is even
>>> worse without the patch afaics (since .text gets marked read-only
>>> as much as .rodata does, and could equally be placed in ROM).
>>
>> My point is that your default is wrong. If it makes sense to put the extable
>> into the rodata section then an architecture could do so. However making the
>> default to put data into the rodata section that is actually written to is
>> the wrong approach.
>> It just asks for breakage.
>
> The patch doesn't make this the default - it just makes it possible
> for an architecture to do so.
"asm-generic" is the default for new architectures.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
prev parent reply other threads:[~2011-04-28 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 15:36 [PATCH] allow placing exception table in .rodata (and do so on x86) Jan Beulich
2011-04-28 10:43 ` Heiko Carstens
2011-04-28 11:40 ` Jan Beulich
2011-04-28 11:40 ` Jan Beulich
2011-04-28 11:47 ` Geert Uytterhoeven
2011-04-28 12:07 ` Jan Beulich
2011-04-28 12:53 ` Heiko Carstens
2011-04-28 12:53 ` Heiko Carstens
2011-04-28 13:31 ` Jan Beulich
2011-04-28 13:31 ` Jan Beulich
2011-04-28 13:44 ` Geert Uytterhoeven [this message]
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=BANLkTinpjyKFMChWh5rVfRbpOsp6kGEXYw@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=JBeulich@novell.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).