Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

From: Linus Torvalds
Date: Fri Feb 26 2021 - 17:22:36 EST


On Fri, Feb 26, 2021 at 11:07 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> The first patch scans the print fmts of the trace events looking for
> dereferencing pointers from %p*, and making sure that they refer back
> to the trace event itself.
>
> The second patch handles strings "%s" [..]

Doing this at runtime really feels like the wrong thing to do.

It won't even protect us from what happened - people like me and
Andrew won't even run those tracepoints in the first place, so we
won't notice.

It really would be much better in every respect to have this done by
checkpatch, I think.

Linus