Thread (10 messages) flat view 10 messages, 6 authors, 2024-05-22

Re: [PATCH v3] kprobe/ftrace: bail out if ftrace was killed

From: patchwork-bot+linux-riscv@kernel.org
Date: 2024-05-22 23:32:23
Also in: linux-riscv, linux-s390, linuxppc-dev, lkml, loongarch

Hello:

This patch was applied to riscv/linux.git (fixes)
by Masami Hiramatsu (Google) [off-list ref]:

On Wed,  1 May 2024 09:29:56 -0700 you wrote:
If an error happens in ftrace, ftrace_kill() will prevent disarming
kprobes. Eventually, the ftrace_ops associated with the kprobes will be
freed, yet the kprobes will still be active, and when triggered, they
will use the freed memory, likely resulting in a page fault and panic.

This behavior can be reproduced quite easily, by creating a kprobe and
then triggering a ftrace_kill(). For simplicity, we can simulate an
ftrace error with a kernel module like [1]:

[...]
Here is the summary with links:
  - [v3] kprobe/ftrace: bail out if ftrace was killed
    https://git.kernel.org/riscv/c/1a7d0890dd4a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

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