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 140E1C433EF for ; Wed, 29 Sep 2021 21:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF4866137A for ; Wed, 29 Sep 2021 21:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345448AbhI2VGZ (ORCPT ); Wed, 29 Sep 2021 17:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237657AbhI2VGY (ORCPT ); Wed, 29 Sep 2021 17:06:24 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01126C061766 for ; Wed, 29 Sep 2021 14:04:41 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id me1so2591143pjb.4 for ; Wed, 29 Sep 2021 14:04:41 -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; bh=FurABvQrnW7SVwUVRUJVf5Azv+RVGAv+gR3wBDsauaI=; b=rpuh4Cn9psRPurHAZOwfwzZdIMhLn3EI2hZI6OkxWUQ9wr7PoYy17LA/S2hdC0molh x7naFVL8ORxyHvk6XU8Urpy4rEKfbkzmh/bHAXpJKlxN4aNQc9RA3Qz8rhTFdCkXHK11 6nHk0J9aEvF0lxamc/+wIh6SCR984r4cRANMeCx8ff/uH+27rSh6w7khjk1zI0WTGwvG eGJMmselLZ/VfaB1jkfuvALphegy0dJH9YWLozgw9tnU+rXQwegYkIkgiBnPsyPIYdbf Qyw7am/MQOgdU7U/vre/ki6YRt0cJ8Lp5QBk+d21tZ0+8atwOc3EPdtZNcc3cJBo1pkr m1hw== 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; bh=FurABvQrnW7SVwUVRUJVf5Azv+RVGAv+gR3wBDsauaI=; b=UWDANqcvt3ccm8KGwDACzieEURRQDr6eFFLJqthw8Z2tk3sTgc163WXSma+C5tig2Y Uk8lNhbpblObJjsXAeHqOZ3k09SK8s7hZRFIKCbyfWp1sfaUuRDKRxbZ8IkQKovvvpD7 TD2pkS5Tvx3dzlcN+XJ6SYT0XOJqhkIZ9nkmiqOv/6QYTI+5BwuCYSrOPIxhcJr9mnO5 uSvfVvYdk+2QMlRaouvop4Jl2LVOG/9Jtnlc+ZsyPOvczdpSYHQXHqf0QFhg/E/OuEKT BwY42oOkFKkJpzJoLIF+ufDsxJGBAIOST4clUiih5DpdRvCakEl/fSxsFosUxXjJ9KHu RLcA== X-Gm-Message-State: AOAM532YdNHWMSBFzKObMTfdYwVndJPbVkop6L9dVK18RtccfPmMZ0fJ je97BylCDb/0On+sges9ig6Vd5u9mR99KdWNEf8aAw== X-Google-Smtp-Source: ABdhPJzOhQy/gGu8lMtKb8M0sjvDqwDEJ/je0DS9bogbfQiprbFdAgdaZ7mgV7duq5hHM60hS4aDncf0veJTFvsVTxc= X-Received: by 2002:a17:90b:3108:: with SMTP id gc8mr8437024pjb.63.1632949481073; Wed, 29 Sep 2021 14:04:41 -0700 (PDT) MIME-Version: 1.0 References: <20210917061104.2680133-1-brendanhiggins@google.com> <20210917061104.2680133-7-brendanhiggins@google.com> In-Reply-To: From: Brendan Higgins Date: Wed, 29 Sep 2021 14:04:30 -0700 Message-ID: Subject: Re: [PATCH v1 6/6] bitfield: build kunit tests without structleak plugin To: Arnd Bergmann Cc: Shuah Khan , David Gow , Kees Cook , Rafael Wysocki , Jonathan Cameron , Lars-Peter Clausen , Ulf Hansson , andreas.noever@gmail.com, michael.jamet@intel.com, Mika Westerberg , yehezkelshb@gmail.com, Masahiro Yamada , Michal Marek , Nick Desaulniers , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Kernel Mailing List , Linus Torvalds , gregkh , linux-iio@vger.kernel.org, linux-mmc , USB list , linux-hardening@vger.kernel.org, Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org On Fri, Sep 17, 2021 at 12:22 AM Arnd Bergmann wrote: > > On Fri, Sep 17, 2021 at 8:11 AM Brendan Higgins > wrote: > > > > 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 > > --- > > lib/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/Makefile b/lib/Makefile > > index 5efd1b435a37c..c93c4b59af969 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 := $(call cc-option,-Wframe-larger-than=10240) $(DISABLE_STRUCTLEAK_PLUGIN) > > I think the $(call cc-option,-Wframe-larger-than=10240) needs to be dropped > here. This was not in my original patch and it is definitely broken on Ah, someone else put that there, so I just left it, but I can drop it. > all architectures > with 8KB stack size or less if the function needs that much. What is the amount > of actual stack usage you observe without this? Well STRUCTLEAK claims 7440 bytes, but I don't entirely believe that. Regardless, it is definitely less than 8KB. > If we still get a warning, then > I think this needs to be fixed in the code. > > Arnd Cheers