From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Binoy Ravindran <binoy@vt.edu>
Cc: Peter Zijlstra <peterz@infradead.org>, Song Liu <song@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Joe Lawrence <joe.lawrence@redhat.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v2 0/2] objtool/klp: Copy constant pool entries for local labels
Date: Wed, 2 Dec 2026 13:51:19 -0800 [thread overview]
Message-ID: <axCSzSnx2FDDbCKT@jpoimboe> (raw)
In-Reply-To: <20261130-objtool-klp-cst-v2-0-2718c17fca37@vt.edu>
On Mon, Nov 30, 2026 at 06:50:36PM -0500, Binoy Ravindran wrote:
> A small problem in __clone_symbol(): a .LC label in a .rodata.cst*
> pool has no size, so its constant is never copied into the livepatch
> module, and the patched function reads whatever bytes follow. Patch 1
> fixes it. Details and the three affected modules are in that patch.
>
> Patch 2 adds a test to tools/objtool/tests, as Joe suggested. With
> patch 1's change to klp-diff.c reverted it fails, and with the change
> in place it passes, under gcc 12.2.0 and clang 14.0.6. The whole suite
> passes under both compilers.
>
> One thing I noticed while running the suite: with a gcc built with
> --enable-default-pie, as Debian's is, -mnop-mcount is rejected,
> preflight falls back to objtool's mcount, and every gcc test that
> needs an ftrace call site fails with "no ftrace call site, can't
> patch". CC="gcc -fno-PIE -fcf-protection=none" avoids it. The kernel
> always builds with -fno-PIE, so FIXTURE_CFLAGS might want it as well.
> I can send a patch for that if it is useful.
>
> ---
> Changes in v2:
> - Add a test for the fix (Joe).
> - Add Joe's Acked-by to patch 1.
> - Link to v1: https://patch.msgid.link/20261127-objtool-klp-cst-v1-1-dc19b08c8676@vt.edu
Queued, thanks!
--
Josh
prev parent reply other threads:[~2026-12-02 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 23:50 [PATCH v2 0/2] objtool/klp: Copy constant pool entries for local labels Binoy Ravindran
2026-11-30 23:50 ` Binoy Ravindran via B4 Relay
2026-11-30 23:50 ` [PATCH v2 1/2] " Binoy Ravindran
2026-11-30 23:50 ` Binoy Ravindran via B4 Relay
2026-11-30 23:50 ` [PATCH v2 2/2] objtool/klp: Add test for constant pool labels Binoy Ravindran
2026-11-30 23:50 ` Binoy Ravindran via B4 Relay
2026-12-02 21:51 ` Josh Poimboeuf [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=axCSzSnx2FDDbCKT@jpoimboe \
--to=jpoimboe@kernel.org \
--cc=binoy@vt.edu \
--cc=joe.lawrence@redhat.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=song@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.