s390: Add WARN_DYNAMIC_STACK dependencies
PATCH 1/1 s390: Add WARN_DYNAMIC_STACK dependencies
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.
--- arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/s390/Kconfig +1 -0
@@ -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
Signature · 1 line
2.33.0
Quoted 19 lines · Guenter Roeck
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 allocationThe first error is seen if
RANDOMIZE_KSTACK_OFFSET_DEFAULT,WARN_DYNAMIC_STACK, and WERROR are enabled. The other problems are seen ifKASAN_KUNIT_TEST,WARN_DYNAMIC_STACK, and WERROR are enabled.
Quoted 5 lines
It does not make sense to abort a build in that situation. If either
RANDOMIZE_KSTACK_OFFSET_DEFAULTorKASAN_KUNIT_TESTis 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.
Quoted 18 lines
Signed-off-by Guenter Roeck <[email protected]>--- arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/s390/Kconfig +1
-0@@ -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
Quoted 28 lines · Christian Borntraeger
Quoted 19 lines · Guenter Roeck
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 allocationThe first error is seen if
RANDOMIZE_KSTACK_OFFSET_DEFAULT,WARN_DYNAMIC_STACK, and WERROR are enabled. The other problems are seen ifKASAN_KUNIT_TEST,WARN_DYNAMIC_STACK, and WERROR are enabled.Quoted 5 lines
It does not make sense to abort a build in that situation. If either
RANDOMIZE_KSTACK_OFFSET_DEFAULTorKASAN_KUNIT_TESTis enabled, dynamic stack allocation is on purpose and should not fail the build. Add dependencies to reflect that situation.
Quoted 4 lines
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.
I did consider that, but concluded that this would be something a maintainer should do and went with what I thought was the least invasive method. I did check the various mailing lists for other patches, but I did not find anything there. Sorry if I missed it.
Guenter
Vasily Gorbik
maintainerQuoted 9 lines · Guenter Roeck
Quoted 4 lines
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.
I did consider that, but concluded that this would be something a maintainer should do and went with what I thought was the least invasive method. I did check the various mailing lists for other patches, but I did not find anything there. Sorry if I missed it.
Sorry, we could have been more transparent with our patch queue. The patch is from Monday and with our regular ci/qa queue delay it is now on fixes branch: