From patchwork Fri Sep 17 06:11:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 12537735 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=-26.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, 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,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 DFD6DC433F5 for ; Fri, 17 Sep 2021 06:11:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC36E60F46 for ; Fri, 17 Sep 2021 06:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245135AbhIQGM7 (ORCPT ); Fri, 17 Sep 2021 02:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245097AbhIQGMz (ORCPT ); Fri, 17 Sep 2021 02:12:55 -0400 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528F7C0613CF for ; Thu, 16 Sep 2021 23:11:33 -0700 (PDT) Received: by mail-qv1-xf49.google.com with SMTP id u6-20020ad449a6000000b003798010ad14so87304227qvx.10 for ; Thu, 16 Sep 2021 23:11:33 -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=09xEzYT+gOEMXKux86y0OboJKHhnFsj7tooXascaZws=; b=idTj1foInP1ZjiSa8tzyXsAbvISX9h8D2okHQm47jLNzxI/gnljnhVQYgRp7gVyxij CsbzwRxgqhnisizhrS+yfMH6UHQ4fCv6XeCSCXXwKBm8fIy/regcyzobSzoURswbI015 EhQaKFRWM6aq6l5B15meILrewxbaU6yp3g2Nl/72UnbQCanMYa7JpZscbFct1T1qwgHw WQJVUe+4dvGKD1YQH+pOx77QCpeyZep2k1EX0iFtXgeHezV2k7OgPXfN3EKXyp8yiBcw v4zOLgOsvCuCahcjEDuwXB5WMCghprYxDyANJW8IiN3wz2UXia2L39Jl4z728eSWNBky tuvA== 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=09xEzYT+gOEMXKux86y0OboJKHhnFsj7tooXascaZws=; b=2l0Gqf7EaaYwfAWpwU6Ja3Xb78ic3ipLWpDk6EaMLbNbGHffKTkS9vuWXEsjwtynB7 MbqtGhHN6er+X9Nmm/oyLlxTEdO9r8Mqkg23UgDVjY7Btrf+MkmfXiT5LlXKIm3/DPK/ Qh2XSmZm11WvfU0PI+JjnBX6MlmAaFTtNjO+OjNXkmJszSv8IZJEsVZqAtPaj/7wHqKh QOy4D0evpGEGyIXYO4Bx6zTzMWPz7NKRfEDXJc6SZ/EKpLhS+U1S6kvrhxwC9ZJ7+/fZ MMRN4ddS2LoBOUbAunPHlwErO1XyRt8Ay/+wC9tRYf8C2NVEe1OCE4bf3XQEJ1ZziSrC 3EyA== X-Gm-Message-State: AOAM530Z9vSgy4y+cmOB2LUnnwNO6PSXeIWsnEdWj1PQtql6V54jVgKe nnp5qNoWoIPjQdZRWFAzDG54S+TWnDsep9D5Gg+FhA== X-Google-Smtp-Source: ABdhPJypRsw47dQReFc9GVfIgcLEvPuWKVLfs9Zkoz23e3pfAoJ7NFelyWt9aLLvWQZohalclJUd3bgYSnBd8nu1IvZJKA== X-Received: from mactruck.svl.corp.google.com ([2620:15c:2cb:201:4845:43ba:3ff5:2de1]) (user=brendanhiggins job=sendgmr) by 2002:a25:d747:: with SMTP id o68mr11675107ybg.488.1631859092480; Thu, 16 Sep 2021 23:11:32 -0700 (PDT) Date: Thu, 16 Sep 2021 23:11:01 -0700 In-Reply-To: <20210917061104.2680133-1-brendanhiggins@google.com> Message-Id: <20210917061104.2680133-4-brendanhiggins@google.com> Mime-Version: 1.0 References: <20210917061104.2680133-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog Subject: [PATCH v1 3/6] 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-hardening@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. Co-developed-by: Arnd Bergmann Signed-off-by: Brendan Higgins Reviewed-by: Kees Cook --- 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)