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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210125124533.101339-1-arnd@kernel.org>
Date:   Mon, 25 Jan 2021 13:45:25 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     linux-kernel@...r.kernel.org
Cc:     Arnd Bergmann <arnd@...db.de>, Kees Cook <keescook@...omium.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Alan Maguire <alan.maguire@...cle.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Vitor Massaru Iha <vitor@...saru.org>,
        linux-hardening@...r.kernel.org, linux-kselftest@...r.kernel.org,
        kunit-dev@...glegroups.com
Subject: [RFC 0/3] kunit vs structleak

From: Arnd Bergmann <arnd@...db.de>

I ran into a couple of problems with kunit tests taking too much stack
space, sometimes dangerously so. These the the three instances that
cause an increase over the warning limit of some architectures:

lib/bitfield_kunit.c:93:1: error: the frame size of 7440 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
drivers/base/test/property-entry-test.c:481:1: error: the frame size of 2640 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
drivers/thunderbolt/test.c:1529:1: error: the frame size of 1176 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Ideally there should be a way to rewrite the kunit infrastructure
that avoids the explosion of stack data when the structleak plugin
is used.

A rather drastic measure would be to use Kconfig logic to make
the two options mutually exclusive. This would clearly work, but
is probably not needed.

As a simpler workaround, this disables the plugin for the three
files in which the excessive stack usage was observed.

      Arnd

Arnd Bergmann (3):
  bitfield: build kunit tests without structleak plugin
  drivers/base: build kunit tests without structleak plugin
  thunderbolt: build kunit tests without structleak plugin

 drivers/base/test/Makefile   | 1 +
 drivers/thunderbolt/Makefile | 1 +
 lib/Makefile                 | 1 +
 3 files changed, 3 insertions(+)

Cc: Kees Cook <keescook@...omium.org>
Cc: Brendan Higgins <brendanhiggins@...gle.com>
Cc: Shuah Khan <skhan@...uxfoundation.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Alan Maguire <alan.maguire@...cle.com>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Vitor Massaru Iha <vitor@...saru.org>
Cc: linux-hardening@...r.kernel.org
Cc: linux-kselftest@...r.kernel.org
Cc: kunit-dev@...glegroups.com
Cc: linux-kernel@...r.kernel.org
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ