2017-12-07 16:45:11

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH v2 08/35] nds32: Process management

On Mon, Nov 27, 2017 at 08:27:55PM +0800, Greentime Hu wrote:

> +#define start_thread(regs,pc,stack) \
> +({ \
> + set_fs(USER_DS); \

Not the job of start_thread() - its users (->load_binary() methods of
assorted binfmt) must (and do) call flush_old_exec() first. And
that will switch to USER_DS just fine.


2017-12-08 05:28:40

by Greentime Hu

[permalink] [raw]
Subject: Re: [PATCH v2 08/35] nds32: Process management

2017-12-08 0:45 GMT+08:00 Al Viro <[email protected]>:
> On Mon, Nov 27, 2017 at 08:27:55PM +0800, Greentime Hu wrote:
>
>> +#define start_thread(regs,pc,stack) \
>> +({ \
>> + set_fs(USER_DS); \
>
> Not the job of start_thread() - its users (->load_binary() methods of
> assorted binfmt) must (and do) call flush_old_exec() first. And
> that will switch to USER_DS just fine.

Thanks. I will remove this setting in the next version patch.