lkml.org 
[lkml]   [2026]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/48] objtool/klp: Don't correlate rodata symbols
On Fri, Apr 24, 2026 at 01:54:31PM +0200, Miroslav Benes wrote:
> On Wed, 22 Apr 2026 21:03:34 -0700, Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> > diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
> > index ea9ccf8c4ea9..f6597015b33b 100644
> > --- a/tools/objtool/klp-diff.c
> > +++ b/tools/objtool/klp-diff.c
> > @@ -374,6 +374,7 @@ static bool dont_correlate(struct symbol *sym)
> > is_uncorrelated_static_local(sym) ||
> > is_clang_tmp_label(sym) ||
> > is_string_sec(sym->sec) ||
> > + is_rodata_sec(sym->sec) ||
>
> Sashiko comments here [1] that the check is suddenly to broad and it
> covers also global rodata symbols which might then be skipped in
> klp_reloc_needed(). I think it has a point.
>
> [1] https://sashiko.dev/#/patchset/cover.1776916871.git.jpoimboe%40kernel.org?part=6

Yeah, after looking at this, I'm going to drop this patch. While
there's no harm in duplicating read-only data, it would break pointer
comparison, regardless of global or local.

--
Josh

\
 
 \ /
  Last update: 2026-04-28 18:58    [W:0.189 / U:3.950 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog