diff mbox

arm, exec: remove redundant set_fs(USER_DS)

Message ID 1307711337-4042-1-git-send-email-minipli@googlemail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mathias Krause June 10, 2011, 1:08 p.m. UTC
The address limit is already set in flush_old_exec() so this
set_fs(USER_DS) is redundant.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 arch/arm/include/asm/processor.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Russell King - ARM Linux June 10, 2011, 1:48 p.m. UTC | #1
On Fri, Jun 10, 2011 at 03:08:57PM +0200, Mathias Krause wrote:
> The address limit is already set in flush_old_exec() so this
> set_fs(USER_DS) is redundant.

Please show where and how this is done.  I've looked and can't see
any equivalent call to set_fs() in flush_old_exec().
Mathias Krause June 10, 2011, 1:53 p.m. UTC | #2
On Fri, Jun 10, 2011 at 3:48 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Jun 10, 2011 at 03:08:57PM +0200, Mathias Krause wrote:
>> The address limit is already set in flush_old_exec() so this
>> set_fs(USER_DS) is redundant.
>
> Please show where and how this is done.  I've looked and can't see
> any equivalent call to set_fs() in flush_old_exec().

Before dac853a (exec: delay address limit change until point of no
return) it was done in search_binary_handler(), now it is done in
flush_old_exec(). Either way set_fs(USER_DS) was/gets called before
start_thread() so the call there is redundant.

Mathias
Mathias Krause June 27, 2011, 4:29 a.m. UTC | #3
On Fri, Jun 10, 2011 at 3:53 PM, Mathias Krause <minipli@googlemail.com> wrote:
> On Fri, Jun 10, 2011 at 3:48 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Fri, Jun 10, 2011 at 03:08:57PM +0200, Mathias Krause wrote:
>>> The address limit is already set in flush_old_exec() so this
>>> set_fs(USER_DS) is redundant.
>>
>> Please show where and how this is done.  I've looked and can't see
>> any equivalent call to set_fs() in flush_old_exec().
>
> Before dac853a (exec: delay address limit change until point of no
> return) it was done in search_binary_handler(), now it is done in
> flush_old_exec(). Either way set_fs(USER_DS) was/gets called before
> start_thread() so the call there is redundant.

Russell, any new opinion on this?

Mathias
diff mbox

Patch

diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index b2d9df5..3962caf 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -55,7 +55,6 @@  struct thread_struct {
 #define start_thread(regs,pc,sp)					\
 ({									\
 	unsigned long *stack = (unsigned long *)sp;			\
-	set_fs(USER_DS);						\
 	memset(regs->uregs, 0, sizeof(regs->uregs));			\
 	if (current->personality & ADDR_LIMIT_32BIT)			\
 		regs->ARM_cpsr = USR_MODE;				\