Commit 74008b36 authored by Al Viro's avatar Al Viro

whack-a-mole: there's no point doing set_fs(USER_DS) in sigframe setup

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a555ad45
...@@ -176,8 +176,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set) ...@@ -176,8 +176,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set)
struct sigframe __user *frame; struct sigframe __user *frame;
int rsig, sig = ksig->sig; int rsig, sig = ksig->sig;
set_fs(USER_DS);
frame = get_sigframe(ksig, sizeof(*frame)); frame = get_sigframe(ksig, sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, 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) ...@@ -257,8 +255,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set)
struct rt_sigframe __user *frame; struct rt_sigframe __user *frame;
int rsig, sig = ksig->sig; int rsig, sig = ksig->sig;
set_fs(USER_DS);
frame = get_sigframe(ksig, sizeof(*frame)); frame = get_sigframe(ksig, sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, 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, ...@@ -214,8 +214,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
regs->r2 = (unsigned long)&frame->uc; regs->r2 = (unsigned long)&frame->uc;
regs->bpc = (unsigned long)ksig->ka.sa.sa_handler; regs->bpc = (unsigned long)ksig->ka.sa.sa_handler;
set_fs(USER_DS);
#if DEBUG_SIG #if DEBUG_SIG
printk("SIG deliver (%s:%d): sp=%p pc=%p\n", printk("SIG deliver (%s:%d): sp=%p pc=%p\n",
current->comm, current->pid, frame, regs->pc); current->comm, current->pid, frame, regs->pc);
......
...@@ -236,8 +236,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, ...@@ -236,8 +236,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
/* Offset to handle microblaze rtid r14, 0 */ /* Offset to handle microblaze rtid r14, 0 */
regs->pc = (unsigned long)ksig->ka.sa.sa_handler; regs->pc = (unsigned long)ksig->ka.sa.sa_handler;
set_fs(USER_DS);
#ifdef DEBUG_SIG #ifdef DEBUG_SIG
pr_info("SIG deliver (%s:%d): sp=%p pc=%08lx\n", pr_info("SIG deliver (%s:%d): sp=%p pc=%08lx\n",
current->comm, current->pid, frame, regs->pc); current->comm, current->pid, frame, regs->pc);
......
...@@ -329,8 +329,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, ...@@ -329,8 +329,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
if (err) if (err)
return -EFAULT; return -EFAULT;
set_fs(USER_DS);
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); 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, ...@@ -408,8 +406,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
if (err) if (err)
return -EFAULT; return -EFAULT;
set_fs(USER_DS);
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); 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 ...@@ -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); regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler);
set_fs(USER_DS);
/* Broken %016Lx */ /* Broken %016Lx */
pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n", pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
signal, current->comm, current->pid, frame, signal, current->comm, current->pid, frame,
...@@ -547,8 +545,6 @@ static int setup_rt_frame(struct ksignal *kig, sigset_t *set, ...@@ -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->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); 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", pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
signal, current->comm, current->pid, frame, signal, current->comm, current->pid, frame,
regs->pc >> 32, regs->pc & 0xffffffff, regs->pc >> 32, regs->pc & 0xffffffff,
......
...@@ -405,11 +405,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, ...@@ -405,11 +405,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
regs->areg[8] = (unsigned long) &frame->uc; regs->areg[8] = (unsigned long) &frame->uc;
regs->threadptr = tp; 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 #if DEBUG_SIG
printk("SIG rt deliver (%s:%d): signal=%d sp=%p pc=%08x\n", printk("SIG rt deliver (%s:%d): signal=%d sp=%p pc=%08x\n",
current->comm, current->pid, signal, frame, regs->pc); current->comm, current->pid, signal, frame, regs->pc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment