lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 23 Mar 2022 14:44:22 -0500
From:   Daniel Latypov <dlatypov@...gle.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Kees Cook <keescook@...omium.org>, David Gow <davidgow@...gle.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Vitor Massaru Iha <vitor@...saru.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        linux-kernel@...r.kernel.org,
        KUnit Development <kunit-dev@...glegroups.com>,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] lib: overflow: Convert to Kunit

On Wed, Mar 23, 2022 at 10:29 AM Guenter Roeck <linux@...ck-us.net> wrote:
>
> Hi,
>
> On Wed, Feb 23, 2022 at 09:48:25PM -0800, Kees Cook wrote:
> > Convert overflow unit tests to KUnit, for better integration into the
> > kernel self test framework. Includes a rename of test_overflow.c to
> > overflow_kunit.c, and CONFIG_TEST_OVERFLOW to CONFIG_OVERFLOW_KUNIT_TEST.
> >
>
> This patch results in lots of test build failures
> due to large frame sizes.
>
> Building i386:allyesconfig ... failed
> --------------
> Error log:
> lib/overflow_kunit.c: In function 'overflow_size_helpers_test':
> lib/overflow_kunit.c:644:1: error: the frame size of 2480 bytes is larger than 2048 bytes

This is somewhat expected and should hopefully be fixed soon.


More detail:
Unless optimized away by the compiler, each KUNIT_EXPECT_* use will
add a struct to the stack.
I have a number of pending patches that will decrease that stack usage.
On UML (x86_64), they cut it down from 88 bytes => 32 bytes per
KUNIT_EXPECT_EQ/GT/etc.

Shuah sent a PR to Linus which contains these patches,
https://lore.kernel.org/all/d138a93a-997f-bfb6-6119-83aa2c00a49d@linuxfoundation.org/
Once those are in, hopefully all these warnings go away as we're not
over the 2048 limit by that much.

Daniel

Powered by blists - more mailing lists