Re: [PATCH] overflow: Split up kunit tests for smaller stack frames

From: Daniel Latypov
Date: Wed Aug 31 2022 - 15:02:13 EST


On Wed, Aug 31, 2022 at 11:11 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> Under some pathological 32-bit configs, the shift overflow KUnit tests
> create huge stack frames. Split up the function to avoid this,
> separating by rough shift overflow cases.
>
> Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
> Cc: Daniel Latypov <dlatypov@xxxxxxxxxx>
> Cc: Vitor Massaru Iha <vitor@xxxxxxxxxxx>
> Cc: "Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx>
> Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Link: https://lore.kernel.org/lkml/202208301850.iuv9VwA8-lkp@xxxxxxxxx
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>

Acked-by: Daniel Latypov <dlatypov@xxxxxxxxxx>

It's sad that we're forced to do this to eliminate such warnings, but
I like this organization a bit better, actually.

I wasn't able to reproduce the stack size warnings in the past, so I
haven't tried to do so here and can't give Tested-by/Reviewed-by.
But I did run the tests and they all still worked for me.