From: sashiko-bot@kernel.org
To: "Longjun Luo" <luolongjuna@gmail.com>,
jpoimboe@kernel.org, peterz@infradead.org
Cc: mbenes@suse.cz, pmladek@suse.com, joe.lawrence@redhat.com,
song@kernel.org, puranjay@kernel.org, nathan@kernel.org,
ndesaulniers@google.com, morbo@google.com,
justinstitt@google.com, live-patching@vger.kernel.org
Subject: Re: [RFC PATCH v2 11/11] objtool/klp: Test symbol identity and state preservation
Date: Wed, 04 Nov 2026 13:50:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-197357@kernel.org> (raw)
In-Reply-To: <20261104133158.3187525-12-luolongjuna@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] objtool/klp: test suite left failing and sympos coverage lost
--
commit 81f49775a536febbdc9ffe953af763d00e57323f
Author: Longjun Luo <luolongjuna@gmail.com>
objtool/klp: Test symbol identity and state preservation
This commit adds tests and fixtures to exercise symbol identity and local
state preservation across source changes, inlining, compiler renaming, and
LTO in objtool klp.
> objtool/klp: Test symbol identity and state preservation
>
> Exercise local state across source changes, inlining, compiler renaming
> and LTO. Check that patches reference the original objects and allocate
> only new state. Cover aliases, assembly, metadata, ICF, DWARF pieces,
> shrunk storage, reduced information and saved DWP files. Cover separate
> cold-fragment identities left by weak overrides.
>
> Check rejection of ambiguous repeated statics, conflicting references
> and changed data. Complete compound-reference tests and add same-named
> target switches for the identity-based reference checksum.
>
> Skip the saved-DWP test when the linked libdw lacks DWP support.
>
> The full suite has 68 passes with GCC 16.2.1 and 75 with Clang
> 22.1.8. Only local-to-global-flip, sympos and sympos-vmlinux fail,
> reflecting the linkage and duplicate-identity policies.
>
> Assisted-by: LLM
> Signed-off-by: Longjun Luo <luolongjuna@gmail.com>
[Severity: Medium]
Does leaving test-local-to-global-flip.sh, test-sympos.sh, and
test-sympos-vmlinux.sh failing cause the test suite runner in
tools/objtool/tests/run-tests.sh to always exit non-zero, while also losing
all test coverage for sympos calculation?
In tools/objtool/tests/run-tests.sh, the runner exits non-zero whenever any
test fails without xfail:
[ "$fail" = 0 ] && [ "$xpass" = 0 ]
In tools/objtool/tests/generic/test-sympos.sh and
tools/objtool/tests/generic/test-sympos-vmlinux.sh, the scripts compile a
single source file twice to produce two translation units with a same-named
static variable (dup_counter):
tools/objtool/tests/generic/test-sympos.sh:
build_one sympos_dup.c "a$p.o" -DFUNC_NAME=use_a $p
# shellcheck disable=SC2086
build_one sympos_dup.c "b$p.o" -DFUNC_NAME=use_b -DNO_MODINFO $p
tools/objtool/tests/generic/test-sympos-vmlinux.sh:
build_one sympos_vmlinux.c orig_a.o -DFUNC_NAME=use_a -DVARSEC='".data.zzz"'
build_one sympos_vmlinux.c patched_a.o -DFUNC_NAME=use_a -DVARSEC='".data.zzz"' -DPATCHED
build_one sympos_vmlinux.c b.o -DFUNC_NAME=use_b -DVARSEC='".data.aaa"' -DNO_MODINFO
Because both objects are compiled from the exact same source file path,
they share an identical DWARF CU path, causing validate_dwarf_identity() in
tools/objtool/klp-identity.c to abort during klp checksum with a duplicate
symbol identity error before klp diff ever runs. As a result,
klp_find_sympos() and .klp.symid vmlinux address-order resolution are never
reached or tested.
Similarly, in tools/objtool/tests/generic/test-local-to-global-flip.sh:
run_diff
assert_diff_log 'changed function: caller'
the test still expects klp diff to succeed and correlate symbols across
linkage changes, whereas check_linkage_changes() in tools/objtool/klp-diff.c
now rejects linkage flips with exit status 255.
Should test-sympos.sh and test-sympos-vmlinux.sh compile separate source
files so their DWARF CU paths are distinct and sympos resolution is still
exercised, and should test-local-to-global-flip.sh be updated to assert the
linkage rejection so the test suite passes cleanly?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104133158.3187525-1-luolongjuna@gmail.com?part=11
prev parent reply other threads:[~2026-11-04 13:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 13:31 [RFC PATCH v2 00/11] objtool/klp: DWARF-based cross-build symbol correlation Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 01/11] objtool/klp: Fix checksums and copying of wide strings Longjun Luo
2026-11-04 14:03 ` sashiko-bot
2026-11-04 13:31 ` [RFC PATCH v2 02/11] objtool/klp: Hash compound literals by content Longjun Luo
2026-11-04 13:55 ` sashiko-bot
2026-11-04 13:31 ` [RFC PATCH v2 03/11] objtool/klp: Preserve identifier digits when stripping suffixes Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 04/11] objtool/klp: Read symbol identities from DWARF Longjun Luo
2026-11-04 13:51 ` sashiko-bot
2026-11-04 13:31 ` [RFC PATCH v2 05/11] objtool/klp: Support reduced and split DWARF Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 06/11] klp-build: Require CONFIG_DEBUG_INFO Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 07/11] objtool/klp: Correlate symbols using DWARF identities Longjun Luo
2026-11-04 14:09 ` sashiko-bot
2026-11-04 13:31 ` [RFC PATCH v2 08/11] objtool/klp: Include symbol identities in reference checksums Longjun Luo
2026-11-04 14:06 ` sashiko-bot
2026-11-04 13:31 ` [RFC PATCH v2 09/11] objtool/klp: Extend twins through unchanged function references Longjun Luo
2026-11-04 14:05 ` sashiko-bot
2026-11-04 13:31 ` [RFC PATCH v2 10/11] objtool/klp: Check unmatched data references Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 11/11] objtool/klp: Test symbol identity and state preservation Longjun Luo
2026-11-04 13:50 ` sashiko-bot [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=sashiko-outbox-197357@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=justinstitt@google.com \
--cc=live-patching@vger.kernel.org \
--cc=luolongjuna@gmail.com \
--cc=mbenes@suse.cz \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=puranjay@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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