[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80b7dbc9-0c09-197f-0f40-ab92d2e3fe3c@de.ibm.com>
Date: Wed, 15 Sep 2021 11:02:03 +0200
From: Christian Borntraeger <borntraeger@...ibm.com>
To: Guenter Roeck <linux@...ck-us.net>,
Heiko Carstens <hca@...ux.ibm.com>
Cc: Vasily Gorbik <gor@...ux.ibm.com>, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] s390: Add WARN_DYNAMIC_STACK dependencies
On 15.09.21 06:40, Guenter Roeck wrote:
> s390:allmodconfig fails to build with the following errors.
>
> arch/s390/kernel/syscall.c: In function '__do_syscall':
> arch/s390/kernel/syscall.c:168:1: error:
> '__do_syscall' uses dynamic stack allocation
>
> lib/test_kasan.c: In function 'kasan_alloca_oob_right':
> lib/test_kasan.c:782:1: error:
> 'kasan_alloca_oob_right' uses dynamic stack allocation
>
> lib/test_kasan.c: In function 'kasan_alloca_oob_left':
> lib/test_kasan.c:767:1: error:
> 'kasan_alloca_oob_left' uses dynamic stack allocation
>
> The first error is seen if RANDOMIZE_KSTACK_OFFSET_DEFAULT,
> WARN_DYNAMIC_STACK, and WERROR are enabled. The other problems
> are seen if KASAN_KUNIT_TEST, WARN_DYNAMIC_STACK, and WERROR
> are enabled.
>
> It does not make sense to abort a build in that situation.
> If either RANDOMIZE_KSTACK_OFFSET_DEFAULT or KASAN_KUNIT_TEST
> is enabled, dynamic stack allocation is on purpose and should
> not fail the build. Add dependencies to reflect that situation.
>
Thanks for the patch. I think Heiko (on vacation) has a patch to
get rid of this config alltogether, which is probably the better
solution.
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> arch/s390/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index 2bd90c51efd3..776b730e2d15 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -688,6 +688,7 @@ config STACK_GUARD
> config WARN_DYNAMIC_STACK
> def_bool n
> prompt "Emit compiler warnings for function with dynamic stack usage"
> + depends on !WERROR || (!RANDOMIZE_KSTACK_OFFSET_DEFAULT && !KASAN_KUNIT_TEST)
> help
> This option enables the compiler option -mwarn-dynamicstack. If the
> compiler supports this options generates warnings for functions
>
Powered by blists - more mailing lists