Re: [PATCH 08/10] x86: remove address space overrides using set_fs()

2020-08-29 Thread Christoph Hellwig
On Thu, Aug 27, 2020 at 11:15:12AM -0700, Linus Torvalds wrote: > > SYM_FUNC_START(__put_user_2) > > - ENTER > > - mov TASK_addr_limit(%_ASM_BX),%_ASM_BX > > + LOAD_TASK_SIZE_MAX > > sub $1,%_ASM_BX > > It's even more obvious here. We load a constant and then immediately

Re: [PATCH 08/10] x86: remove address space overrides using set_fs()

2020-08-27 Thread Linus Torvalds
On Thu, Aug 27, 2020 at 8:00 AM Christoph Hellwig wrote: > > SYM_FUNC_START(__get_user_2) > add $1,%_ASM_AX > jc bad_get_user This no longer makes sense, and > - mov PER_CPU_VAR(current_task), %_ASM_DX > - cmp TASK_addr_limit(%_ASM_DX),%_ASM_AX > + LOAD_TASK_SI

[PATCH 08/10] x86: remove address space overrides using set_fs()

2020-08-27 Thread Christoph Hellwig
Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. To properly handle the TASK_SIZE_MAX checking for 4 vs 5-level page tables on x86 a new alternative is introduced, which just like the one in entry_64.S has to use the hardcoded