Re: [PATCH for-next] tracing/kprobes: Add symbol counting check when module loads

From: Steven Rostedt
Date: Mon Oct 30 2023 - 09:59:23 EST


On Sun, 29 Oct 2023 12:10:46 +0900
"Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:

> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Check the number of probe target symbols in the target module when
> the module is loaded. If the probe is not on the unique name symbols
> in the module, it will be rejected at that point.
>
> Note that the symbol which has a unique name in the target module,
> it will be accepted even if there are same-name symbols in the
> kernel or other modules,
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> ---
> kernel/trace/trace_kprobe.c | 112 ++++++++++++++++++++++++++-----------------
> 1 file changed, 68 insertions(+), 44 deletions(-)

Reviewed-by: Steven Rosted (Google) <rostedt@xxxxxxxxxxx>

-- Steve