Re: [PATCH v3 1/5] tracepoints: Add verifier that makes sure all defined tracepoints are used
From: Linus Torvalds
Date: Tue Jul 22 2025 - 12:17:29 EST
On Tue, 22 Jul 2025 at 08:21, Steven Rostedt <rostedt@xxxxxxxxxx> wrote:
>
> Add a verifier that injects a pointer to the tracepoint structure in the
> functions that are used and added to a section called __tracepoint_check.
> Then on boot up, iterate over this section and for every tracepoint
> descriptor that is pointed to, update its ".funcs" field to (void *)1, as
> the .funcs field is only set when a tracepoint is registered. At this
> time, no tracepoints should be registered.
Why?
Doing this at runtime seems completely bass-ackwards.
If you want to do this verification, why don't you do it at build-time?
Linus