From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Longjun Luo <luolongjuna@gmail.com>
Cc: peterz@infradead.org, song@kernel.org, jikos@kernel.org,
pmladek@suse.com, live-patching@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] objtool/klp: Fix missed changes to same-named symbol references
Date: Mon, 14 Sep 2026 12:55:56 -0700 [thread overview]
Message-ID: <aqhQl64XvK0V2aJT@jpoimboe> (raw)
In-Reply-To: <CAKL4jwV8ZxAzkZ-0LWP9jzWvfw5-EKFS7LPKiibp5McY4Yubng@mail.gmail.com>
On Mon, Sep 14, 2026 at 08:12:33PM +0800, Longjun Luo wrote:
> Hi Josh,
>
> > These seem like unusual edge cases, is this problem theoretical or was
> > it a real-world bug?
>
> These are constructed reproducers, not production failures. We have
> been working on userspace livepatching, including symbol correlation
> under LTO. I built and tested these cases while comparing klp-build
> and kpatch-build.
>
> > If the .patch upgrades a function from static to global then the
> > function no longer has a FILE associated with it. Then with the above,
> > all callers to that function would be marked as changed. And note that
> > LTO does a lot of that, so static-to-global and global-to-static changes
> > are common between orig and patched objects.
>
> I confirmed locally that kernel LTO can change a function's binding
> without changing its name.
>
> For context, in our userspace ThinLTO tests, promoted locals usually
> acquired a .llvm.<hash> suffix. The kernel's ThinLTO build uses
> -always-rename-promoted-locals=false when supported by the toolchain,
> so promotion need not add that suffix.
>
> I agree that this FILE-based checksum change is too restrictive.
> Please drop this patch.
>
> You are right that patch authors need to verify the changed-function
> list. However, in these cases the current checksums do not distinguish
> the old and new targets, and no diagnostic points to the missed change.
> That could make a resulting problem difficult and time-consuming to
> diagnose. Would it be useful to document these cases as a known
> limitation?
Yes, and in fact we need a "patch author guide" for humans/LLMs to read
when using klp-build, as there are pitfalls to watch out for.
Something similar to what kpatch has...
https://github.com/dynup/kpatch/blob/master/doc/patch-author-guide.md
in case anybody wants to try porting that over.
--
Josh
prev parent reply other threads:[~2026-09-14 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 8:52 [PATCH] objtool/klp: Fix missed changes to same-named symbol references Longjun Luo
2026-09-10 9:02 ` sashiko-bot
2026-09-10 9:32 ` Longjun Luo
2026-09-14 0:26 ` Josh Poimboeuf
2026-09-14 12:12 ` Longjun Luo
2026-09-14 19:55 ` 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=aqhQl64XvK0V2aJT@jpoimboe \
--to=jpoimboe@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=luolongjuna@gmail.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--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.