Re: [PATCH -tip] x86/kprobes: Handle removed INT3 in do_int3()

From: Peter Zijlstra
Date: Fri Nov 25 2022 - 02:42:02 EST


On Fri, Nov 25, 2022 at 10:09:02AM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Since x86 doesn't use stop_machine() to patch the kernel text,
> there is a small chance that the another CPU removes the INT3
> during do_int3(). In this case, if no INT3 notifier callbacks
> handled that, the kernel calls die() because of a stray INT3.

Please clarify; how would that happen? Should not everybody modifying
text take text_mutex ?