Re: [PATCH v3 0/2] x86/kprobes: Fixes for CONFIG_RETHUNK

Josh Poimboeuf
2022-09-08T19:31:56Z

On Fri, Sep 09, 2022 at 12:01:11AM +0900, Masami Hiramatsu (Google) wrote:
> Hi Peter and Josh,
>
> So here is 3rd version of the patches to fix kprobes and optprobe with
> CONFIG_RETHUNK and CONFIG_SLS.
> Previous version is here;
>
> https://lore.kernel.org/all/166260087224.759381.4170102827490658262.stgit@devnote2/
>
> In this version, I simplified all code and just checks the INT3 comes
> from kgdb or not. Other INT3 are treated as one-byte instruction.

Looks good to me.

I was confused by the naming of kgdb_has_hit_break(), because in this
case, with the function being called from outside the stopped kgdb
context, the breakpoint hasn't actually been hit. But it still seems to
do the right thing: it checks for BP_ACTIVE which means the breakpoint
has been written.

Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>

--
Josh