mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[CVE-2009-0029] s390 specific system call wrappers
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
parent
2b66421995
commit
26689452f5
6 changed files with 50 additions and 44 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <linux/personality.h>
|
||||
#include <linux/binfmts.h>
|
||||
#include <linux/tracehook.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <asm/ucontext.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/lowcore.h>
|
||||
|
@ -53,8 +54,7 @@ typedef struct
|
|||
/*
|
||||
* Atomically swap in the new signal mask, and wait for a signal.
|
||||
*/
|
||||
asmlinkage int
|
||||
sys_sigsuspend(int history0, int history1, old_sigset_t mask)
|
||||
SYSCALL_DEFINE3(sigsuspend, int, history0, int, history1, old_sigset_t, mask)
|
||||
{
|
||||
mask &= _BLOCKABLE;
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
|
@ -70,9 +70,8 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask)
|
|||
return -ERESTARTNOHAND;
|
||||
}
|
||||
|
||||
asmlinkage long
|
||||
sys_sigaction(int sig, const struct old_sigaction __user *act,
|
||||
struct old_sigaction __user *oact)
|
||||
SYSCALL_DEFINE3(sigaction, int, sig, const struct old_sigaction __user *, act,
|
||||
struct old_sigaction __user *, oact)
|
||||
{
|
||||
struct k_sigaction new_ka, old_ka;
|
||||
int ret;
|
||||
|
@ -102,15 +101,13 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
|
|||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage long
|
||||
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
|
||||
SYSCALL_DEFINE2(sigaltstack, const stack_t __user *, uss,
|
||||
stack_t __user *, uoss)
|
||||
{
|
||||
struct pt_regs *regs = task_pt_regs(current);
|
||||
return do_sigaltstack(uss, uoss, regs->gprs[15]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Returns non-zero on fault. */
|
||||
static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
|
||||
{
|
||||
|
@ -164,7 +161,7 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage long sys_sigreturn(void)
|
||||
SYSCALL_DEFINE0(sigreturn)
|
||||
{
|
||||
struct pt_regs *regs = task_pt_regs(current);
|
||||
sigframe __user *frame = (sigframe __user *)regs->gprs[15];
|
||||
|
@ -191,7 +188,7 @@ badframe:
|
|||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage long sys_rt_sigreturn(void)
|
||||
SYSCALL_DEFINE0(rt_sigreturn)
|
||||
{
|
||||
struct pt_regs *regs = task_pt_regs(current);
|
||||
rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue