Re: [PATCH] x86/kprobes: Fix to update kcb status flag after singlestepping

From: Ingo Molnar
Date: Tue Aug 02 2022 - 13:29:05 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Tue, 2 Aug 2022 15:04:16 +0900
> "Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:
>
> > From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> >
> > Fix kprobes to update kcb (kprobes control block) status flag to
> > KPROBE_HIT_SSDONE even if the kp->post_handler is not set.
> > This may cause a kernel panic if another int3 user runs right
> > after kprobes because kprobe_int3_handler() misunderstands the
> > int3 is kprobe's single stepping int3.
> >
> > Fixes: 6256e668b7af ("x86/kprobes: Use int3 instead of debug trap for single-step")
> > Reported-by: Daniel Müller <deso@xxxxxxxxxx>
> > Tested-by: Daniel Müller <deso@xxxxxxxxxx>
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> > Cc: stable@xxxxxxxxxxxxxxx
> > Link: https://lore.kernel.org/all/20220727210136.jjgc3lpqeq42yr3m@muellerd-fedora-PC2BDTX9
> > ---
>
> Acked-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
>
> I guess this will go through the tip tree?

Yeah, it's already in tip:perf/urgent.

Thanks,

Ingo