[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXFa==KmSseWD1WK=uHW9BOTF0fDOUX0txsMKZzHqCfE+g@mail.gmail.com>
Date: Tue, 18 Feb 2025 20:36:42 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org, x86@...nel.org,
Huacai Chen <chenhuacai@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Tiezhu Yang <yangtiezhu@...ngson.cn>
Subject: Re: [PATCH] objtool: Use idiomatic section name for relocatable
rodata under PIE
On Tue, 18 Feb 2025 at 19:31, Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> On Tue, Feb 18, 2025 at 06:44:23PM +0100, Ard Biesheuvel wrote:
> > > If I understand correctly, this is fixing an existing bug in loongarch
> > > and any other arches using PIE, right?
> >
> > There are no other arches using PIE as far as I know. But it indeed
> > fixes an oversight in how -fPIE is used in the kernel.
> >
> > > And it has nothing to do with
> > > objtool?
> > >
> >
> > That didn't stop you from taking the previous fix :-)
>
> The whole point of the previous fix was to fix a bug in the objtool
> annotations. Unlike your patch, it didn't have any intended side
> effects.
>
Right, I skimmed over the missing ORC bit - I thought it was working
around a linker warning.
> > > If so, it feels like this needs to be its own patch, described as a fix.
> > >
> >
> > Fair enough. But better to drop the previous patch from the objtool tree then.
>
> I think we can do that... Peter?
>
> And just to be clear, you'll have two fixes, right?
>
> 1) Make loongarch .data.rel.ro.* actually read-only
> 2) Fix objtool C jump table annotations for clang
>
One fix is to emit .data.rel.ro input sections into .rodata, and fix
objtool accordingly so it also looks for jump tables there.
The other is to emit the BPF jump table into .data.rel.ro.c_jump_table
so that the linker does not complain about conflicting permissions.
Does that sound about right?
Powered by blists - more mailing lists