move rt_sigaction to device dependent
fix call kill(getpid(), ) after sigaction aborted
This commit is contained in:
@ -178,9 +178,6 @@ struct process {
|
||||
struct list_head sigpending;
|
||||
struct sig_shared *sigshared;
|
||||
struct sig_handler *sighandler;
|
||||
char sigstack[512]; // TODO: 1. move to user stack
|
||||
// TODO: 2. backup FR and MMX regs
|
||||
unsigned long sigrc; // return code of rt_sigreturn (x86_64: rax reg.)
|
||||
|
||||
struct rlimit rlimit_stack;
|
||||
pgio_func_t *pgio_fp;
|
||||
|
||||
@ -105,7 +105,6 @@ static void send_syscall(struct syscall_request *req, int cpu, int pid)
|
||||
{
|
||||
struct ikc_scd_packet packet;
|
||||
struct syscall_response *res;
|
||||
unsigned long fin;
|
||||
struct syscall_params *scp;
|
||||
struct ihk_ikc_channel_desc *syscall_channel;
|
||||
|
||||
@ -1289,34 +1288,6 @@ do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYSCALL_DECLARE(rt_sigaction)
|
||||
{
|
||||
struct process *proc = cpu_local_var(current);
|
||||
int sig = ihk_mc_syscall_arg0(ctx);
|
||||
const struct sigaction *act = (const struct sigaction *)ihk_mc_syscall_arg1(ctx);
|
||||
struct sigaction *oact = (struct sigaction *)ihk_mc_syscall_arg2(ctx);
|
||||
size_t sigsetsize = ihk_mc_syscall_arg3(ctx);
|
||||
struct k_sigaction new_sa, old_sa;
|
||||
int rc;
|
||||
|
||||
if (sigsetsize != sizeof(sigset_t))
|
||||
return -EINVAL;
|
||||
|
||||
if(act)
|
||||
if(copy_from_user(proc, &new_sa.sa, act, sizeof new_sa.sa)){
|
||||
goto fault;
|
||||
}
|
||||
rc = do_sigaction(sig, act? &new_sa: NULL, oact? &old_sa: NULL);
|
||||
if(rc == 0 && oact)
|
||||
if(copy_to_user(proc, oact, &old_sa.sa, sizeof old_sa.sa)){
|
||||
goto fault;
|
||||
}
|
||||
|
||||
return rc;
|
||||
fault:
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
SYSCALL_DECLARE(rt_sigprocmask)
|
||||
{
|
||||
int how = ihk_mc_syscall_arg0(ctx);
|
||||
|
||||
Reference in New Issue
Block a user