tracing: Fixes for 7.1
Subsystems (2)
cover tracing: Fixes for 7.1
tracing fixes for 7.1:
- Add more functions to the remote allowed list
randconfig found more functions that are allowed for the remote code for s390 and arm. Add them to the allowed list.
- Fix remote_test error path
If one of the simple ring buffers fails to load, the code is supposed to rollback its initialized buffers. Instead of rolling back the buffers for the failed load, it uses the global variable and rolls back all the successfully loaded buffers.
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes
Head SHA1: 55a0005518195fdea1fd2991b07644f8dc97ea8e
Arnd Bergmann (1):
ring-buffer remote: Avoid unexpected symbol warnings (arm, s390)
Vincent Donnefort (1):
tracing: Fix desc in error path for the trace remote test module
----
kernel/trace/Makefile | 4 ++-- kernel/trace/remote_test.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
PATCH 1/2 ring-buffer remote: Avoid unexpected symbol warnings (arm, s390)
From: Arnd Bergmann <[email protected]>
The now more verbose check found more architecture specific symbol missing from the whitelist, during randconfig testing on s390 and 32-bit arm:
Unexpected symbols in kernel/trace/simple_ring_buffer.o:
U __aeabi_unwind_cpp_pr1
Unexpected symbols in kernel/trace/simple_ring_buffer.o:
U __s390_indirect_jump_r1
U __s390_indirect_jump_r10
U __s390_indirect_jump_r14
U __s390_indirect_jump_r2
U __s390_indirect_jump_r5
U __s390_indirect_jump_r7
U __s390_indirect_jump_r8
U __s390_indirect_jump_r9make[6]: *** [/home/arnd/arm-soc/kernel/trace/Makefile:160: kernel/trace/simple_ring_buffer.o.checked] Error 1
Add these to the list and keep it roughly sorted into sanitizer and architecture symbols.
--- kernel/trace/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/Makefile +2 -2
@@ -143,8 +143,8 @@ obj-$(CONFIG_TRACE_REMOTE_TEST) += remote_test.o targets += undefsyms_base.o KASAN_SANITIZE_undefsyms_base.o := y -UNDEFINED_ALLOWLIST = __asan __gcov __kasan __kcsan __hwasan __sancov __sanitizer __tsan __ubsan __x86_indirect_thunk \ - __msan simple_ring_buffer \ +UNDEFINED_ALLOWLIST = __asan __gcov __kasan __kcsan __hwasan __sancov __sanitizer __tsan __ubsan __msan \ + __aeabi_unwind_cpp __s390_indirect_jump __x86_indirect_thunk simple_ring_buffer \ $(shell $(NM) -u $(obj)/undefsyms_base.o 2>/dev/null | awk '{print $$2}') quiet_cmd_check_undefined = NM $<
Signature · 1 line
2.53.0
PATCH 2/2 tracing: Fix desc in error path for the trace remote test module
In reply to Steven RostedtFrom: Vincent Donnefort <[email protected]>
During initialisation in remote_test_load(), if one of the simple_ring_buffer fails to initialise, the error path attempts to rollback initialised buffers. However, the rollback incorrectly uses the global pointer to the trace descriptor, which is only set upon successful load completion. Fix the error path by using the local pointer to the descriptor.
base-commit: 5d6919055dec134de3c40167a490f33c74c12581
--- kernel/trace/remote_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/remote_test.c +2 -2
@@ -110,9 +110,9 @@ static struct trace_buffer_desc *remote_test_load(unsigned long size, void *unusreturn remote_test_buffer_desc; err_unload: -for_each_ring_buffer_desc (rb_desc, cpu, remote_test_buffer_desc) +for_each_ring_buffer_desc (rb_desc, cpu, desc)remote_test_unload_simple_rb (rb_desc->cpu); -trace_remote_free_buffer (remote_test_buffer_desc); +trace_remote_free_buffer (desc); err_free_desc:kfree (desc);
Signature · 1 line
2.53.0