Re: [PATCH v5 2/3] tracing: Add a tracepoint verification check at build time

From: Steven Rostedt
Date: Fri Jul 25 2025 - 09:41:35 EST


On Fri, 25 Jul 2025 09:15:34 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:


> > Add a verifier that injects a string of the name of the tracepoint it
> > calls that is added to the discarded section "__tracepoint_check".
> > For every builtin tracepoint, it's
>
> its

Weird Al would be ashamed of me!

Although, you shouldn't delete the word that comes next in your reply, as
I can't tell if you were correct or not from the context you kept.

>
> [...]
>
> > + /*
> > + * The __tracepoint_check section is filled with strings of the
> > + * names of tracepoints (in tracepoint_strings). Create an array
> > + * that points to each string and then sort the array.
> > + */
> > + for_each_shdr_str(len, ehdr, check_data_sec) {
> > + if (!len)
> > + continue;
>
> The len==0 case would be when this skips section alignment padding when
> the linker decides to align the beginning of each .o sections, which
> ends up appearing as zeroed padding within the resulting vmlinux.o
> section after the individual sections have been stitched together, am I
> correct ?

I'm guessing. But when I walked through it in the debugger, there was more
zero length strings than strings with content. But it had all the strings I
was looking for.

-- Steve