]> 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)
commit8e39b3ba4aec417aa0551ae7ec1abc21dbbf9c36
tree15e458607b3029c418c73bbc933ed29d63e8c825
parent6582909acd0c1bf7e037c8807fa2bc22fb19ab37
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: 45ce54937694 ("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