diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-25 19:36:19 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-25 19:36:19 -0800 |
| commit | 2bad4ba5bd4ed7075c7e874cd30c52e07a74c8cc (patch) | |
| tree | b99e718e6ece84acb98f3e07ba1bc503845f2be9 /include/linux | |
| parent | ebb7a8dc1e74c705daffe11c2faf38ec2628f838 (diff) | |
| parent | 23c8af89aac3feb3867c5eb47aca5b3a2dccb70e (diff) | |
Merge tag 'probes-fixes-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probes fixes from Masami Hiramatsu:
- 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
- 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
* tag 'probes-fixes-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/probes: Zero out faulted dereferenced fields
tracing/fprobe: Do not let KASAN check the $stackN read
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ftrace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 1c2056a1a68b..bdb6ee6bc3b9 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -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; } |
