lkml.org 
[lkml]   [2018]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions
On Wed, Oct 24, 2018 at 12:16 PM Andy Lutomirski <luto@kernel.org> wrote:
>
> On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae <chang.seok.bae@intel.com> wrote:

> > +/*
> > + * Interrupts are disabled here. Out of line to be protected from kprobes.
> > + */
> > +static noinline __kprobes unsigned long rd_inactive_gsbase(void)
> > +{
> > + unsigned long gsbase, flags;
> > +
> > + local_irq_save(flags);
> > + native_swapgs();
> > + gsbase = rdgsbase();
> > + native_swapgs();
> > + local_irq_restore(flags);
> > +
> > + return gsbase;
> > +}
>
> Please fold this into its only caller and make *that* noinline.
>

On further reading of the whole series, I retract this particular
comment. But I do think that __rdgsbase_inactive() would be a better
name.

\
 
 \ /
  Last update: 2018-10-26 01:17    [W:0.755 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site