diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-23 03:21:31 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:24:31 -0400 |
commit | a555ad450f973528825201a5fedbe46374f86644 (patch) | |
tree | 693c68515fb05210c87c5dea011564f8a3b132ae | |
parent | 9e7543e9398ddd9679fbc81748a3e62eff4ab105 (diff) |
whack-a-mole: no need to set_fs(USER_DS) in {start,flush}_thread()
flush_old_exec() has already done that. Back on 2011 a bunch of
instances like that had been kicked out, but that hadn't taken
care of then-out-of-tree architectures, obviously, and they served
as reinfection vector...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/arc/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/c6x/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/hexagon/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/metag/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/nios2/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/openrisc/kernel/process.c | 1 |
6 files changed, 0 insertions, 8 deletions
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index 98c00a2d4dd9..f46efd14059d 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c | |||
@@ -155,8 +155,6 @@ int copy_thread(unsigned long clone_flags, | |||
155 | */ | 155 | */ |
156 | void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp) | 156 | void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp) |
157 | { | 157 | { |
158 | set_fs(USER_DS); /* user space */ | ||
159 | |||
160 | regs->sp = usp; | 158 | regs->sp = usp; |
161 | regs->ret = pc; | 159 | regs->ret = pc; |
162 | 160 | ||
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 57d2ea8d1977..3ae9f5a166a0 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c | |||
@@ -101,7 +101,6 @@ void start_thread(struct pt_regs *regs, unsigned int pc, unsigned long usp) | |||
101 | */ | 101 | */ |
102 | usp -= 8; | 102 | usp -= 8; |
103 | 103 | ||
104 | set_fs(USER_DS); | ||
105 | regs->pc = pc; | 104 | regs->pc = pc; |
106 | regs->sp = usp; | 105 | regs->sp = usp; |
107 | regs->tsr |= 0x40; /* set user mode */ | 106 | regs->tsr |= 0x40; /* set user mode */ |
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index 0a0dd5c05b46..a9ebd471823a 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c | |||
@@ -37,8 +37,6 @@ | |||
37 | */ | 37 | */ |
38 | void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) | 38 | void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) |
39 | { | 39 | { |
40 | /* Set to run with user-mode data segmentation */ | ||
41 | set_fs(USER_DS); | ||
42 | /* We want to zero all data-containing registers. Is this overkill? */ | 40 | /* We want to zero all data-containing registers. Is this overkill? */ |
43 | memset(regs, 0, sizeof(*regs)); | 41 | memset(regs, 0, sizeof(*regs)); |
44 | /* We might want to also zero all Processor registers here */ | 42 | /* We might want to also zero all Processor registers here */ |
diff --git a/arch/metag/include/asm/processor.h b/arch/metag/include/asm/processor.h index 13272fd5a5ba..0838ca699764 100644 --- a/arch/metag/include/asm/processor.h +++ b/arch/metag/include/asm/processor.h | |||
@@ -111,7 +111,6 @@ struct thread_struct { | |||
111 | */ | 111 | */ |
112 | #define start_thread(regs, pc, usp) do { \ | 112 | #define start_thread(regs, pc, usp) do { \ |
113 | unsigned int *argc = (unsigned int *) bprm->exec; \ | 113 | unsigned int *argc = (unsigned int *) bprm->exec; \ |
114 | set_fs(USER_DS); \ | ||
115 | current->thread.int_depth = 1; \ | 114 | current->thread.int_depth = 1; \ |
116 | /* Force this process down to user land */ \ | 115 | /* Force this process down to user land */ \ |
117 | regs->ctx.SaveMask = TBICTX_PRIV_BIT; \ | 116 | regs->ctx.SaveMask = TBICTX_PRIV_BIT; \ |
diff --git a/arch/nios2/kernel/process.c b/arch/nios2/kernel/process.c index 0e075b5ad2a5..2f8c74f93e70 100644 --- a/arch/nios2/kernel/process.c +++ b/arch/nios2/kernel/process.c | |||
@@ -94,7 +94,6 @@ void show_regs(struct pt_regs *regs) | |||
94 | 94 | ||
95 | void flush_thread(void) | 95 | void flush_thread(void) |
96 | { | 96 | { |
97 | set_fs(USER_DS); | ||
98 | } | 97 | } |
99 | 98 | ||
100 | int copy_thread(unsigned long clone_flags, | 99 | int copy_thread(unsigned long clone_flags, |
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index 386af258591d..7095dfe7666b 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c | |||
@@ -197,7 +197,6 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) | |||
197 | { | 197 | { |
198 | unsigned long sr = mfspr(SPR_SR) & ~SPR_SR_SM; | 198 | unsigned long sr = mfspr(SPR_SR) & ~SPR_SR_SM; |
199 | 199 | ||
200 | set_fs(USER_DS); | ||
201 | memset(regs, 0, sizeof(struct pt_regs)); | 200 | memset(regs, 0, sizeof(struct pt_regs)); |
202 | 201 | ||
203 | regs->pc = pc; | 202 | regs->pc = pc; |