Commit
c902b6d709845def1d1d3ab818e0b9d9b962ab16
tracing: Fix empty symbol names in simple_ring_buffer undef check
Sparc64 emits empty symmbol names. Skips them when establishing the
allowlist and when extracing undefined symbols.
Link: https://patch.msgid.link/20260923074213.3077182-2-vdonnefort@google.com
Fixes: 1211907ac0b5 ("tracing: Generate undef symbols allowlist for simple_ring_buffer")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/5574c9e6-9ed2-4ee6-a2b2-fb6ee81e83a1@roeck-us.net/
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Vincent Donnefort <vdonnefort@google.com> · 2026-09-23 07:42 UTC · committed by Steven Rostedt
1 file changed,
+2
−2
modified kernel/trace/Makefile
| @@ -146,11 +146,11 @@ KASAN_SANITIZE_undefsyms_base.o := y | |||
| 146 | 146 | ||
| 147 | 147 | UNDEFINED_ALLOWLIST = __asan __gcov __kasan __kcsan __hwasan __sancov __sanitizer __tsan __ubsan __msan \ | |
| 148 | 148 | __aeabi_unwind_cpp __s390_indirect_jump __x86_indirect_thunk simple_ring_buffer \ | |
| 149 | - | $(shell $(NM) -u $(obj)/undefsyms_base.o 2>/dev/null | awk '{print $$2}') | |
| 149 | + | $(shell $(NM) -u $(obj)/undefsyms_base.o 2>/dev/null | awk '$$2 {print $$2}') | |
| 150 | 150 | ||
| 151 | 151 | quiet_cmd_check_undefined = NM $< | |
| 152 | 152 | cmd_check_undefined = \ | |
| 153 | - | undefsyms=$$($(NM) -u $< | grep -v $(addprefix -e , $(UNDEFINED_ALLOWLIST)) || true); \ | |
| 153 | + | undefsyms=$$($(NM) -u $< | awk '$$2 {print $$2}' | grep -v $(addprefix -e , $(UNDEFINED_ALLOWLIST)) || true); \ | |
| 154 | 154 | if [ -n "$$undefsyms" ]; then \ | |
| 155 | 155 | echo "Unexpected symbols in $<:" >&2; \ | |
| 156 | 156 | echo "$$undefsyms" >&2; \ | |