Live Patching
 help / color / mirror / Atom feed
From: Seke Kazuru <kazuruuni@gmail.com>
To: joe.lawrence@redhat.com
Cc: live-patching@vger.kernel.org, jpoimboe@kernel.org,
	mbenes@suse.cz, pmladek@suse.com, song@kernel.org,
	peterz@infradead.org, bpf@vger.kernel.org
Subject: Re: objtool/klp: ___bpf_prog_run jumptable is correlated to the original, fix never runs
Date: Tue,  1 Dec 2026 17:11:17 +0200	[thread overview]
Message-ID: <20261201151117.1659-1-kazuruuni@gmail.com> (raw)
In-Reply-To: <aw3hwnJKWXXF8KUE@redhat.com>

Hello Joe,

Thank you for the review and the pointers to the test documents.

The regression test follows in the next message as a patch. It fails on
mainline and passes with either fix, on gcc 11 to 16 and Clang 15 to 19
and 21 to 23, and on arm64 with Josh's klp-build-arm64-latest branch.

Writing it showed that since v7.2 the problem has two forms. Since
873a2208ea ("objtool/klp: Calculate object checksums") and 6016dd33a1
("objtool/klp: Rewrite symbol correlation algorithm"), a patch to
___bpf_prog_run() that moves a label is rejected with "changed data:
jumptable.N", so it cannot be built. A patch that leaves every label in
place still builds and runs the original handlers. On kernel/bpf/core.o
from 7.4-rc5, a change to the ALU_NEG handler is rejected with "changed
data: jumptable.14", and a change to the text of the pr_warn() in
default_label builds, with ___bpf_prog_run() still pointing at
.klp.sym.vmlinux.jumptable.14. The test covers both.

I have a version of option 2 that passes the whole suite on the same
compilers. I can send it, with a variant of the test whose table has a
different name, if that would help.

Separately, test-local-to-global-flip fails with Ubuntu's gcc 11 to 14,
which default to -fcf-protection=full. I am sending a small patch for
the fixture flags in its own thread.

The test was written with an AI assistant from klp-write-tests.txt,
klp-test-design.txt and the report, as its Assisted-by tag says. I
reviewed it and ran the checks described in the changelog.

Thank you,
Seke Kazuru

  reply	other threads:[~2026-12-01 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28  6:51 objtool/klp: ___bpf_prog_run jumptable is correlated to the original, fix never runs Seke Kazuru
2026-11-30 20:51 ` Joe Lawrence
2026-12-01 15:11   ` Seke Kazuru [this message]
2026-12-01 15:14   ` [PATCH] objtool/klp: Add test for computed-goto jump tables Seke Kazuru
2026-12-01 15:22     ` sashiko-bot

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=20261201151117.1659-1-kazuruuni@gmail.com \
    --to=kazuruuni@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox