[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250723182701.195a5ddf@gandalf.local.home>
Date: Wed, 23 Jul 2025 18:27:01 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
llvm@...ts.linux.dev, Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland
<mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>, Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <masahiroy@...nel.org>, Nathan Chancellor
<nathan@...nel.org>, Nicolas Schier <nicolas.schier@...ux.dev>, Nick
Desaulniers <nick.desaulniers+lkml@...il.com>, Catalin Marinas
<catalin.marinas@....com>
Subject: Re: [PATCH v4 1/4] tracing: sorttable: Add a tracepoint
verification check at build time
On Wed, 23 Jul 2025 13:31:52 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Wed, 23 Jul 2025 at 12:42, Steven Rostedt <rostedt@...nel.org> wrote:
> >
> > kernel/trace/Kconfig | 19 +++
>
> Annoying "one step forward, two steps back" change.
>
> You literally sent a "remove one pointless Kconfig option" patch
> within ten minutes of sending out this "add two pointless Kconfig
> options" patch.
You mean to also get rid of the TRACEPOINT_VERIFY_USED config?
>
> Because as long as it's a build-time thing, please just fix the
> problems it points out, and it should have no real cost to being
> enabled.
>
> We don't want to ask people questions that don't matter.
>
> Of course, because you *used* to check this at run-time, you put the
> new "__tracepoint_check" table in a section that is actually loaded
> into memory, and it appears to be still there.
>
> Just put it in the discard section, the same way we have (for example)
> the export_symbols table that we also check at build-time without
> actually ever making it part of the kernel.
Ah, I wasn't sure how to do that. So you are saying to do:
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 600d8b51e315..365c92e6d0ce 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -1048,6 +1047,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
*(.modinfo) \
/* ld.bfd warns about .gnu.version* even when not emitted */ \
*(.gnu.version*) \
+ *(.__tracepoint_check)
#define DISCARDS \
/DISCARD/ : { \
But this will require that I change how it's done, as it doesn't look like
it's available when sorttable.c is used.
Looks like it will require a separate application to search the vmlinux.o
instead of the vmlinux (which sorttable does).
I could probably take some of the sorttable.c elf parsing and move that
into a header that would share the code.
-- Steve
Powered by blists - more mailing lists