kpatch: Handle __trace_check symbols as discardable#1490
Merged
joe-lawrence merged 1 commit intodynup:masterfrom Jan 19, 2026
Merged
kpatch: Handle __trace_check symbols as discardable#1490joe-lawrence merged 1 commit intodynup:masterfrom
joe-lawrence merged 1 commit intodynup:masterfrom
Conversation
Starting with kernel commit e30f8e61e251 ("tracing: Add a tracepoint
verification check at build time"), each defined and used tracepoint
adds its name to the __tracepoint_check section for build-time
verification. This section is discarded when linking vmlinux, so
symbols prefixed with __trace_check do not appear in vmlinux.symtab.
As a result, kpatch-build fails with: "couldn't find matching local
symbols in symbol table" for syscall.patch
i.e
readelf -p __tracepoint_check sys.o
String dump of section '__tracepoint_check':
[ 0] task_prctl_unknown
Disassembly of section __tracepoint_check:
0000000000000000 <__trace_check_task_prctl_unknown.1>:
0: 74 61 73 6b .long 0x7461736b
4: 5f 70 72 63 sl %r7,611(%r7)
8: 74 6c 5f 75 .long 0x746c5f75
c: 6e 6b 6e 6f aw %f6,3695(%r11,%r6)
10: 77 6e 00 00 .long 0x776e0000
To fix this, add symbols starting with __trace_check to
maybe_discarded_sym() so they are treated as discardable.
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
joe-lawrence
approved these changes
Jan 12, 2026
Contributor
joe-lawrence
left a comment
There was a problem hiding this comment.
Thanks, @sumanthkorikkar !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting with kernel commit e30f8e61e251 ("tracing: Add a tracepoint verification check at build time"), each defined and used tracepoint adds its name to the __tracepoint_check section for build-time verification. This section is discarded when linking vmlinux, so symbols prefixed with __trace_check do not appear in vmlinux.symtab.
As a result, kpatch-build fails with: "couldn't find matching local symbols in symbol table" for syscall.patch
i.e
readelf -p __tracepoint_check sys.o
String dump of section '__tracepoint_check':
[ 0] task_prctl_unknown
Disassembly of section __tracepoint_check:
0000000000000000 <__trace_check_task_prctl_unknown.1>:
0: 74 61 73 6b .long 0x7461736b
4: 5f 70 72 63 sl %r7,611(%r7)
8: 74 6c 5f 75 .long 0x746c5f75
c: 6e 6b 6e 6f aw %f6,3695(%r11,%r6)
10: 77 6e 00 00 .long 0x776e0000
To fix this, add symbols starting with __trace_check to maybe_discarded_sym() so they are treated as discardable.