Re: [PATCH v2 1/2] kprobes: Prohibit probing on CFI preamble symbol

From: Google
Date: Sat Jul 29 2023 - 08:58:06 EST


On Fri, 28 Jul 2023 18:49:13 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Tue, 11 Jul 2023 10:50:47 +0900
> "Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:
>
> > From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> >
> > Do not allow to probe on "__cfi_" or "__pfx_" started symbol, because those
> > are used for CFI and not executed. Probing it will break the CFI.
> >
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

Thanks! I will pick this for probes/fixes.


>
> -- Steve
>
> > ---
> > Changes in v2:
> > - Check "__pfx_" prefix functions too.
> > - Make the check unconditional.
> > ---
> > kernel/kprobes.c | 14 +++++++++++++-
> > 1 file changed, 13 insertions(+), 1 deletion(-)
> >


--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>