linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Brendan Higgins <brendanhiggins@google.com>
Cc: Shuah Khan <shuah@kernel.org>, David Gow <davidgow@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Kees Cook <keescook@chromium.org>,
	Rafael Wysocki <rafael@kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	andreas.noever@gmail.com, michael.jamet@intel.com,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	YehezkelShB@gmail.com, Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	KUnit Development <kunit-dev@googlegroups.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	gregkh <gregkh@linuxfoundation.org>,
	linux-iio@vger.kernel.org, linux-mmc <linux-mmc@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	linux-hardening@vger.kernel.org,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH v1 0/6] kunit: build kunit tests without structleak plugin
Date: Fri, 17 Sep 2021 09:38:09 +0200	[thread overview]
Message-ID: <CAK8P3a257cAgtPhT1Li2GnZ-UZW3LVZa3fWX1YUnWGEENvpqJA@mail.gmail.com> (raw)
In-Reply-To: <20210917061104.2680133-1-brendanhiggins@google.com>

On Fri, Sep 17, 2021 at 8:10 AM Brendan Higgins
<brendanhiggins@google.com> wrote:
>
> The structleak plugin causes the stack frame size to grow immensely when
> used with KUnit; this is caused because KUnit allocates lots of
> moderately sized structs on the stack as part of its assertion macro
> implementation. For most tests with small to moderately sized tests
> cases there are never enough KUnit assertions to be an issue at all;
> even when a single test cases has many KUnit assertions, the compiler
> should never put all these struct allocations on the stack at the same
> time since the scope of the structs is so limited; however, the
> structleak plugin does not seem to respect the compiler doing the right
> thing and will still warn of excessive stack size in some cases.
>
> These patches are not a permanent solution since new tests can be added
> with huge test cases, but this serves as a stop gap to stop structleak
> from being used on KUnit tests which will currently result in excessive
> stack size.
>
> Of the following patches, I think the thunderbolt patch may be
> unnecessary since Linus already fixed that test. Additionally, I was not
> able to reproduce the error on the sdhci-of-aspeed test. Nevertheless, I
> included these tests cases for completeness. Please see my discussion
> with Arnd for more context[1].
>
> NOTE: Arnd did the legwork for most of these patches, but did not
> actually share code for some of them, so I left his Signed-off-by off of
> those patches as I don't want to misrepresent him. Arnd, please sign off
> on those patches at your soonest convenience.

Thanks a lot for picking up this work where I dropped the ball.

Patches 1-5 look good to me, and I replied on one remaining issue I see
with patch 6. I think you did more work on these that I did, by doing
a nice write-up and splitting them into separate patches with useful
changelogs, you should keep authorship, and just change my
S-o-b to Suggested-by.

If you prefer to keep me as the author, then the correct way would
be to commit them with --author= to ensure that the author and
first s-o-b match.

        Arnd

  parent reply	other threads:[~2021-09-17  7:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17  6:10 [PATCH v1 0/6] kunit: build kunit tests without structleak plugin Brendan Higgins
2021-09-17  6:10 ` [PATCH v1 1/6] gcc-plugins/structleak: add makefile var for disabling structleak Brendan Higgins
2021-09-17 15:48   ` Kees Cook
2021-09-29 20:25     ` Brendan Higgins
2021-09-17  6:11 ` [PATCH v1 2/6] iio/test-format: build kunit tests without structleak plugin Brendan Higgins
2021-09-17 15:54   ` Kees Cook
2021-09-29 20:50     ` Brendan Higgins
2021-09-18 15:58   ` Jonathan Cameron
2021-09-17  6:11 ` [PATCH v1 3/6] device property: " Brendan Higgins
2021-09-17 15:54   ` Kees Cook
2021-09-17  6:11 ` [PATCH v1 4/6] thunderbolt: " Brendan Higgins
2021-09-17 10:16   ` Mika Westerberg
2021-09-17 15:55   ` Kees Cook
2021-09-17  6:11 ` [PATCH v1 5/6] mmc: sdhci-of-aspeed: " Brendan Higgins
2021-09-17 15:56   ` Kees Cook
2021-09-17 18:40     ` Linus Torvalds
2021-09-29 20:59       ` Brendan Higgins
2021-09-17  6:11 ` [PATCH v1 6/6] bitfield: " Brendan Higgins
2021-09-17  7:22   ` Arnd Bergmann
2021-09-17 15:57     ` Kees Cook
2021-09-29 21:04     ` Brendan Higgins
2021-09-17  7:38 ` Arnd Bergmann [this message]
2021-09-29 20:46   ` [PATCH v1 0/6] kunit: " Brendan Higgins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a257cAgtPhT1Li2GnZ-UZW3LVZa3fWX1YUnWGEENvpqJA@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=keescook@chromium.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=lars@metafoo.de \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=michal.lkml@markovi.net \
    --cc=mika.westerberg@linux.intel.com \
    --cc=ndesaulniers@google.com \
    --cc=rafael@kernel.org \
    --cc=shuah@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).