mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 07:51:31 -04:00
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>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
635923081c
commit
a717943d8e
@@ -132,4 +132,20 @@ obj-$(CONFIG_TRACE_REMOTE) += trace_remote.o
|
||||
obj-$(CONFIG_SIMPLE_RING_BUFFER) += simple_ring_buffer.o
|
||||
obj-$(CONFIG_TRACE_REMOTE_TEST) += remote_test.o
|
||||
|
||||
#
|
||||
# simple_ring_buffer is used by the pKVM hypervisor which does not have access
|
||||
# to all kernel symbols. Fail the build if forbidden symbols are found.
|
||||
#
|
||||
UNDEFINED_ALLOWLIST := memset alt_cb_patch_nops __x86 __ubsan __asan __kasan __gcov __aeabi_unwind
|
||||
UNDEFINED_ALLOWLIST += __stack_chk_fail stackleak_track_stack __ref_stack __sanitizer
|
||||
UNDEFINED_ALLOWLIST := $(addprefix -e , $(UNDEFINED_ALLOWLIST))
|
||||
|
||||
quiet_cmd_check_undefined = NM $<
|
||||
cmd_check_undefined = test -z "`$(NM) -u $< | grep -v $(UNDEFINED_ALLOWLIST)`"
|
||||
|
||||
$(obj)/%.o.checked: $(obj)/%.o FORCE
|
||||
$(call if_changed,check_undefined)
|
||||
|
||||
always-$(CONFIG_SIMPLE_RING_BUFFER) += simple_ring_buffer.o.checked
|
||||
|
||||
libftrace-y := ftrace.o
|
||||
|
||||
Reference in New Issue
Block a user