From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: "Arnd Bergmann" <arnd@kernel.org>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Rae Moar" <rmoar@google.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Sergio González Collado" <sergio.collado@gmail.com>,
"David Gow" <davidgow@google.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas.schier@linux.dev>,
"Mostafa Saleh" <smostafa@google.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/mksysmap: skip objtool __pfx_ symbols
Date: Fri, 11 Apr 2025 08:50:54 +0200 [thread overview]
Message-ID: <20250411065054.GM9833@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <ycgbf7jcq7nc62ndqiynogt6hkabgl3hld4uyelgo7rksylf32@oysq7jpchtp4>
On Tue, Apr 08, 2025 at 06:58:49PM -0700, Josh Poimboeuf wrote:
> On Fri, Mar 28, 2025 at 11:48:19AM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The recently added testcase for overly long symbols triggers when
> > CONFIG_FUNCTION_PADDING_CFI is set:
> >
> > Symbol __pfx_snnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7n too long for kallsyms (517 >= 512).
> > Please increase KSYM_NAME_LEN both in kernel and kallsyms.c
> >
> > Change the mksymtab table so the prefixed symbols are not included
> > in kallsyms.
> >
> > Fixes: c104c16073b7 ("Kunit to check the longest symbol length")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> I'm not sure we want to remove the __pfx_ symbols from kallsyms. There
> can be actual code there.
>
> For example, FineIBT writes code in the __pfx area which can trigger an
> #UD. And we'd want a sane backtrace for that.
On top of that, clang kcfi builds do a similar thing, they will generate
__cfi_ prefixed symbols.
And yes, those symbols exist for a reason, there is code there under
various circumstances and backtraces look really weird without these
symbols on -- notably the code in the prefix will be attributed to
whatever symbol comes before, most confusing.
So yeah, don't remove these symbols, and fix the kunit test.
next prev parent reply other threads:[~2025-04-11 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 10:48 [PATCH] scripts/mksysmap: skip objtool __pfx_ symbols Arnd Bergmann
2025-04-09 1:58 ` Josh Poimboeuf
2025-04-11 6:50 ` Peter Zijlstra [this message]
2025-04-11 7:47 ` Arnd Bergmann
2025-04-11 10:58 ` Peter Zijlstra
2025-04-12 14:22 ` Steven Rostedt
2025-04-13 2:22 ` Nathan Chancellor
2025-04-15 17:39 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250411065054.GM9833@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davidgow@google.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
--cc=rmoar@google.com \
--cc=sergio.collado@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=smostafa@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox