From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F5CCC43217 for ; Wed, 29 Sep 2021 20:50:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A22C6140F for ; Wed, 29 Sep 2021 20:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346802AbhI2Uwg (ORCPT ); Wed, 29 Sep 2021 16:52:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346797AbhI2Uwf (ORCPT ); Wed, 29 Sep 2021 16:52:35 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23A1C06176A for ; Wed, 29 Sep 2021 13:50:52 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id b68so2987878pfb.10 for ; Wed, 29 Sep 2021 13:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=3s5ovlVf4p4ZoSDKjFsCbe0uelei21AOA6TMHZbgO2s=; b=lS0ih59O2TtZaNEndFNiI0shEbyoO+KtDD/SlYcYm+EhPqLq1q/SZWW1x8II9lWLd6 JizxO5pBnSyg6jQLPCdSjiwVK7M5xMA2EVNhgBJXqQEtLi1t+UYXU3IKoBNDch3D3fMu H6wiQqWZq11b3npn0KgBnkpmAe2WtYw3qDws6zoVnizoayWiucKz3xml74ccPN/0BARt hUPPpZDRUwAuxwa382PMl4d83L7fCJc9W8456+mEamrafJTiUxvpHEoutnzPl70xXOr4 g1usvoe08E1ztXDfSKzYkqvbGSGQnanR6GxxdE9t/CuruhkY1mmlZKPIYT6fE3IW8H6m uPZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=3s5ovlVf4p4ZoSDKjFsCbe0uelei21AOA6TMHZbgO2s=; b=5uIMvkQ3iGDA8YJjHH8yG3NBD0DQbpc4uxvse3+WIEw2+hujQxDG+HCG6161OzbXEB 8aFOxx11qBjEOdb2vhG6xBm/xhgfrSxfGgM2HkaJqkzuKkzQree+8E9QqxKO2aX04RRL L+Q8Mhu9m4jSrzNx3LU7hlevlT9pe3r7HPDiFhvOyb+o4uAmDxWGrOZZP9r2wKbBs0Q2 C/v3gqf6+iTsI/Hdh5sjqXBvRXl8HNYSXYK4t2+RYTklpjRCOru60MSW1gb0aZe6UfAH 7FLE7I7DPiJBsFGQ0PqrRA2gQbVikeUq9GVQ9QrlGT57mXNIa+3VOM32kUzUzadl9rvz kSXw== X-Gm-Message-State: AOAM5311oRAczMA+ErPAM24B/pBMzzeOQkE2UgzmP3QfugKIhE8kzaCt ABKKIgfFcEAm2eVN8Js4CmQNhPzgogLQjLHfr9QHUA== X-Google-Smtp-Source: ABdhPJxR6uT7IzQuzwnXtUAlSkE9J/VzTqobJZisrAWrCsusYCxFaYU1sNTuoFRO/b3lUE/PvL4lrnwqZx/rz8i2gsg= X-Received: by 2002:a63:790b:: with SMTP id u11mr1626604pgc.71.1632948652015; Wed, 29 Sep 2021 13:50:52 -0700 (PDT) MIME-Version: 1.0 References: <20210917061104.2680133-1-brendanhiggins@google.com> <20210917061104.2680133-3-brendanhiggins@google.com> <202109170851.4485B94148@keescook> In-Reply-To: <202109170851.4485B94148@keescook> From: Brendan Higgins Date: Wed, 29 Sep 2021 13:50:41 -0700 Message-ID: Subject: Re: [PATCH v1 2/6] iio/test-format: build kunit tests without structleak plugin To: Kees Cook Cc: shuah@kernel.org, davidgow@google.com, arnd@arndb.de, rafael@kernel.org, jic23@kernel.org, lars@metafoo.de, ulf.hansson@linaro.org, andreas.noever@gmail.com, michael.jamet@intel.com, mika.westerberg@linux.intel.com, yehezkelshb@gmail.com, masahiroy@kernel.org, michal.lkml@markovi.net, ndesaulniers@google.com, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, linux-usb@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org On Fri, Sep 17, 2021 at 8:54 AM Kees Cook wrote: > > On Thu, Sep 16, 2021 at 11:11:00PM -0700, Brendan Higgins wrote: > > The structleak plugin causes the stack frame size to grow immensely whe= n > > used with KUnit: > > > > ../drivers/iio/test/iio-test-format.c: In function =E2=80=98iio_test_ii= o_format_value_fixedpoint=E2=80=99: > > ../drivers/iio/test/iio-test-format.c:98:1: warning: the frame size of = 2336 bytes is larger than 2048 bytes [-Wframe-larger-than=3D] > > > > Turn it off in this file. > > Given that these are all for KUnit tests, is it possible there are going > to be other CONFIGs that will interact poorly (e.g. KASAN)? Maybe there > needs to be a small level of indirection with something like: I don't think so. KASAN actually uses KUnit to test it, and we have experimented running KASAN alongside other KUnit tests for added protection and results have looked good. I would be surprised if there are other CONFIGs other than things dealing with stack size that don't like KUnit. > DISABLE_UNDER_KUNIT :=3D $(DISABLE_STRUCTLEAK_PLUGIN) > export DISABLE_UNDER_KUNIT > > then all of these become: > > +CFLAGS_iio-test-format.o +=3D $(DISABLE_UNDER_KUNIT) > > Either way, I think these are fine to add. I like your suggestion if we find other configs that don't like KUnit, but I don't think we have seen any others so far, so I think I will keep it as it is for now. > Reviewed-by: Kees Cook > > > > > > Co-developed-by: Arnd Bergmann > > Signed-off-by: Brendan Higgins > > --- > > drivers/iio/test/Makefile | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/iio/test/Makefile b/drivers/iio/test/Makefile > > index f1099b4953014..467519a2027e5 100644 > > --- a/drivers/iio/test/Makefile > > +++ b/drivers/iio/test/Makefile > > @@ -5,3 +5,4 @@ > > > > # Keep in alphabetical order > > obj-$(CONFIG_IIO_TEST_FORMAT) +=3D iio-test-format.o > > +CFLAGS_iio-test-format.o +=3D $(DISABLE_STRUCTLEAK_PLUGIN) > > -- > > 2.33.0.464.g1972c5931b-goog > > > > -- > Kees Cook