Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2258053pxb; Fri, 17 Sep 2021 06:02:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPbCukju7iFeyxU7Xzcsoynsn5OVditRGeBKfVlcYnraWZk/RkSMT5YS2WWVsAQeCiIkvA X-Received: by 2002:a05:6638:2405:: with SMTP id z5mr8686258jat.124.1631883776780; Fri, 17 Sep 2021 06:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631883776; cv=none; d=google.com; s=arc-20160816; b=xDm5kgL52vQFdW0kNMpL4raXtRkiLSa2SRadzYNXofMJa/cRI+/+TcwYDvE/F07fNn qB0hqY6k6vO3R1vxHfONT41qqIOl/KWSLlVuRtsh6Uc3ADBjO9GaGN98qDi/2BOYkGdO NarIQmsNbrfWrLn0gSFRll6SE4rfe1At6REL+YsAg3ha66OBue7xoGpLJmeXF7cToJce 4o+SRWW4lvMoZ9sVwZM6YJ+HOX2h8mJiHgmnlgS47vD2sIBxa+otvOEoCZBcX3U868Kg MfloiBOfwhyveQPZs1deNr2ExLb8XSTS3xQIiNanqgs4YMXbol1KSfVMA3VBpV9u0Uni j7KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=2dWLC2BFOss+Dk704nAdNLieC0MzpoSjCiCOExEgSGw=; b=xOF2aHcxaReWvW21yvaR1oTXZSyXCXHtkIbiApCrgJJimAbSqDC4awecsfx96dDUmR cH1nww+ce0YAuO4UQe/L7DK3bfSxelTkagxhmw8m7G5xW7l4+GogzF2LM3QCvTE4vxMd CICTKNpJnRGhwL0Bkscwu/uoKvkyyqzFMFiZjmG45smwHYpdyIerUOx/ZlbvDUYCWnkJ Bux6SVndz4p6YYrAuKmLZRiyOhmN4Rb3kOXadqza7cZi/2ZT+mXEVOFVbM76AYBETJK5 A9gHvvNoP7IrKLpALKz7t7YpbkJ8J7Xwn71wEiO6OKs64tW7DmadYfMWRRWtJ0h9J7VY QKHA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m33si5061743jaf.66.2021.09.17.06.02.37; Fri, 17 Sep 2021 06:02:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241374AbhIQHjv (ORCPT + 99 others); Fri, 17 Sep 2021 03:39:51 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:39869 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241219AbhIQHjt (ORCPT ); Fri, 17 Sep 2021 03:39:49 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N4i7l-1mrMEX1B39-011fzs; Fri, 17 Sep 2021 09:38:26 +0200 Received: by mail-wm1-f44.google.com with SMTP id j134-20020a1c238c000000b0030b32367649so2847100wmj.3; Fri, 17 Sep 2021 00:38:25 -0700 (PDT) X-Gm-Message-State: AOAM5329Gb+ssnvXdH6heWdrpkJrTgtyGZf9WsbMqUt834XsUrgm+rxv hDbfhWuOcLY6tPc4svV17GmuQ/VYhu59DCu8OH0= X-Received: by 2002:a1c:7413:: with SMTP id p19mr8990196wmc.98.1631864305564; Fri, 17 Sep 2021 00:38:25 -0700 (PDT) MIME-Version: 1.0 References: <20210917061104.2680133-1-brendanhiggins@google.com> In-Reply-To: <20210917061104.2680133-1-brendanhiggins@google.com> From: Arnd Bergmann Date: Fri, 17 Sep 2021 09:38:09 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 0/6] kunit: build kunit tests without structleak plugin To: Brendan Higgins Cc: Shuah Khan , David Gow , Arnd Bergmann , 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" X-Provags-ID: V03:K1:8igt7gSCPa6W3i8e60BRlnHtEl3QLqROvP2iyXqGUxh9JjbZsya YOaky9kf1Z103GywzFAUeR7J7/q3zN3dwsOIil6WaIJcddqZDBmpVy5lEde5P/6vdR9Ecax RAflHp7t6feK1wbEO3TbUmIB2JF1DXQzxa7nCxtD5gvuXtwzF3XCXyRaqFQJTMbL8BFi83B c+On9PdB6Mw3L6t3AL4Gw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:MTx620soU1A=:zwxZqn0uhqEr29Vzm2xKd7 HbGFGLmUB8Fyd97OaZAEvOLFES+LAkYe2uRiZ8JKz+VOoJcL9sjY07kk6u9Qw2GhZRLfR8khr OkhmDgxaiUrNA1eOkAQQtyS7wwjP3dxpN72SiXOxalJHdhn6Xp9QaUqes6OVgK6W8eslCwk1+ 0ws7QftXW71rdRgA6lE4yjfOMd8UXGoxfihA/HA8ZJMizMXUP7gxdXTCWUoMPyW+cWQe0viaY VAONw7BiGUGOg/Lab+ejI/XT2ot+JZ81tk51S1Np1H0meXOZza+nYm4MZQVpLMc0tUQ+rNaa4 JogkHWN+ga4za1pm1qgYdaKTq32+MHCYukDc4M3IIRcvrveaF7l5fPEocmLHjp+D4PYVsuY/N +4WqCgE54w8cvQhlyPSoDtYmCu1vbROd1jNQXrv1v55bqaPuSPKZAmTX+a3Z5TTP2p39Aas5f JPUkM5fjJcawL395lRUylcbgXwY+BDc3wh1Dh0bf/FwFyf6SdIvFCbN6WHnjMvHPxA6zWc3sb o7OxFo0zrC7oQoTdTzGp5oWGokdXNF6PSlwq8mjn0WKvMzKAn1Y7SNm7gQeZCDjpwVMLhhKec xMyKhKqdHw30dmrEC5nSQMzVTkZgL/63jkDKGcopG6+NwcojOdjMJITp7p8oXSq4eC7ofJ7wj m43vCNnd1kJ+x4S7gU6ryr7iOJFwvIahFxpiBF4dURwIWFRBayL7+ObAWBwRbYLYgYk/lyvfT pYv2NaddWqsqr3gys9VpWZRk4RFQmimu4wrEsEFbDV4+MVNLdhyUkDBs2kfKiAeHFt5hpxEe9 FX36ZULmCuk9K+BQhU5AUSNJSBIJUoLSFMr9js5G6SdiJEWFwvPcykykqdXINyTLTUPfhznCV 2MP77ZLr7QbEOjoSHwFQ== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 17, 2021 at 8:10 AM Brendan Higgins wrote: > > The structleak plugin causes the stack frame size to grow immensely when > used with KUnit; this is caused because KUnit allocates lots of > moderately sized structs on the stack as part of its assertion macro > implementation. For most tests with small to moderately sized tests > cases there are never enough KUnit assertions to be an issue at all; > even when a single test cases has many KUnit assertions, the compiler > should never put all these struct allocations on the stack at the same > time since the scope of the structs is so limited; however, the > structleak plugin does not seem to respect the compiler doing the right > thing and will still warn of excessive stack size in some cases. > > These patches are not a permanent solution since new tests can be added > with huge test cases, but this serves as a stop gap to stop structleak > from being used on KUnit tests which will currently result in excessive > stack size. > > Of the following patches, I think the thunderbolt patch may be > unnecessary since Linus already fixed that test. Additionally, I was not > able to reproduce the error on the sdhci-of-aspeed test. Nevertheless, I > included these tests cases for completeness. Please see my discussion > with Arnd for more context[1]. > > NOTE: Arnd did the legwork for most of these patches, but did not > actually share code for some of them, so I left his Signed-off-by off of > those patches as I don't want to misrepresent him. Arnd, please sign off > on those patches at your soonest convenience. Thanks a lot for picking up this work where I dropped the ball. Patches 1-5 look good to me, and I replied on one remaining issue I see with patch 6. I think you did more work on these that I did, by doing a nice write-up and splitting them into separate patches with useful changelogs, you should keep authorship, and just change my S-o-b to Suggested-by. If you prefer to keep me as the author, then the correct way would be to commit them with --author= to ensure that the author and first s-o-b match. Arnd