Skip to contentSkip to conversation

tracing: Fixes for 7.1

PATCH New Steven Rostedt 1 participant 3 messages May 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

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_r9

make[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.

Cc Masami Hiramatsu <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Nathan Chancellor <[email protected]>
Cc Vincent Donnefort <[email protected]>
Cc Mathieu Desnoyers <[email protected]>
Cc Paolo Bonzini <[email protected]>
Fixes 1211907ac0b5 ("tracing: Generate undef symbols allowlist for simple_ring_buffer")
---
 kernel/trace/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/Makefile +2 -2
index 1decdce8cbef..9b0834134cae 100644
@@ -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
#2 lore raw

PATCH 2/2 tracing: Fix desc in error path for the trace remote test module

In reply to Steven Rostedt

From: 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.

Fixes ea908a2b79c8 ("tracing: Add a trace remote module for testing")

base-commit: 5d6919055dec134de3c40167a490f33c74c12581

---
 kernel/trace/remote_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/remote_test.c +2 -2
index 6c1b7701ddae..a3e2c9b606eb 100644
@@ -110,9 +110,9 @@ static struct trace_buffer_desc *remote_test_load(unsigned long size, void *unus
 	return 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