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

2018-10-31 Thread Chang S. Bae
Factor out the code to change index from the relavant helpers. Now, the code is located in do_arch_prctl_64(). The helper functions that purport to write the base should just write it only. It shouldn't have magic optimizations to change the index. putreg() in ptrace does not write the current ta

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

2018-10-31 Thread Bae, Chang Seok
> On Oct 30, 2018, at 14:25, Andy Lutomirski wrote: > > On Tue, Oct 30, 2018 at 10:28 AM Chang S. Bae > wrote: >> >> Factor out the code to change index from x86_fsbase_write_cpu() and >> x86_gsbase_write_cpu_inactive(). Now the code is located in >> do_arch_prctl_64(). >> > >> @@ -359,9

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

2018-10-30 Thread Andy Lutomirski
On Tue, Oct 30, 2018 at 10:28 AM Chang S. Bae wrote: > > Factor out the code to change index from x86_fsbase_write_cpu() and > x86_gsbase_write_cpu_inactive(). Now the code is located in > do_arch_prctl_64(). > > @@ -359,9 +351,7 @@ unsigned long x86_fsbase_read_task(struct task_struct > *task)

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

2018-10-30 Thread Bae, Chang Seok
> Factor out the code to change index from x86_fsbase_write_cpu() and > x86_gsbase_write_cpu_inactive(). Now the code is located in > do_arch_prctl_64(). > > The helper functions that purport to write the base register should just > write the > base register only. It shouldn't have magic optimiza

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

2018-10-30 Thread Chang S. Bae
Factor out the code to change index from x86_fsbase_write_cpu() and x86_gsbase_write_cpu_inactive(). Now the code is located in do_arch_prctl_64(). The helper functions that purport to write the base register should just write the base register only. It shouldn't have magic optimizations to change