mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-04 00:03:25 -04:00
s390/vdso64: add sigreturn,rt_sigreturn and restart_syscall
Add minimalistic trampolines to vdso64 so we can return from signal without using the stack which requires pgm check handler hacks when NX is enabled. restart_syscall will be called from vdso to work around the architectural limitation that the syscall number might be encoded in the svc instruction, and therefore can not be changed. 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>
This commit is contained in:
parent
d57778feb9
commit
686341f254
2 changed files with 20 additions and 0 deletions
|
@ -137,6 +137,9 @@ VERSION
|
||||||
__kernel_clock_gettime;
|
__kernel_clock_gettime;
|
||||||
__kernel_clock_getres;
|
__kernel_clock_getres;
|
||||||
__kernel_getcpu;
|
__kernel_getcpu;
|
||||||
|
__kernel_restart_syscall;
|
||||||
|
__kernel_rt_sigreturn;
|
||||||
|
__kernel_sigreturn;
|
||||||
local: *;
|
local: *;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,3 +37,20 @@ vdso_func gettimeofday
|
||||||
vdso_func clock_getres
|
vdso_func clock_getres
|
||||||
vdso_func clock_gettime
|
vdso_func clock_gettime
|
||||||
vdso_func getcpu
|
vdso_func getcpu
|
||||||
|
|
||||||
|
.macro vdso_syscall func,syscall
|
||||||
|
.globl __kernel_\func
|
||||||
|
.type __kernel_\func,@function
|
||||||
|
.align 8
|
||||||
|
__kernel_\func:
|
||||||
|
CFI_STARTPROC
|
||||||
|
svc \syscall
|
||||||
|
/* Make sure we notice when a syscall returns, which shouldn't happen */
|
||||||
|
.word 0
|
||||||
|
CFI_ENDPROC
|
||||||
|
.size __kernel_\func,.-__kernel_\func
|
||||||
|
.endm
|
||||||
|
|
||||||
|
vdso_syscall restart_syscall,__NR_restart_syscall
|
||||||
|
vdso_syscall sigreturn,__NR_sigreturn
|
||||||
|
vdso_syscall rt_sigreturn,__NR_rt_sigreturn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue