Re: [PATCH v2 5/9] kprobes: Search non-suffixed symbol in blacklist

From: Steven Rostedt
Date: Mon Jan 14 2019 - 11:17:03 EST


On Sat, 12 Jan 2019 11:28:02 +0900
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> Newer gcc can generate some different instances of a function
> with suffixed symbols if the function is optimized and only
> has a part of that. (e.g. .constprop, .part etc.)
>
> In this case, it is not enough to check the entry of kprobe
> blacklist because it only records non-suffixed symbol address.
>
> To fix this issue, search non-suffixed symbol in blacklist if
> given address is within a symbol which has a suffix.
>
> Note that this can cause false positive cases if a kprobe-safe
> function is optimized to suffixed instance and has same name
> symbol which is blacklisted.
> But I would like to chose a fail-safe design for this issue.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>

Reviewed-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

-- Steve