Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Check for undefined symbols in simple_ring_buffer

The simple_ring_buffer implementation must remain simple enough to be
used by the pKVM hypervisor. Prevent the object build if unresolved
symbols are found.

Link: https://patch.msgid.link/20260309162516.2623589-19-vdonnefort@google.com
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Vincent Donnefort and committed by
Steven Rostedt (Google)
a717943d 63592308

+16
+16
kernel/trace/Makefile
··· 132 132 obj-$(CONFIG_SIMPLE_RING_BUFFER) += simple_ring_buffer.o 133 133 obj-$(CONFIG_TRACE_REMOTE_TEST) += remote_test.o 134 134 135 + # 136 + # simple_ring_buffer is used by the pKVM hypervisor which does not have access 137 + # to all kernel symbols. Fail the build if forbidden symbols are found. 138 + # 139 + UNDEFINED_ALLOWLIST := memset alt_cb_patch_nops __x86 __ubsan __asan __kasan __gcov __aeabi_unwind 140 + UNDEFINED_ALLOWLIST += __stack_chk_fail stackleak_track_stack __ref_stack __sanitizer 141 + UNDEFINED_ALLOWLIST := $(addprefix -e , $(UNDEFINED_ALLOWLIST)) 142 + 143 + quiet_cmd_check_undefined = NM $< 144 + cmd_check_undefined = test -z "`$(NM) -u $< | grep -v $(UNDEFINED_ALLOWLIST)`" 145 + 146 + $(obj)/%.o.checked: $(obj)/%.o FORCE 147 + $(call if_changed,check_undefined) 148 + 149 + always-$(CONFIG_SIMPLE_RING_BUFFER) += simple_ring_buffer.o.checked 150 + 135 151 libftrace-y := ftrace.o