]> git.baikalelectronics.ru Git - kernel.git/commit
s390/vdso: filter out -mstack-guard and -mstack-size
authorSven Schnelle <svens@linux.ibm.com>
Thu, 11 Nov 2021 09:58:26 +0000 (10:58 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 16 Nov 2021 11:29:19 +0000 (12:29 +0100)
commit429f9ea4365d37dcdb7d58364105074eadcde796
tree15e458607b3029c418c73bbc933ed29d63e8c825
parentd3336c7808babfc4beea91c1e6655869a349c918
s390/vdso: filter out -mstack-guard and -mstack-size

When CONFIG_VMAP_STACK is disabled, the user can enable CONFIG_STACK_CHECK,
which adds a stack overflow check to each C function in the kernel. This is
also done for functions in the vdso page. These functions are run in user
context and user stack sizes are usually different to what the kernel uses.
This might trigger the stack check although the stack size is valid.
Therefore filter the -mstack-guard and -mstack-size flags when compiling
vdso C files.

Cc: stable@kernel.org # 5.10+
Fixes: f26ccfb7b18d ("s390: convert to GENERIC_VDSO")
Reported-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/Makefile
arch/s390/kernel/vdso64/Makefile