Skip to contentSkip to conversation

probes: Fixes for v7.4-rc5

GIT PULL Merged Masami Hiramatsu (Google) 2 participants 2 messages Nov 26

Subsystems (2)
lore
Share & tools
lore

Masami Hiramatsu (Google)

author maintainer
#0 lore raw

Hi Linus,

Probes fixes for v7.4-rc5:

- tracing/fprobe: Do not let KASAN check the $stackN read
Use READ_ONCE_NOCHECK() in ftrace_regs_get_kernel_stack_nth() so reading $stackN entries that fall in another frame's redzone does not trigger KASAN stack-out-of-bounds splats under CONFIG_KASAN_STACK.

- tracing/probes: Zero out faulted dereferenced fields
Zero the destination in probe_mem_read() and probe_mem_read_user() on read failure and continue storing zero in process_fetch_insn_bottom() instead of leaving stale ring-buffer contents when a dereference faults.

Please pull the latest probes-fixes-v7.4-rc5 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v7.4-rc5

Tag SHA1: 0d0b4cfecfbe702cc3edc9fcc994240222763779 Head SHA1: 23c8af89aac3feb3867c5eb47aca5b3a2dccb70e

Steven Rostedt (1):
tracing/probes: Zero out faulted dereferenced fields

Yifan Feng (1):
tracing/fprobe: Do not let KASAN check the $stackN read

----

 include/linux/ftrace.h          |   2 +-
 kernel/trace/trace_probe_tmpl.h | 103 ++++++++++++++++++++++++++++++++--------
 2 files changed, 84 insertions(+), 21 deletions(-)

---------------------------

include/linux/ftrace.h +1 -1
index 1c2056a1a68b..bdb6ee6bc3b9 100644
@@ -270,7 +270,7 @@ ftrace_regs_get_kernel_stack_nth(struct ftrace_regs *fregs, unsigned int nth)
 	stackp = (unsigned long *)ftrace_regs_get_stack_pointer(fregs);
 	if (((unsigned long)(stackp + nth) & ~(THREAD_SIZE - 1)) ==
 	    ((unsigned long)stackp & ~(THREAD_SIZE - 1)))
-		return *(stackp + nth);
+		return READ_ONCE_NOCHECK(*(stackp + nth));
 
 	return 0;
 }
kernel/trace/trace_probe_tmpl.h +83 -20

183 lines not on this page · raw message

Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
merge bot Merged
#1 lore raw
The pull request you sent on Thu, 26 Nov 2026 09:11:57 +0900:

The pull request you sent on Thu, 26 Nov 2026 09:11:57 +0900:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-fixes-v7.4-rc5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2bad4ba5bd4ed7075c7e874cd30c52e07a74c8cc

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html