Re: [PATCH v2 19/53] objtool/klp: Fix pointer comparisons for rodata objects

Song Liu <[email protected]>
Newsgroups org.kernel.vger.live-patching,org.kernel.vger.linux-kernel
Message-ID <CAPhsuW4p3L2qchJQaU94f1f3qK3gq_LRx2n_rmbZ7ALO0FFHSQ@mail.gmail.com>
On Fri, May 1, 2026 at 5:08 AM Josh Poimboeuf <[email protected]> wrote:
>
> klp-diff treats all rodata as uncorrelated, so any reference to it uses
> a duplicated copy rather than using a KLP reloc.
>
> For the contents of the data itself, a duplicated copy is fine.
> However, pointer comparisons (e.g., f->f_op == &foo_ops) are broken.
>
> Fix it by correlating non-anonymous rodata objects.
>
> Also, use a new find_symbol_containing_inclusive() helper for matching
> the end of a symbol so bounds calculations don't get broken, for the
> case where an array or other symbol's ending address is used as part of
> a bounds calculation.
>
> While these are really two distinct changes, they need to be done in the
> same patch so as to avoid introducing bisection regressions.
>
> Signed-off-by: Josh Poimboeuf <[email protected]>

Acked-by: Song Liu <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.