OSDN Git Service

s390/vdso: add minimal compat vdso
authorSven Schnelle <svens@linux.ibm.com>
Fri, 25 Jun 2021 12:50:08 +0000 (14:50 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 8 Jul 2021 13:37:28 +0000 (15:37 +0200)
commit779df2248739b6308c03b354c99e4c352141e3bc
tree952ac56aee397e3d16bdecf4e4d9afa866b48978
parent43e1f76b0b69b86b2175ef755243e61fe40c75db
s390/vdso: add minimal compat vdso

Add a small vdso for 31 bit compat application that provides
trampolines for calls to sigreturn,rt_sigreturn,syscall_restart.
This is requird for moving these syscalls away from the signal
frame to the vdso. Note that this patch effectively disables
CONFIG_COMPAT when using clang to compile the kernel. clang
doesn't support 31 bit mode.

We want to redirect sigreturn and restart_syscall to the vdso. However,
the kernel cannot parse the ELF vdso file, so we need to generate header
files which contain the offsets of the syscall instructions in the vdso
page.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
16 files changed:
arch/s390/Kconfig
arch/s390/Makefile
arch/s390/include/asm/elf.h
arch/s390/include/asm/vdso.h
arch/s390/include/asm/vdso/gettimeofday.h
arch/s390/kernel/Makefile
arch/s390/kernel/vdso.c
arch/s390/kernel/vdso32/.gitignore [new file with mode: 0644]
arch/s390/kernel/vdso32/Makefile [new file with mode: 0644]
arch/s390/kernel/vdso32/gen_vdso_offsets.sh [new file with mode: 0755]
arch/s390/kernel/vdso32/note.S [new file with mode: 0644]
arch/s390/kernel/vdso32/vdso32.lds.S [new file with mode: 0644]
arch/s390/kernel/vdso32/vdso32_wrapper.S [new file with mode: 0644]
arch/s390/kernel/vdso32/vdso_user_wrapper.S [new file with mode: 0644]
arch/s390/kernel/vdso64/Makefile
arch/s390/kernel/vdso64/gen_vdso_offsets.sh [new file with mode: 0755]