Thread (77 messages) 77 messages, 3 authors, 16d ago

Re: [PATCH 54/58] objtool/klp: Add test for a patch which strips a data annotation

From: sashiko-bot@kernel.org
Date: 2026-09-11 19:24:31

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The test script comment references a stale, non-existent commit hash instead of the correct one cited in the commit message.
--

commit ebb1db72e2841f055fb71e4dbbeaab8dc57a8d05
Author: Song Liu [off-list ref]

objtool/klp: Add test for a patch which strips a data annotation
    
klp diff needs entry boundaries for a special section: either an entsize,
or ANNOTATE_DATA_SPECIAL annotations naming where each entry starts.
.static_call_sites has no entsize, so the annotations are all there is --
and a patch can remove the last one in a translation unit while leaving the
section itself in place, so that only the patched side has lost them.
quoted hunk ↗ jump to hunk
diff --git a/tools/objtool/tests/generic/test-static-call-annotate-stripped.sh b/tools/objtool/tests/generic/test-static-call-annotate-stripped.sh
new file mode 100755
index 0000000000000..bdbc0a21c669e
--- /dev/null
+++ b/tools/objtool/tests/generic/test-static-call-annotate-stripped.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+#
+# A patch may remove the last ANNOTATE_DATA_SPECIAL in a translation unit while
+# leaving the special section it described in place.
[ ... ]
+# The section must still be handled.  Dropping it would leave the patched
+# function's static call unregistered; misreading its boundaries would attach
+# the entry to the wrong code.  Either way nothing is reported at build time.
+#
+# Fixed by 5c134aadb0d9.
[Severity: Medium]
Does this comment reference a stale commit hash?

The commit message correctly cites 3de711fba73a as the fixing commit, but the
script comment cites 5c134aadb0d9. Should this comment be updated to match
the commit message to ensure accurate historical traceability?
+#
+# Covers the same ground as corpus/x86_64/static-call-annotate-stripped in Joe
+# Lawrence's klp-build unit test corpus.
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260911185031.1534046-1-song@kernel.org?part=54
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help