whack-a-mole: there's no point doing set_fs(USER_DS) in sigframe setup
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
a555ad450f
Коммит
74008b365d
|
@ -176,8 +176,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set)
|
|||
struct sigframe __user *frame;
|
||||
int rsig, sig = ksig->sig;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
frame = get_sigframe(ksig, sizeof(*frame));
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
||||
|
@ -257,8 +255,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set)
|
|||
struct rt_sigframe __user *frame;
|
||||
int rsig, sig = ksig->sig;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
frame = get_sigframe(ksig, sizeof(*frame));
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
||||
|
|
|
@ -214,8 +214,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||
regs->r2 = (unsigned long)&frame->uc;
|
||||
regs->bpc = (unsigned long)ksig->ka.sa.sa_handler;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
#if DEBUG_SIG
|
||||
printk("SIG deliver (%s:%d): sp=%p pc=%p\n",
|
||||
current->comm, current->pid, frame, regs->pc);
|
||||
|
|
|
@ -236,8 +236,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||
/* Offset to handle microblaze rtid r14, 0 */
|
||||
regs->pc = (unsigned long)ksig->ka.sa.sa_handler;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
#ifdef DEBUG_SIG
|
||||
pr_info("SIG deliver (%s:%d): sp=%p pc=%08lx\n",
|
||||
current->comm, current->pid, frame, regs->pc);
|
||||
|
|
|
@ -329,8 +329,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
|||
if (err)
|
||||
return -EFAULT;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
|
||||
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);
|
||||
|
||||
|
@ -408,8 +406,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||
if (err)
|
||||
return -EFAULT;
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
|
||||
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);
|
||||
|
||||
|
|
|
@ -457,8 +457,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
|
|||
|
||||
regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler);
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
/* Broken %016Lx */
|
||||
pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
|
||||
signal, current->comm, current->pid, frame,
|
||||
|
@ -547,8 +545,6 @@ static int setup_rt_frame(struct ksignal *kig, sigset_t *set,
|
|||
regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext;
|
||||
regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler);
|
||||
|
||||
set_fs(USER_DS);
|
||||
|
||||
pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
|
||||
signal, current->comm, current->pid, frame,
|
||||
regs->pc >> 32, regs->pc & 0xffffffff,
|
||||
|
|
|
@ -405,11 +405,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
|||
regs->areg[8] = (unsigned long) &frame->uc;
|
||||
regs->threadptr = tp;
|
||||
|
||||
/* Set access mode to USER_DS. Nomenclature is outdated, but
|
||||
* functionality is used in uaccess.h
|
||||
*/
|
||||
set_fs(USER_DS);
|
||||
|
||||
#if DEBUG_SIG
|
||||
printk("SIG rt deliver (%s:%d): signal=%d sp=%p pc=%08x\n",
|
||||
current->comm, current->pid, signal, frame, regs->pc);
|
||||
|
|
Загрузка…
Ссылка в новой задаче