From: "Arnd Bergmann" <arnd@arndb.de>
To: "Michael Ellerman" <mpe@ellerman.id.au>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Mathieu Malaterre" <malat@debian.org>,
"Nick Desaulniers" <ndesaulniers@google.com>
Cc: Paul Mackerras <paulus@samba.org>,
llvm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang
Date: Thu, 08 Sep 2022 17:07:24 +0200 [thread overview]
Message-ID: <8afc110f-641e-40f0-9bf9-b7b2ca3df6a1@www.fastmail.com> (raw)
In-Reply-To: <87v8pyemmw.fsf@mpe.ellerman.id.au>
On Thu, Sep 8, 2022, at 2:27 AM, Michael Ellerman wrote:
> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>
> Yeah that would make some sense.
>
> On 64-bit the largest frame in that file is 1424, which is below the
> default 2048 byte limit.
>
> So maybe just increase it for 32-bit && KASAN.
>
> What would be nice is if the FRAME_WARN value could be calculated as a
> percentage of the THREAD_SHIFT, but that's not easily doable with the
> way things are structured in Kconfig.
>
Increasing the warning limit slightly for 32-bit with
CONFIG_KASAN_STACK makes sense, but there are a lot of
related concerns:
- I was hoping to still stay under 1280 bytes for the warning
limit, so that even with KASAN_STACK enabled, we are able to
catch warnings in functions that use a stupid amount of
local variables, without getting too many false positives.
- if the XOR code has its frame size explode like this, it's
probably an indication of the compiler doing something wrong,
not the kernel code. The result is likely that the "optimized"
XOR implementation is slower than the default version as a
result, and the kernel will pick the other one at boot time.
This needs to be confirmed of course, but an easier workaround
for this instance might be to just disable the xor_vmx module
when KASAN_STACK is set.
- The warning limit on 32-bit is actually 2028 bytes when
GCC_PLUGIN_LATENT_ENTROPY is set. I think this is a mistake
and we should lower /that/ limit instead, but a side-effect
here is that an allmodconfig kernel build with gcc will fail
to warn about bugs that exist both with gcc and clang, while
clang complains about it.
Arnd
next prev parent reply other threads:[~2022-09-08 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 8:58 [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang Mathieu Malaterre
2022-09-07 17:21 ` Christophe Leroy
2022-09-08 0:27 ` Michael Ellerman
2022-09-08 6:00 ` Christophe Leroy
2022-09-08 13:48 ` Segher Boessenkool
2022-09-09 5:01 ` Christophe Leroy
2022-09-08 15:07 ` Arnd Bergmann [this message]
2022-09-08 22:40 ` Segher Boessenkool
2025-08-27 17:15 ` Christophe Leroy
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=8afc110f-641e-40f0-9bf9-b7b2ca3df6a1@www.fastmail.com \
--to=arnd@arndb.de \
--cc=christophe.leroy@csgroup.eu \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=malat@debian.org \
--cc=mpe@ellerman.id.au \
--cc=ndesaulniers@google.com \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).