whack-a-mole: there's no point doing set_fs(USER_DS) in sigframe setup
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 23 Feb 2015 10:46:21 +0000 (05:46 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:24:31 +0000 (22:24 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/frv/kernel/signal.c
arch/m32r/kernel/signal.c
arch/microblaze/kernel/signal.c
arch/sh/kernel/signal_32.c
arch/sh/kernel/signal_64.c
arch/xtensa/kernel/signal.c

index 336713ab47454fa2afd8e603d53255f5d91acaa0..85ca6727ca075c8ce47ca73f801ed612cdeeb86d 100644 (file)
@@ -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)))
index 7736c6660a1580562bbbed37ece6aae5a61ac99a..8c25e0c8f6a5c752ba9c201de8292e4dd0c5120b 100644 (file)
@@ -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);
index a1cbaf90e2ea47215e8bfce77d7d8d113f9fd110..20ccd4e2baa54c88f4fbcdd13c1a407ee66ffc82 100644 (file)
@@ -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);
index 0b34f2a704fe1d2fdcf03b49fe37d73a7725ecf7..97292890b51bc4d36121cfa35fde08c79e3260f5 100644 (file)
@@ -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);
 
index 71993c6a7d94b0f6da895f78d96176de5aa31e14..0462995d4d7f66ed9531948aaf0d3ef9bdd63b63 100644 (file)
@@ -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,
index 3d733ba16f28a2db8f6f4c91c61170a44ca7fd83..6b3790445cbed4c5d2ab7fb31cdc6bb6d3db25f8 100644 (file)
@@ -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);