Re: [PATCH 4.19 094/105] parisc: Increase size of gcc stack frame check

Arnd Bergmann
2022-12-05T19:28:02Z

On Mon, Dec 5, 2022, at 20:10, Greg Kroah-Hartman wrote:
> From: Helge Deller <deller@gmx.de>
>
> [ Upstream commit 55b70eed81cba1331773d4aaf5cba2bb07475cd8 ]
>
> parisc uses much bigger frames than other architectures, so increase the
> stack frame check value to avoid compiler warnings.

I had not seen this one originally, commenting on it now:

> index 9ded3c1f68eb..556aae95d69b 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -224,7 +224,7 @@ config FRAME_WARN
> range 0 8192
> default 3072 if KASAN_EXTRA
> default 2048 if GCC_PLUGIN_LATENT_ENTROPY
> - default 1280 if (!64BIT && PARISC)
> + default 1536 if (!64BIT && PARISC)
> default 1024 if (!64BIT && !PARISC)

1536 is a /lot/ when we're dealing with 32-bit platforms.
My understanding of the parisc overhead was that this
was just based on a few bytes per function call, not
something that makes everything bigger. We have a
few functions that get close to the normal 1024
byte limit, everything else should be no more than
a few hundred bytes on any architecture.

Could it be that this only happens when KASAN or some
other feature is enabled?

If this happens for normal parisc builds without any
special compilation options, that would indicate that the
compiler is very broken.

Arnd