Re: Linux 6.2-rc3

From: Marco Elver
Date: Mon Jan 09 2023 - 17:30:56 EST


On Mon, 9 Jan 2023 at 23:18, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
[...]
> > kernel/kcsan/kcsan_test.c: In function '__report_matches':
> > kernel/kcsan/kcsan_test.c:257:1: error: the frame size of 1680 bytes is larger than 1536 bytes
> >
> > Context: CONFIG_SLUB_TINY is enabled with allmodconfig builds.
> > This enables some previously disabled configurations and disables
> > some previously enabled configurations.
>
> I do think that the test code should be a lot more careful about
> random things on stack.
>
> We've had this before with the EXPECT() macros generating *much* too
> much stack space, and it's not ok for test code to violate kernel
> coding standards even if it might be a "odd config that isn't
> realistic".
>
> That function does some odd things, including
>
> typeof(observed.lines) expect;
>
> WHAT IS THAT TYPE? It turns out that we have
>
> static struct {
> spinlock_t lock;
> int nlines;
> char lines[3][512];
> } observed = {
>
> so it's basically a 1.5kB byte array.
>
> And then des
>
> char tmp[2][64];
>
> to add some more pressure. So yeah, can't blame the compiler being
> stupid, this is just bad code.
>
> This is all very much a "this needs to be fixed, or the test just
> needs to be removed, because that's not acceptable".
>
> None of this is new, but clearly it was hidden by config issues
> before. Added the guilty parties.

The 1.5kB array is being fixed by
https://lore.kernel.org/lkml/20221231004514.317809-1-jcmvbkbc@xxxxxxxxx/
-- I suppose it's fair if you'd like to pull that patch right away, or
wait for the next PR from the xtensa tree (Cc Max).

Thanks,
-- Marco