Skip to content

Commit

Permalink
whack-a-mole: there's no point doing set_fs(USER_DS) in sigframe setup
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 12, 2015
1 parent a555ad4 commit 74008b3
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
4 changes: 0 additions & 4 deletions arch/frv/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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)))
Expand Down
2 changes: 0 additions & 2 deletions arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions arch/microblaze/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions arch/sh/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
4 changes: 0 additions & 4 deletions arch/sh/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions arch/xtensa/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 74008b3

Please sign in to comment.