Thread (15 messages) flat view 15 messages, 4 authors, 13h ago

Re: [PATCH RFC 1/8] ftrace: Let ftrace_call_adjust() reject a patch site

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-09-04 12:46:45
Also in: bpf, linux-efi, linux-kbuild, linux-trace-kernel, lkml, llvm, rust-for-linux

On Fri, 04 Sep 2026 01:18:33 +0000
"Jose Fernandez (Anthropic)" [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f9d80c7bd9f16..394f82230e0c3 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -7676,6 +7676,10 @@ static int ftrace_process_locs(struct module *mod,
 		}
 
 		addr = ftrace_call_adjust(addr);
+		if (!addr) {
+			skipped++;
+			continue;
+		}
 
The above could use a comment to why addr could be zero (I didn't even
realize some architectures do that).

	/* Some architectures may return zero for mis-aligned addresses */

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help