[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMGh3QqB4eNsUjf5@pathway.suse.cz>
Date: Wed, 10 Sep 2025 18:05:49 +0200
From: Petr Mladek <pmladek@...e.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
John Ogness <john.ogness@...utronix.de>,
Arnd Bergmann <arnd@...db.de>,
Dan Carpenter <dan.carpenter@...aro.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Kees Cook <kees@...nel.org>,
"Gustavo A . R . Silva" <gustavoars@...nel.org>,
David Gow <davidgow@...gle.com>, Arnd Bergmann <arnd@...nel.org>,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3] printk: kunit: support offstack cpumask
On Tue 2025-09-02 16:03:26, Petr Mladek wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> For large values of CONFIG_NR_CPUS, the newly added kunit test fails
> to build:
>
> kernel/printk/printk_ringbuffer_kunit_test.c: In function 'test_readerwriter':
> kernel/printk/printk_ringbuffer_kunit_test.c:279:1: error: the frame size of 1432 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
>
> Change this to use cpumask_var_t and allocate it dynamically when
> CONFIG_CPUMASK_OFFSTACK is set.
>
> The variable has to be released via a KUnit action wrapper so that it is
> freed when the test fails and gets aborted. The parameter type is hardcoded
> to "struct cpumask *" because the macro KUNIT_DEFINE_ACTION_WRAPPER()
> does not accept an array. But the function does nothing when
> CONFIG_CPUMASK_OFFSTACK is not set anyway.
>
> Fixes: 5ea2bcdfbf46 ("printk: ringbuffer: Add KUnit test")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> [pmladek@...e.com: Correctly handle allocation failures and freeing using KUnit test API.]
> Signed-off-by: Petr Mladek <pmladek@...e.com>
JFYI, this patch have been committed into printk/linux.git,
branch rework/ringbuffer-kunit-test.
It worked, I did it according to the feedback. Let's give
it some spin in linux-next before the next merge window.
Feel free to ask me to revert it, ...
Best Regards,
Petr
Powered by blists - more mailing lists