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

Peter Zijlstra
2022-11-25T07:42:02Z

On Fri, Nov 25, 2022 at 10:09:02AM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> 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 ?