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 X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D4ABC433F5 for ; Fri, 17 Sep 2021 15:54:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29E18611C8 for ; Fri, 17 Sep 2021 15:54:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237726AbhIQP4J (ORCPT ); Fri, 17 Sep 2021 11:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235811AbhIQP4I (ORCPT ); Fri, 17 Sep 2021 11:56:08 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C15C061768 for ; Fri, 17 Sep 2021 08:54:46 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id n18so9994727pgm.12 for ; Fri, 17 Sep 2021 08:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=+QhNx1xL4TTv0Q4Zmru2yDL9Dg0TE9nnDuxrWUBBR84=; b=UzTRN8S+SFaS0NcA2X93VlLRRLwVuNfxQ7NfzwkE+I7/olmwRoLLJAmuJx30dIORIa d0hK4cEU//XVhpq8K6KGV69vJbwzGUnQQUnubK9I2xnkdVgTlCGAQ7msHG/9QTcv6Ycb ibLejp56H/G5YUjxLUEPMiLjsES/wNBmzTgyM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=+QhNx1xL4TTv0Q4Zmru2yDL9Dg0TE9nnDuxrWUBBR84=; b=IwrcXXv9roxearOhgBn+BmCboKXLRIlsTjjoCyJ49IhBPkCcavu1grm0wJ+RlbfrZx KKP0MMB2S9W1HOhMweLDM8NuGi57HLiMbO91CBKXsPyhv+dMd/Tlo135E0w1C4JvcuqB iwvu4j1VXybxvvGre40hZlTPUCAmKdpWbpw8K+Etj/OVsqBBL7j/oe5Rg/9yuOBzgNvs +TyNtNVK1TSyuP/px5AjXI/+vZoA4lm2EVZKVcWKIg8lKb+iPz6WMGRauNWRf/EjaPlC 6LIqejMyPxFRA63g4H02+AitJ4gN4c5040uAxxa6hKETDQREGeEFqDX0Sjk9bEC0YG9P w6fw== X-Gm-Message-State: AOAM530TQGJxs7bHDScGey6NOKma2lDlpIowdrOpcKCSsWyxDYKDyjzY kI9Jd2HVOlpog98JS2HmOsBkGQ== X-Google-Smtp-Source: ABdhPJzpWIoc5zT5RwybN9lLYKDIkzgT1DK7K6W4lRjZBgZOR0pFTwHhbVoLjM1hQc9M9qiRyhom1w== X-Received: by 2002:a62:6244:0:b0:43e:ee5:c7b5 with SMTP id w65-20020a626244000000b0043e0ee5c7b5mr11319098pfb.28.1631894085801; Fri, 17 Sep 2021 08:54:45 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id m64sm7006875pga.55.2021.09.17.08.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 08:54:45 -0700 (PDT) Date: Fri, 17 Sep 2021 08:54:44 -0700 From: Kees Cook To: Brendan Higgins 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 Subject: Re: [PATCH v1 2/6] iio/test-format: build kunit tests without structleak plugin Message-ID: <202109170851.4485B94148@keescook> References: <20210917061104.2680133-1-brendanhiggins@google.com> <20210917061104.2680133-3-brendanhiggins@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210917061104.2680133-3-brendanhiggins@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On Thu, Sep 16, 2021 at 11:11:00PM -0700, Brendan Higgins wrote: > The structleak plugin causes the stack frame size to grow immensely when > used with KUnit: > > ../drivers/iio/test/iio-test-format.c: In function ‘iio_test_iio_format_value_fixedpoint’: > ../drivers/iio/test/iio-test-format.c:98:1: warning: the frame size of 2336 bytes is larger than 2048 bytes [-Wframe-larger-than=] > > 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: DISABLE_UNDER_KUNIT := $(DISABLE_STRUCTLEAK_PLUGIN) export DISABLE_UNDER_KUNIT then all of these become: +CFLAGS_iio-test-format.o += $(DISABLE_UNDER_KUNIT) Either way, I think these are fine to add. 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) += iio-test-format.o > +CFLAGS_iio-test-format.o += $(DISABLE_STRUCTLEAK_PLUGIN) > -- > 2.33.0.464.g1972c5931b-goog > -- Kees Cook