]> git.baikalelectronics.ru Git - kernel.git/commit
s390/entry: add support for syscall stack randomization
authorSven Schnelle <svens@linux.ibm.com>
Thu, 29 Apr 2021 09:14:51 +0000 (11:14 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 30 Apr 2021 15:20:39 +0000 (17:20 +0200)
commit892b3cf6e0046daf390b1371e9392df631545032
tree07224dd0189f8d3d63f1582a3ef7850250d884d0
parentb6ed858ca552882f1d8981b7bf9539c897333998
s390/entry: add support for syscall stack randomization

This adds support for adding a random offset to the stack while handling
syscalls. The patch uses get_tod_clock_fast() as this is considered good
enough and has much less performance penalty compared to using
get_random_int(). The patch also adds randomization in pgm_check_handler()
as the sigreturn/rt_sigreturn system calls might be called from there.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Link: https://lore.kernel.org/r/20210429091451.1062594-1-svens@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/Kconfig
arch/s390/include/asm/entry-common.h
arch/s390/kernel/syscall.c
arch/s390/kernel/traps.c