Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-06 Thread Bae, Chang Seok
> On Mar 25, 2019, at 02:44, Thomas Gleixner wrote: > > On Fri, 15 Mar 2019, Chang S. Bae wrote: > >> The FSGSBASE instructions allow fast accesses on GSBASE. Now, at the >> paranoid_entry, the per-CPU base value can be always copied to GSBASE. >> And the original GSBASE value will be

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-01 Thread Andy Lutomirski
> On May 1, 2019, at 2:04 PM, Bae, Chang Seok wrote: > > >> On May 1, 2019, at 13:25, Andy Lutomirski wrote: >> >> >> >>> On May 1, 2019, at 1:21 PM, Bae, Chang Seok >>> wrote: >>> >>> > On May 1, 2019, at 11:01, Bae, Chang Seok > wrote: > > On May 1, 2019, at

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-01 Thread Bae, Chang Seok
> On May 1, 2019, at 13:25, Andy Lutomirski wrote: > > > >> On May 1, 2019, at 1:21 PM, Bae, Chang Seok wrote: >> >> On May 1, 2019, at 11:01, Bae, Chang Seok wrote: On May 1, 2019, at 10:40, Andy Lutomirski wrote: On Wed, May 1, 2019 at 6:52 AM Bae, Chang Seok

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-01 Thread Andy Lutomirski
> On May 1, 2019, at 1:21 PM, Bae, Chang Seok wrote: > > >>> On May 1, 2019, at 11:01, Bae, Chang Seok wrote: >>> >>> On May 1, 2019, at 10:40, Andy Lutomirski wrote: >>> >>> On Wed, May 1, 2019 at 6:52 AM Bae, Chang Seok >>> wrote: > On Apr 5, 2019, at 06:50, Andy

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-01 Thread Bae, Chang Seok
> On May 1, 2019, at 10:40, Andy Lutomirski wrote: > > On Wed, May 1, 2019 at 6:52 AM Bae, Chang Seok > wrote: >> >> >>> On Apr 5, 2019, at 06:50, Andy Lutomirski wrote: >>> >>> >>> On Apr 5, 2019, at 2:35 AM, Thomas Gleixner wrote: > On Mon, 25 Mar 2019, Thomas Gleixner

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-01 Thread Andy Lutomirski
On Wed, May 1, 2019 at 6:52 AM Bae, Chang Seok wrote: > > > > On Apr 5, 2019, at 06:50, Andy Lutomirski wrote: > > > > > > > >> On Apr 5, 2019, at 2:35 AM, Thomas Gleixner wrote: > >> > >>> On Mon, 25 Mar 2019, Thomas Gleixner wrote: > On Fri, 15 Mar 2019, Chang S. Bae wrote: >

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-05-01 Thread Bae, Chang Seok
> On Apr 5, 2019, at 06:50, Andy Lutomirski wrote: > > > >> On Apr 5, 2019, at 2:35 AM, Thomas Gleixner wrote: >> >>> On Mon, 25 Mar 2019, Thomas Gleixner wrote: On Fri, 15 Mar 2019, Chang S. Bae wrote: ENTRY(paranoid_exit) UNWIND_HINT_REGS

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-04-05 Thread Andy Lutomirski
> On Apr 5, 2019, at 2:35 AM, Thomas Gleixner wrote: > >> On Mon, 25 Mar 2019, Thomas Gleixner wrote: >>> On Fri, 15 Mar 2019, Chang S. Bae wrote: >>> ENTRY(paranoid_exit) >>>UNWIND_HINT_REGS >>>DISABLE_INTERRUPTS(CLBR_ANY) >>>TRACE_IRQS_OFF_DEBUG >>> +ALTERNATIVE "jmp

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-04-05 Thread Thomas Gleixner
On Mon, 25 Mar 2019, Thomas Gleixner wrote: > On Fri, 15 Mar 2019, Chang S. Bae wrote: > > ENTRY(paranoid_exit) > > UNWIND_HINT_REGS > > DISABLE_INTERRUPTS(CLBR_ANY) > > TRACE_IRQS_OFF_DEBUG > > + ALTERNATIVE "jmp .Lparanoid_exit_no_fsgsbase", "nop",\ > > +

Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-03-25 Thread Thomas Gleixner
On Fri, 15 Mar 2019, Chang S. Bae wrote: > The FSGSBASE instructions allow fast accesses on GSBASE. Now, at the > paranoid_entry, the per-CPU base value can be always copied to GSBASE. > And the original GSBASE value will be restored at the exit. Again you are describing WHAT but not the WHY.

[RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-03-15 Thread Chang S. Bae
The FSGSBASE instructions allow fast accesses on GSBASE. Now, at the paranoid_entry, the per-CPU base value can be always copied to GSBASE. And the original GSBASE value will be restored at the exit. So far, GSBASE modification has not been directly allowed from userspace. So, swapping GSBASE