diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2021-06-25 14:50:08 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2021-07-08 15:37:28 +0200 |
commit | 779df2248739b6308c03b354c99e4c352141e3bc (patch) | |
tree | 952ac56aee397e3d16bdecf4e4d9afa866b48978 /arch/s390/Makefile | |
parent | s390/vdso: rename VDSO64_LBASE to VDSO_LBASE (diff) | |
download | linux-779df2248739b6308c03b354c99e4c352141e3bc.tar.xz linux-779df2248739b6308c03b354c99e4c352141e3bc.zip |
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>
Diffstat (limited to 'arch/s390/Makefile')
-rw-r--r-- | arch/s390/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 098abe3a56f3..95c75e653e43 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -166,6 +166,19 @@ archheaders: archprepare: $(Q)$(MAKE) $(build)=$(syscalls) kapi $(Q)$(MAKE) $(build)=$(tools) kapi +ifeq ($(KBUILD_EXTMOD),) +# We need to generate vdso-offsets.h before compiling certain files in kernel/. +# In order to do that, we should use the archprepare target, but we can't since +# asm-offsets.h is included in some files used to generate vdso-offsets.h, and +# asm-offsets.h is built in prepare0, for which archprepare is a dependency. +# Therefore we need to generate the header after prepare0 has been made, hence +# this hack. +prepare: vdso_prepare +vdso_prepare: prepare0 + $(Q)$(MAKE) $(build)=arch/s390/kernel/vdso64 include/generated/vdso64-offsets.h + $(if $(CONFIG_COMPAT),$(Q)$(MAKE) \ + $(build)=arch/s390/kernel/vdso32 include/generated/vdso32-offsets.h) +endif # Don't use tabs in echo arguments define archhelp |