Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp10843pxb; Fri, 17 Sep 2021 17:11:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO2kvdXXA0jKTG17Auim3cyVHb4IcLyC7BgQREP8p1wYxdO+UAcs3aCXsqf3LmftEhYDmy X-Received: by 2002:a05:6638:42:: with SMTP id a2mr6627180jap.69.1631923878347; Fri, 17 Sep 2021 17:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631923878; cv=none; d=google.com; s=arc-20160816; b=0D+BC9JXGFOZUBcXPT19PkI7IRzwpenhVeJRnIUD2A0eMqudESsfW9Z3znzNLkzrkA gGTBb58qLKuWlLIgo2qFPE8LWpUas/NYRQPGLAHmJK9W5ni1gaeSRPyE5dmqclDVjFhp C98czxtSyHe30rbji0r5/z7cWCVz2UHPI4CmhVZtl6RJOJicV1r+y1r+yg7O65Ti/loK Fb1Lpqq3rTukQLQj7qlkg48bciRKLecvRQuFY/ldoIHT+DqBG+4L42I33VDx1SHNJjei o8M982jv5DRUWd+JoxvjG5Vlt2mMCj4JyW5gQNbdCNFQZ+2EifjcaM4xrph52W9qK5Sr B8PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+QhNx1xL4TTv0Q4Zmru2yDL9Dg0TE9nnDuxrWUBBR84=; b=uAAWzDO85X+kx/2I5BrsFOzkZdFusB0jjfExImah3j5Ahe1Kdk4ujLr+T0QHh9pJ0J T/DgB7cu3X32/r9r/IA7fOjSlIRTdbbqRFOAsdqFd2mVfV1jvZ1xUMm8R4PYSM/bzCtN G3VslEXrT0CjegaJxBsfS/1a4QpfEJ88X9KXZnb8nB/ZEIzCFFae/LlI9L2D0mLqNPsO bHG7jE7YZOAWB7AH/LVwWH4QO4o8ZIZfoRwR3xSVgrbS3Lu88/AqiCLOoGtPWdiV28xD fcYycz4VyLQ++pATgOtEU6Gv5mq1HDpC6BpuUCtKigpGiIBcL6yQaZuAvPgV66sgQCzV sqSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UzTRN8S+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si9164337ilu.95.2021.09.17.17.11.06; Fri, 17 Sep 2021 17:11:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UzTRN8S+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235784AbhIQP4K (ORCPT + 99 others); Fri, 17 Sep 2021 11:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235836AbhIQP4I (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 8F1F3C0613CF for ; Fri, 17 Sep 2021 08:54:46 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id w8so10019616pgf.5 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=PEZGbniXyVvEmLTOrXd661ZBnGZAN1DRYFpxiI4UcZp31sK2wuWdgexq6UuqnzDXE3 9k2LNdf/OcbwXKaZCk+Ls2gFZZnlJwA/szU0MrraqHAtAfZ1SPfC7GoeRBJVci9Rva0d MHYOv6T70D5AUsXjtYgmR5DNEjOs/DokGD3o7R7P/wl0o6fUhdC7Jn5mJPZ2Ilukju7y wB91NJSf6RBTiRxD48nt2ca+fbU3r9gz5Qh528swRqsrCT9d2VtiIv68OnUHSqE0MvTG J54kcs7kZtR7ArMs8WJtkfGIT7zBcPDoxjTw96K1JlT3P2nSs8g+QQ+ao0+Ngpdkw5Ft ykpQ== X-Gm-Message-State: AOAM532jiu6N9iA53nJPaWsi4meEuusHy/B0UgWN+6dXGr+MDLuCTyQj db0owJ+zYEChOrENEW6GswAoBg== 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-kernel@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