From patchwork Wed Sep 29 21:27:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 12526653 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 5D46DC433FE for ; Wed, 29 Sep 2021 21:27:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 425F761368 for ; Wed, 29 Sep 2021 21:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346945AbhI2V3H (ORCPT ); Wed, 29 Sep 2021 17:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346929AbhI2V3D (ORCPT ); Wed, 29 Sep 2021 17:29:03 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26AE4C06176C for ; Wed, 29 Sep 2021 14:27:22 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id x6-20020ac81206000000b002a6e46bbd0eso10094299qti.12 for ; Wed, 29 Sep 2021 14:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=GBgRPmylRP0XaI5E/LihaXT2Ir7X1xpw3ZInKRc4R50=; b=WHFQA+g25qkYPYFpep7vNNJTNwmmqsk9uHkMIXOXNnU9O5BPIQRfnn5cf/mGs1NaL+ ogKT12Uh8k7K5urhYrNFdvA4MuqXpUSda3nB7WGcM7+TmYrb/KYXzXGlDr9DjrUV16I0 rHwXYiunO8+vv1D/AhHbPY96DW0Dfw4rFl3WW3/Ie+sLyrSpeG+6nYS6+7KwC3QaTDAy kvG8F8Pay8skbykgIct0kmcVyTHUENlCleH7rnpjrTRQd1yF+nB+oZnvHiXisnyqj5hF B7JP6NY+hXsfKoG5gBkQZLzz+ZbQt1dS3slr7Wa8EFv5hkH1pcrphEZcixGC7BD/sLiC 7jgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=GBgRPmylRP0XaI5E/LihaXT2Ir7X1xpw3ZInKRc4R50=; b=a7457ZoGv1p39kO6DoJOceO2I1h//jMZ0hfogMo6XCXxSB6DYZpXMHGh+cM/n+Wvhp al4SwzJjpSW1mxWpSwUaNqfXpt+sInjZGmhi1kIa+NvLhcYoTTVYZr/EeVnaNdpLTEOI DDrrjRKzP3sO+UPwLKMdeSBIJu3ZJB0uHOygyaP2N9DcgGRFUCCtgBxgLBczV32EN1ex xhaPoxvPVF5lo4QuIuMXDwaGzV9K8PKKQZ2W2ekeea+PyxRt4jYxYT06bE4SCt4GD3g1 7UVHoEO8W/ez9Sfl9b4OglwTinYuUL/QYYHVw7IpHaV7ZImDTBoH1S8DqkmH4tHt4/HM oxfQ== X-Gm-Message-State: AOAM532vVwf/JBzwmBrbfpZWrbT/fzlF7g0Ne9ZltQWBbXLGo2+yBGTX 1dI3JT8fvYceMijZwbJ9geh6vAKqcd853B9foOdPSQ== X-Google-Smtp-Source: ABdhPJyf4SNenqCX/qG/XKTasyzdp9ORUzCCpdL0aIBEMr9txfgQG0Tiw87AG132HGgvqre40Hvbdjn6vQZh3WqzsjyZdQ== X-Received: from mactruck.svl.corp.google.com ([2620:15c:2cb:201:83f4:ff43:90d6:efd3]) (user=brendanhiggins job=sendgmr) by 2002:a05:6214:362:: with SMTP id t2mr642333qvu.64.1632950841307; Wed, 29 Sep 2021 14:27:21 -0700 (PDT) Date: Wed, 29 Sep 2021 14:27:09 -0700 In-Reply-To: <20210929212713.1213476-1-brendanhiggins@google.com> Message-Id: <20210929212713.1213476-2-brendanhiggins@google.com> Mime-Version: 1.0 References: <20210929212713.1213476-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v2 1/5] gcc-plugins/structleak: add makefile var for disabling structleak From: Brendan Higgins To: shuah@kernel.org, davidgow@google.com, arnd@arndb.de, keescook@chromium.org, 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 Cc: 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, Brendan Higgins Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org KUnit and structleak don't play nice, so add a makefile variable for enabling structleak when it complains. Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Brendan Higgins Reviewed-by: David Gow --- Changes since last revision: - None --- scripts/Makefile.gcc-plugins | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins index 952e46876329a..4aad284800355 100644 --- a/scripts/Makefile.gcc-plugins +++ b/scripts/Makefile.gcc-plugins @@ -19,6 +19,10 @@ gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF) \ += -fplugin-arg-structleak_plugin-byref gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL) \ += -fplugin-arg-structleak_plugin-byref-all +ifdef CONFIG_GCC_PLUGIN_STRUCTLEAK + DISABLE_STRUCTLEAK_PLUGIN += -fplugin-arg-structleak_plugin-disable +endif +export DISABLE_STRUCTLEAK_PLUGIN gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK) \ += -DSTRUCTLEAK_PLUGIN From patchwork Wed Sep 29 21:27:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 12526655 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 529D9C433FE for ; Wed, 29 Sep 2021 21:27:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B2B76138E for ; Wed, 29 Sep 2021 21:27:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346607AbhI2V3J (ORCPT ); Wed, 29 Sep 2021 17:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346951AbhI2V3G (ORCPT ); Wed, 29 Sep 2021 17:29:06 -0400 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 509F8C061770 for ; Wed, 29 Sep 2021 14:27:24 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id s10-20020a05621406aa00b003821a333809so9116742qvz.21 for ; Wed, 29 Sep 2021 14:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=cNc6jGThnDjPI1ROaAIDOXBHBBn9Ts0TfXP/c2N4EQM=; b=nXw3HxSp5/gbJuY/9VKOMd5rZ8zWZg+1bd3t6obcZvqMyAjqEvuu/VsFXwfvFdDBXj 4Y5mgz8TDfHMA2MFbUKUu7wOgepF8QOGz55Axa9zrO0m4gUfZPPPD/c1i7qcBY1yxPCE 8m2BF6Ds1jIgEjTeM8DmxQ5kif+7bmMqD6PVbYxyELJRGMRMpZWFq7JBR4G3ay8K5xKD xBG/hW0nBEn6do2u0BObmIwuDDbHR8az7TWLkCuTa4R8THFGK79eX8+ILMyL/n8LSoQl 6bCSvqYE1F3vVP+jP9p1wmpkYmajdeSdc7ioI+zAzxrDb5coKV9M3Hm/J2edqL63zdO5 IBTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=cNc6jGThnDjPI1ROaAIDOXBHBBn9Ts0TfXP/c2N4EQM=; b=AQ4nqvtmurky5a6hNAcOlhndN5kBEzxsgPUp2+zze0M6VkO/5mxNHWGxe84qmxkMtj ZRemCosku1XQtXr+tj3aK2evy2LQFSnuVvl2qkEn/K+sKz+WiHyjbMbaO8vijdAnSwDa +KvoOmalQ5OHWA6J/ZJLuJAPq924YhoB+560RhZUXLwxG5VURExIw+xdX3MrfQ6lMgBP 6SJogmRful8Lj5QojxNvLZmpIrctEzlgdU4QF5P0CIlGKPUnggh/JxaRMIk9irhhRsSd Nm2+fv492pjmBaQDuiQrSUd2W6DEtg+aP/uKFc5jvcrRURoy899RsjZ9Nu6FPIvZqlkS au4A== X-Gm-Message-State: AOAM533Fu2nKHGPTph4JHDNVxYUWgvvIxpcxlec5kI99ZmRJqy2hUAOp sqDNk+k30EPCZ7BYQHVoEXbhZLX6bPxlZD3rhtNusA== X-Google-Smtp-Source: ABdhPJx7qZ1J1thbDsoanP0bIyXW9jDN+YJBHFsBhknKK0oqEnDw16L75o14KW5MsBNjdljYyD/29vAPPuj0wnNt+PjTgQ== X-Received: from mactruck.svl.corp.google.com ([2620:15c:2cb:201:83f4:ff43:90d6:efd3]) (user=brendanhiggins job=sendgmr) by 2002:a05:6214:a6c:: with SMTP id ef12mr578832qvb.2.1632950843457; Wed, 29 Sep 2021 14:27:23 -0700 (PDT) Date: Wed, 29 Sep 2021 14:27:10 -0700 In-Reply-To: <20210929212713.1213476-1-brendanhiggins@google.com> Message-Id: <20210929212713.1213476-3-brendanhiggins@google.com> Mime-Version: 1.0 References: <20210929212713.1213476-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v2 2/5] iio/test-format: build kunit tests without structleak plugin From: Brendan Higgins To: shuah@kernel.org, davidgow@google.com, arnd@arndb.de, keescook@chromium.org, 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 Cc: 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, Brendan Higgins , Jonathan Cameron Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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. Signed-off-by: Brendan Higgins Suggested-by: Arnd Bergmann Reviewed-by: Kees Cook Acked-by: Jonathan Cameron --- Changes since last revision: - None --- 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) From patchwork Wed Sep 29 21:27:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 12526657 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 B4029C4332F for ; Wed, 29 Sep 2021 21:27:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A130D61381 for ; Wed, 29 Sep 2021 21:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346965AbhI2V3L (ORCPT ); Wed, 29 Sep 2021 17:29:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346968AbhI2V3I (ORCPT ); Wed, 29 Sep 2021 17:29:08 -0400 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FDF8C06176F for ; Wed, 29 Sep 2021 14:27:26 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id v14-20020a05620a0f0e00b0043355ed67d1so11234997qkl.7 for ; Wed, 29 Sep 2021 14:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=MW+dGcYoW6OnAGQelBXtE4Ow4ZA6fkyzfNYjYrI2dg0=; b=ehSIGen7rcDV5FoKmyJqv7AM6JzrLJIhOSNSBq7fdf2L6kEUSQYs0bX/ivFr6qHET6 QLbd1hWBvQNs1dSoo3uubM2LfTALNxesitV+57Djw2IRCc9h0QkaVjktF+I6NM6egA5F 7VdVY0kYuzR8EDuWLZFm9OsR/0AE616mFc8hObpExpmlNtSdj3C2DUHL/a3hjIckdOrl aHjNaslvAnV89vbHiR5IG3qvMyQjKdlZlAzGKCwSdRqiZ9Ys6KlWqkXWvX1EJloHkKmb Z9oF87rQd4x+olzmsBe8TBbibQ2RZJOFP7tbj1ypYMxxtGL8bV/cwt/9f4Oy0mBW+j6I gbyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=MW+dGcYoW6OnAGQelBXtE4Ow4ZA6fkyzfNYjYrI2dg0=; b=7s14qk+kpAmekOhHoWuVWxvqRF7MEswKQtpB7L8AnbopAT/XFXh9ZO+MfyyUqW8PXE fc4aWJPDNXis6HcJaDlgzByTWzp+Z1GymB56yNFeGbLQ/I69806xu0lPRVL/0+n9Nx2L mR4uyfy+wN2qZMixrnetYZC7RIj5JJg2uP9JuKpyVHY2VkSfj6BlhvnzcKT1VPX0MWI8 UN4FVhJYFTi4n1hZw/NrGyKF730OHbvVVuO0EbuFKZAa/RdyGPnVfSRP8cHNQbrTkiE8 uX94vHcLWCYztJ1Uivbbn7C6mRadWmkKzrs/WxBQhxQ2FPmStRKEOPqIQ6fUKrHhYGbQ mtYA== X-Gm-Message-State: AOAM532JcrC0mKGeOBe3RwStnsILBPvOOjX9fsmOuDK6Azi9lt0rWuuz jLQOmHRD3NoonxZ1ldiEsG0iaPFoXmYDoZ/Za5SyHA== X-Google-Smtp-Source: ABdhPJwCs0j75saROJYED02fGyd+eJ8PZweJbRLoPXBzHwpSpeXkxhNIY8yNm3Cb1iuATR9LjzK4TsE+hv2/ybSM5bcQ1g== X-Received: from mactruck.svl.corp.google.com ([2620:15c:2cb:201:83f4:ff43:90d6:efd3]) (user=brendanhiggins job=sendgmr) by 2002:a05:6214:1225:: with SMTP id p5mr615132qvv.21.1632950845646; Wed, 29 Sep 2021 14:27:25 -0700 (PDT) Date: Wed, 29 Sep 2021 14:27:11 -0700 In-Reply-To: <20210929212713.1213476-1-brendanhiggins@google.com> Message-Id: <20210929212713.1213476-4-brendanhiggins@google.com> Mime-Version: 1.0 References: <20210929212713.1213476-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v2 3/5] device property: build kunit tests without structleak plugin From: Brendan Higgins To: shuah@kernel.org, davidgow@google.com, arnd@arndb.de, keescook@chromium.org, 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 Cc: 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, Brendan Higgins Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The structleak plugin causes the stack frame size to grow immensely when used with KUnit: ../drivers/base/test/property-entry-test.c:492:1: warning: the frame size of 2832 bytes is larger than 2048 bytes [-Wframe-larger-than=] ../drivers/base/test/property-entry-test.c:322:1: warning: the frame size of 2080 bytes is larger than 2048 bytes [-Wframe-larger-than=] ../drivers/base/test/property-entry-test.c:250:1: warning: the frame size of 4976 bytes is larger than 2048 bytes [-Wframe-larger-than=] ../drivers/base/test/property-entry-test.c:115:1: warning: the frame size of 3280 bytes is larger than 2048 bytes [-Wframe-larger-than=] Turn it off in this file. Signed-off-by: Brendan Higgins Suggested-by: Arnd Bergmann Reviewed-by: Kees Cook --- Changes since last revision: - None --- drivers/base/test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/test/Makefile b/drivers/base/test/Makefile index 64b2f3d744d51..7f76fee6f989d 100644 --- a/drivers/base/test/Makefile +++ b/drivers/base/test/Makefile @@ -2,4 +2,4 @@ obj-$(CONFIG_TEST_ASYNC_DRIVER_PROBE) += test_async_driver_probe.o obj-$(CONFIG_DRIVER_PE_KUNIT_TEST) += property-entry-test.o -CFLAGS_REMOVE_property-entry-test.o += -fplugin-arg-structleak_plugin-byref -fplugin-arg-structleak_plugin-byref-all +CFLAGS_property-entry-test.o += $(DISABLE_STRUCTLEAK_PLUGIN) From patchwork Wed Sep 29 21:27:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 12526659 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 8BF60C433F5 for ; Wed, 29 Sep 2021 21:27:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71DCC6138E for ; Wed, 29 Sep 2021 21:27:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346953AbhI2V3O (ORCPT ); Wed, 29 Sep 2021 17:29:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346979AbhI2V3K (ORCPT ); Wed, 29 Sep 2021 17:29:10 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F55C061772 for ; Wed, 29 Sep 2021 14:27:28 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id b9-20020a5b07890000b0290558245b7eabso5241923ybq.10 for ; Wed, 29 Sep 2021 14:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=aSPV27tjY7pw3PilwZezZx2K/hJgwuA/3Sl9DWnicys=; b=fPAfs9F2RGWNVGNpY1vbd3tw35Qe9d9ADKWh9fz38g1iKJ0vWO4Me6axzgomQy+J0E 7UCuKx3WlPViBCXN4P8hSuxuqAE+EaJ5yP/qs4l/ZcFqqshOaGaK/QLfd8YQPe61LyRL j2hKXNU0v0RAvhMTHJxrKE9f8Ymgyg3jZPF76LQ7QG4Qo4ZQ/NtZUHPuZvVm5WIsatyB NAslu9lhgdS8z/aXqcvQwMBDyKYVYq2jVJr0/tYtDFWPKpOdm5WN70ofY0479ZAMnmwD CMEnGkCVo9IxoRc86KDoqub07ixobnK8MqzFrUW126fKl3cG9U3sqet6+ky1xOHz98xW 6o7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=aSPV27tjY7pw3PilwZezZx2K/hJgwuA/3Sl9DWnicys=; b=aHTF1vxFaDsBHIRjtQuJvgnSLYPiEdNThlWqM3FabJ/+Kc3aph+FNFdjRX7Wu/gM4c cmqSuegiPd/UOFBUk46HamHDdJpR4G+zyzJCg2LA0Wsp0pTjPaHOenDMl8pfXe92eXVw Kjw2dia1JVLr5tCWtNhmkfBttrxEr6c0Ro3NIKSqJrgHsKJhzftAYjcsWJGwmD8VN1uC wNEL9OHcx+ifG+jyL5BBk4IE8LwS5gr7L9j0H423lB54dN+ZKm9OTtMoystpSSy0rdfi TrlCNDxKIp2UkQQuSY/XrOf7Az1+a9UHIYodPqbW6ZV7mYK1gnLWk/ZI1xaAmfLXIB5U CU/A== X-Gm-Message-State: AOAM531JQRWGjqpUjbI7uaQwyT8ZXMTC8Rk/Ob16+k76d1BmslVzkwGB 3B+cc4JYJETshZdNGBzd/xV8NZnkuj0xvOnJWVPElQ== X-Google-Smtp-Source: ABdhPJyErlGQvS1CYKbsC/V+OsCpTku3TIuMCkUAL4Jzl/iLJIZy1pCIolM/CMAW6C7Qj4FovUZKq9AhydHyU4IWOMESYQ== X-Received: from mactruck.svl.corp.google.com ([2620:15c:2cb:201:83f4:ff43:90d6:efd3]) (user=brendanhiggins job=sendgmr) by 2002:a25:6610:: with SMTP id a16mr2493812ybc.193.1632950847837; Wed, 29 Sep 2021 14:27:27 -0700 (PDT) Date: Wed, 29 Sep 2021 14:27:12 -0700 In-Reply-To: <20210929212713.1213476-1-brendanhiggins@google.com> Message-Id: <20210929212713.1213476-5-brendanhiggins@google.com> Mime-Version: 1.0 References: <20210929212713.1213476-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v2 4/5] thunderbolt: build kunit tests without structleak plugin From: Brendan Higgins To: shuah@kernel.org, davidgow@google.com, arnd@arndb.de, keescook@chromium.org, 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 Cc: 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, Brendan Higgins Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The structleak plugin causes the stack frame size to grow immensely when used with KUnit: drivers/thunderbolt/test.c:1529:1: error: the frame size of 1176 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Turn it off in this file. Linus already split up tests in this file, so this change *should* be redundant now. Signed-off-by: Brendan Higgins Suggested-by: Arnd Bergmann Acked-by: Mika Westerberg Reviewed-by: Kees Cook --- Changes since last revision: - None --- drivers/thunderbolt/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thunderbolt/Makefile b/drivers/thunderbolt/Makefile index da19d7987d005..78fd365893c13 100644 --- a/drivers/thunderbolt/Makefile +++ b/drivers/thunderbolt/Makefile @@ -7,6 +7,7 @@ thunderbolt-objs += usb4_port.o nvm.o retimer.o quirks.o thunderbolt-${CONFIG_ACPI} += acpi.o thunderbolt-$(CONFIG_DEBUG_FS) += debugfs.o thunderbolt-${CONFIG_USB4_KUNIT_TEST} += test.o +CFLAGS_test.o += $(DISABLE_STRUCTLEAK_PLUGIN) thunderbolt_dma_test-${CONFIG_USB4_DMA_TEST} += dma_test.o obj-$(CONFIG_USB4_DMA_TEST) += thunderbolt_dma_test.o From patchwork Wed Sep 29 21:27:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 12526661 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 90C9DC433EF for ; Wed, 29 Sep 2021 21:27:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C7AC61278 for ; Wed, 29 Sep 2021 21:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347038AbhI2V3S (ORCPT ); Wed, 29 Sep 2021 17:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346962AbhI2V3O (ORCPT ); Wed, 29 Sep 2021 17:29:14 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08BC8C06177A for ; Wed, 29 Sep 2021 14:27:31 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 124-20020a251182000000b005a027223ed9so5197395ybr.13 for ; Wed, 29 Sep 2021 14:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=08MMqZQxkHJyz/VF+8d0XPyGY6ToAo0OA/OmmtaYHyg=; b=Xc0r7XDhQk/RWJL3VJzgIR6Z34QQY3yA7gfvyI2MR/G/ctI7q+99DthyY5LlcWg2e7 yNZKWxRGgPdrPrKcdjVGfuLYpgUyyaxc9QM+cEdXLZO7cGIBk81SomjCOBT5pFHhS50s c6xbphtTxJebvIq+LQjYxHjM/EiPRt3x+0CttaNT3TVpxgt96Nx34le5hdAMHS1ggHKu uoCMduNUutZNaLiuUGpfAGsoSYuT04gWEbTvHxWTQXG9vA1xAV4uphxEGXqqwOYkP7G9 Czl8saVkvd0Wswmv2h2fMTdekMv294gEiwyuHMbzXc/Mvk4eKvpBG3Q+5f1Pbd2ghoD/ m3kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=08MMqZQxkHJyz/VF+8d0XPyGY6ToAo0OA/OmmtaYHyg=; b=lcz1PaaoTMGp0CPfqMDcr0FiEp+lPpcFzS66G64M4NkISzgNjzx+Xs+jQ294vcS+aO 3hUxtCOIm0YTPSlsKPC7zByIXHQUpMgs3/hlWoazdP9s4B0npDrBYnSgEQfSq4dABlDD +4x6nUI/xDdkp24ew5o27BYAO5ELXIBIuYv0GAE7oZ+d/6F11UZ0N8Wjhi6VA/aRsnoy 9PAK0xpOzFfG+hP3/sS+eThB2XxKn+9+9muKuR4NrMQC0zA9dIl1FK8oRtz2b6SJN6rt GmWlrpPKxcNxgPcuVQB9yc6XTne9wixpu1v5NnZJ8WU81+SHlx5agU07hx08YD5qob90 v6fQ== X-Gm-Message-State: AOAM532VmLriDWtZIfAekJZFBGW23sfJwwdjgPD96kaN8hQKjwvr9vf8 HlDEjc+indeL32QesYBo3vR7VHvXWMQpDEHagj/p7A== X-Google-Smtp-Source: ABdhPJydtA3evA/mok1g6x4rh7TZpUEjkOozHd/KU5sU/LKW6mja59yYtNHfsoGoBJBqAHbTDyWHKtYkEMdXaZ/OgKddcA== X-Received: from mactruck.svl.corp.google.com ([2620:15c:2cb:201:83f4:ff43:90d6:efd3]) (user=brendanhiggins job=sendgmr) by 2002:a25:1584:: with SMTP id 126mr2372236ybv.126.1632950850186; Wed, 29 Sep 2021 14:27:30 -0700 (PDT) Date: Wed, 29 Sep 2021 14:27:13 -0700 In-Reply-To: <20210929212713.1213476-1-brendanhiggins@google.com> Message-Id: <20210929212713.1213476-6-brendanhiggins@google.com> Mime-Version: 1.0 References: <20210929212713.1213476-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v2 5/5] bitfield: build kunit tests without structleak plugin From: Brendan Higgins To: shuah@kernel.org, davidgow@google.com, arnd@arndb.de, keescook@chromium.org, 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 Cc: 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, Brendan Higgins Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Arnd Bergmann The structleak plugin causes the stack frame size to grow immensely: lib/bitfield_kunit.c: In function 'test_bitfields_constants': lib/bitfield_kunit.c:93:1: error: the frame size of 7440 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Turn it off in this file. Signed-off-by: Arnd Bergmann Signed-off-by: Brendan Higgins Reviewed-by: Kees Cook --- Changes since last revision: - Dropped -Wframe-larger-than=10240 from CFLAGS. --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 5efd1b435a37c..a841be5244ac6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -351,7 +351,7 @@ obj-$(CONFIG_OBJAGG) += objagg.o obj-$(CONFIG_PLDMFW) += pldmfw/ # KUnit tests -CFLAGS_bitfield_kunit.o := $(call cc-option,-Wframe-larger-than=10240) +CFLAGS_bitfield_kunit.o := $(DISABLE_STRUCTLEAK_PLUGIN) obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o