Re: [PATCH v4] x86/fsgsbase/64: Fix the base write helper functions

2018-11-16 Thread Bae, Chang Seok
> On Nov 14, 2018, at 13:46, Bae, Chang Seok wrote: > > int copy_thread_tls(unsigned long clone_flags, unsigned long sp, > @@ -758,11 +720,45 @@ long do_arch_prctl_64(struct task_struct *task, int > option, unsigned long arg2) > > switch (option) { > case ARCH_SET_GS: { > -

[PATCH v4] x86/fsgsbase/64: Fix the base write helper functions

2018-11-14 Thread Chang S. Bae
The helper functions that purport to write the base should just write it only. It shouldn't have magic optimizations to change the index. Make the index explicitly changed from the caller, instead of including the code in the helpers. Subsequently, the task write helpers do not handle for the cur