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

2024-04-29 Thread Stephen Brennan
Masami Hiramatsu (Google) writes: > Hi Stephen, > > On Fri, 26 Apr 2024 15:58:34 -0700 > Stephen Brennan 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

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

2024-04-29 Thread Google
Hi Stephen, On Fri, 26 Apr 2024 15:58:34 -0700 Stephen Brennan 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

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

2024-04-27 Thread Stephen Brennan
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