Release 4.18 arch/mips/kernel/signal32.c
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994 - 2000, 2006 Ralf Baechle
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
* Copyright (C) 2016, Imagination Technologies Ltd.
*/
#include <linux/compat.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/syscalls.h>
#include <asm/compat-signal.h>
#include <linux/uaccess.h>
#include <asm/unistd.h>
#include "signal-common.h"
/* 32-bit compatibility types */
typedef unsigned int __sighandler32_t;
typedef void (*vfptr_t)(void);
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset)
{
return compat_sys_rt_sigsuspend(uset, sizeof(compat_sigset_t));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Hunt | 19 | 86.36% | 1 | 25.00% |
Paul Burton | 1 | 4.55% | 1 | 25.00% |
Atsushi Nemoto | 1 | 4.55% | 1 | 25.00% |
Ralf Bächle | 1 | 4.55% | 1 | 25.00% |
Total | 22 | 100.00% | 4 | 100.00% |
SYSCALL_DEFINE3(32_sigaction, long, sig, const struct compat_sigaction __user *, act,
struct compat_sigaction __user *, oact)
{
struct k_sigaction new_ka, old_ka;
int ret;
int err = 0;
if (act) {
old_sigset_t mask;
s32 handler;
if (!access_ok(VERIFY_READ, act, sizeof(*act)))
return -EFAULT;
err |= __get_user(handler, &act->sa_handler);
new_ka.sa.sa_handler = (void __user *)(s64)handler;
err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
err |= __get_user(mask, &act->sa_mask.sig[0]);
if (err)
return -EFAULT;
siginitset(&new_ka.sa.sa_mask, mask);
}
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
if (!ret && oact) {
if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
return -EFAULT;
err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
err |= __put_user((u32)(u64)old_ka.sa.sa_handler,
&oact->sa_handler);
err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig);
err |= __put_user(0, &oact->sa_mask.sig[1]);
err |= __put_user(0, &oact->sa_mask.sig[2]);
err |= __put_user(0, &oact->sa_mask.sig[3]);
if (err)
return -EFAULT;
}
return ret;
}
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Hunt | 228 | 58.91% | 1 | 5.88% |
Linus Torvalds (pre-git) | 104 | 26.87% | 2 | 11.76% |
Franck Bui-Huu | 27 | 6.98% | 2 | 11.76% |
Deepa Dinamani | 6 | 1.55% | 1 | 5.88% |
Andrew Morton | 5 | 1.29% | 2 | 11.76% |
Ralf Bächle | 5 | 1.29% | 3 | 17.65% |
Atsushi Nemoto | 5 | 1.29% | 2 | 11.76% |
Paul Burton | 4 | 1.03% | 2 | 11.76% |
David Daney | 2 | 0.52% | 1 | 5.88% |
Linus Torvalds | 1 | 0.26% | 1 | 5.88% |
Total | 387 | 100.00% | 17 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.