lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/4] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI
On Mon, 8 Jan 2018, Willy Tarreau wrote:
> On Mon, Jan 08, 2018 at 09:54:05AM -0800, Linus Torvalds wrote:
>
> > So make the thing per-mm, and then at task switch time as you switch
> > mms, you set the bit in a percpu variable for testing at kernel entry.
>
> I'll see how to do that, this is not yet 100% clear to me, I'm still
> discovering (this code has immensely changed since last time I *really*
> dug into it). So I suspect I'll have to set this variable in
> __switch_to() based on this other MM flag.

The right thing is probably the cpu entry area because that's what you can
access before switching CR3 if PTI is enabled for the task

Thanks,

tglx

\
 
 \ /
  Last update: 2018-01-14 23:18    [W:0.629 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site