lkml.org 
[lkml]   [2019]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 00/27] Kernel Address Space Isolation
On Fri, 12 Jul 2019, Alexandre Chartre wrote:
> On 7/12/19 3:51 PM, Dave Hansen wrote:
> > BTW, the PTI CR3 writes are not *strictly* about the interrupt coming
> > from user vs. kernel. It's tricky because there's a window both in the
> > entry and exit code where you are in the kernel but have a userspace CR3
> > value. You end up needing a CR3 write when you have a userspace CR3
> > value when the interrupt occurred, not only when you interrupt userspace
> > itself.
> >
>
> Right. ASI is simpler because it comes from the kernel and return to the
> kernel. There's just a small window (on entry) where we have the ASI CR3
> but we quickly switch to the full kernel CR3.

That's wrong in several aspects.

1) You are looking at it purely from the VMM perspective, which is bogus
as you already said, that this can/should be used to be extended to
other scenarios (including kvm ioctl or such).

So no, it's not just coming from kernel space and returning to it.

If that'd be true then the entry code could just stay as is because
you can handle _ALL_ of that very trivial in the atomic VMM
enter/exit code.

2) It does not matter how small that window is. If there is a window
then this needs to be covered, no matter what.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-07-12 17:24    [W:0.055 / U:4.420 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site