Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-10-24 Thread Tycho Andersen
On Wed, Oct 24, 2018 at 04:30:42PM +0530, Khalid Aziz wrote: > On 10/15/2018 01:37 PM, Khalid Aziz wrote: > > On 09/24/2018 08:45 AM, Stecklina, Julian wrote: > > > I didn't test the version with TLB flushes, because it's clear that the > > > overhead is so bad that no one wants to use this. > >

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-10-24 Thread Tycho Andersen
On Wed, Oct 24, 2018 at 04:30:42PM +0530, Khalid Aziz wrote: > On 10/15/2018 01:37 PM, Khalid Aziz wrote: > > On 09/24/2018 08:45 AM, Stecklina, Julian wrote: > > > I didn't test the version with TLB flushes, because it's clear that the > > > overhead is so bad that no one wants to use this. > >

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-10-24 Thread Khalid Aziz
On 10/15/2018 01:37 PM, Khalid Aziz wrote: On 09/24/2018 08:45 AM, Stecklina, Julian wrote: I didn't test the version with TLB flushes, because it's clear that the overhead is so bad that no one wants to use this. I don't think we can ignore the vulnerability caused by not flushing stale TLB

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-10-24 Thread Khalid Aziz
On 10/15/2018 01:37 PM, Khalid Aziz wrote: On 09/24/2018 08:45 AM, Stecklina, Julian wrote: I didn't test the version with TLB flushes, because it's clear that the overhead is so bad that no one wants to use this. I don't think we can ignore the vulnerability caused by not flushing stale TLB

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-10-15 Thread Khalid Aziz
On 09/24/2018 08:45 AM, Stecklina, Julian wrote: I didn't test the version with TLB flushes, because it's clear that the overhead is so bad that no one wants to use this. I don't think we can ignore the vulnerability caused by not flushing stale TLB entries. On a mostly idle system, TLB

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-10-15 Thread Khalid Aziz
On 09/24/2018 08:45 AM, Stecklina, Julian wrote: I didn't test the version with TLB flushes, because it's clear that the overhead is so bad that no one wants to use this. I don't think we can ignore the vulnerability caused by not flushing stale TLB entries. On a mostly idle system, TLB

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-25 Thread Stecklina, Julian
On Sun, 2018-09-23 at 12:33 +1000, Balbir Singh wrote: > > And in so doing, significantly reduces the amount of non-kernel > data > > vulnerable to speculative execution attacks against the kernel. > > (and reduces what data can be loaded into the L1 data cache while > > in kernel mode, to be

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-25 Thread Stecklina, Julian
On Sun, 2018-09-23 at 12:33 +1000, Balbir Singh wrote: > > And in so doing, significantly reduces the amount of non-kernel > data > > vulnerable to speculative execution attacks against the kernel. > > (and reduces what data can be loaded into the L1 data cache while > > in kernel mode, to be

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-24 Thread Stecklina, Julian
On Tue, 2018-09-18 at 17:00 -0600, Khalid Aziz wrote: > I tested the kernel with this new code. When booted without > "xpfotlbflush",  > there is no meaningful change in system time with kernel compile. That's good news! So the lock optimizations seem to help. > Kernel  > locks up during bootup

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-24 Thread Stecklina, Julian
On Tue, 2018-09-18 at 17:00 -0600, Khalid Aziz wrote: > I tested the kernel with this new code. When booted without > "xpfotlbflush",  > there is no meaningful change in system time with kernel compile. That's good news! So the lock optimizations seem to help. > Kernel  > locks up during bootup

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-22 Thread Balbir Singh
On Wed, Sep 19, 2018 at 08:43:07AM -0700, Jonathan Adams wrote: > (apologies again; resending due to formatting issues) > On Tue, Sep 18, 2018 at 6:03 PM Balbir Singh wrote: > > > > On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > > > On Mon, 2018-08-20 at 14:48 -0700, Linus

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-22 Thread Balbir Singh
On Wed, Sep 19, 2018 at 08:43:07AM -0700, Jonathan Adams wrote: > (apologies again; resending due to formatting issues) > On Tue, Sep 18, 2018 at 6:03 PM Balbir Singh wrote: > > > > On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > > > On Mon, 2018-08-20 at 14:48 -0700, Linus

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-19 Thread Jonathan Adams
(apologies again; resending due to formatting issues) On Tue, Sep 18, 2018 at 6:03 PM Balbir Singh wrote: > > On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > > > Of course, after the long (and entirely

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-19 Thread Jonathan Adams
(apologies again; resending due to formatting issues) On Tue, Sep 18, 2018 at 6:03 PM Balbir Singh wrote: > > On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > > > Of course, after the long (and entirely

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-18 Thread Balbir Singh
On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > Of course, after the long (and entirely unrelated) discussion about > > the TLB flushing bug we had, I'm starting to worry about my own > > competence, and maybe

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-18 Thread Balbir Singh
On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > Of course, after the long (and entirely unrelated) discussion about > > the TLB flushing bug we had, I'm starting to worry about my own > > competence, and maybe

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-18 Thread Khalid Aziz
On 09/17/2018 03:51 AM, Julian Stecklina wrote: > Khalid Aziz writes: > >> I ran tests with your updated code and gathered lock statistics. Change in >> system time for "make -j60" was in the noise margin (It actually went up by >> about 2%). There is some contention on xpfo_lock. Average wait

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-18 Thread Khalid Aziz
On 09/17/2018 03:51 AM, Julian Stecklina wrote: > Khalid Aziz writes: > >> I ran tests with your updated code and gathered lock statistics. Change in >> system time for "make -j60" was in the noise margin (It actually went up by >> about 2%). There is some contention on xpfo_lock. Average wait

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Christoph Hellwig
On Mon, Sep 17, 2018 at 12:01:02PM +0200, Julian Stecklina wrote: > Juerg Haefliger writes: > > >> I've updated my XPFO branch[1] to make some of the debugging optional > >> and also integrated the XPFO bookkeeping with struct page, instead of > >> requiring CONFIG_PAGE_EXTENSION, which removes

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Christoph Hellwig
On Mon, Sep 17, 2018 at 12:01:02PM +0200, Julian Stecklina wrote: > Juerg Haefliger writes: > > >> I've updated my XPFO branch[1] to make some of the debugging optional > >> and also integrated the XPFO bookkeeping with struct page, instead of > >> requiring CONFIG_PAGE_EXTENSION, which removes

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Tycho Andersen
On Mon, Sep 17, 2018 at 12:01:02PM +0200, Julian Stecklina wrote: > Juerg Haefliger writes: > > >> I've updated my XPFO branch[1] to make some of the debugging optional > >> and also integrated the XPFO bookkeeping with struct page, instead of > >> requiring CONFIG_PAGE_EXTENSION, which removes

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Tycho Andersen
On Mon, Sep 17, 2018 at 12:01:02PM +0200, Julian Stecklina wrote: > Juerg Haefliger writes: > > >> I've updated my XPFO branch[1] to make some of the debugging optional > >> and also integrated the XPFO bookkeeping with struct page, instead of > >> requiring CONFIG_PAGE_EXTENSION, which removes

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Julian Stecklina
Juerg Haefliger writes: >> I've updated my XPFO branch[1] to make some of the debugging optional >> and also integrated the XPFO bookkeeping with struct page, instead of >> requiring CONFIG_PAGE_EXTENSION, which removes some checks in the hot >> path. > > FWIW, that was my original design but

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Julian Stecklina
Juerg Haefliger writes: >> I've updated my XPFO branch[1] to make some of the debugging optional >> and also integrated the XPFO bookkeeping with struct page, instead of >> requiring CONFIG_PAGE_EXTENSION, which removes some checks in the hot >> path. > > FWIW, that was my original design but

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Julian Stecklina
Khalid Aziz writes: > I ran tests with your updated code and gathered lock statistics. Change in > system time for "make -j60" was in the noise margin (It actually went up by > about 2%). There is some contention on xpfo_lock. Average wait time does not > look high compared to other locks. Max

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-17 Thread Julian Stecklina
Khalid Aziz writes: > I ran tests with your updated code and gathered lock statistics. Change in > system time for "make -j60" was in the noise margin (It actually went up by > about 2%). There is some contention on xpfo_lock. Average wait time does not > look high compared to other locks. Max

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-14 Thread Khalid Aziz
On 09/12/2018 09:37 AM, Julian Stecklina wrote: > Julian Stecklina writes: > >> Linus Torvalds writes: >> >>> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina >>> wrote: I've been spending some cycles on the XPFO patch set this week. For the patch set as it was posted for

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-14 Thread Khalid Aziz
On 09/12/2018 09:37 AM, Julian Stecklina wrote: > Julian Stecklina writes: > >> Linus Torvalds writes: >> >>> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina >>> wrote: I've been spending some cycles on the XPFO patch set this week. For the patch set as it was posted for

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-13 Thread Juerg Haefliger
On Wed, Sep 12, 2018 at 5:37 PM, Julian Stecklina wrote: > Julian Stecklina writes: > >> Linus Torvalds writes: >> >>> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina >>> wrote: I've been spending some cycles on the XPFO patch set this week. For the patch set as it was posted

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-13 Thread Juerg Haefliger
On Wed, Sep 12, 2018 at 5:37 PM, Julian Stecklina wrote: > Julian Stecklina writes: > >> Linus Torvalds writes: >> >>> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina >>> wrote: I've been spending some cycles on the XPFO patch set this week. For the patch set as it was posted

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-12 Thread Julian Stecklina
Julian Stecklina writes: > Linus Torvalds writes: > >> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: >>> >>> I've been spending some cycles on the XPFO patch set this week. For the >>> patch set as it was posted for v4.13, the performance overhead of >>> compiling a Linux kernel is

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-12 Thread Julian Stecklina
Julian Stecklina writes: > Linus Torvalds writes: > >> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: >>> >>> I've been spending some cycles on the XPFO patch set this week. For the >>> patch set as it was posted for v4.13, the performance overhead of >>> compiling a Linux kernel is

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-07 Thread Khalid Aziz
On 08/30/2018 10:00 AM, Julian Stecklina wrote: Hey everyone, On Mon, 20 Aug 2018 15:27 Linus Torvalds wrote: On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: It's the *kernel* we don't want being able to access those pages, because of the multitude of unfixable cache load gadgets.

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-07 Thread Khalid Aziz
On 08/30/2018 10:00 AM, Julian Stecklina wrote: Hey everyone, On Mon, 20 Aug 2018 15:27 Linus Torvalds wrote: On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: It's the *kernel* we don't want being able to access those pages, because of the multitude of unfixable cache load gadgets.

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-04 Thread Julian Stecklina
Andi Kleen writes: > On Sat, Sep 01, 2018 at 02:38:43PM -0700, Linus Torvalds wrote: >> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: >> > >> > I've been spending some cycles on the XPFO patch set this week. For the >> > patch set as it was posted for v4.13, the performance overhead

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-04 Thread Julian Stecklina
Andi Kleen writes: > On Sat, Sep 01, 2018 at 02:38:43PM -0700, Linus Torvalds wrote: >> On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: >> > >> > I've been spending some cycles on the XPFO patch set this week. For the >> > patch set as it was posted for v4.13, the performance overhead

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-03 Thread Andi Kleen
On Sat, Sep 01, 2018 at 06:33:22PM -0400, Wes Turner wrote: >Speaking of pages and slowdowns, >is there a better place to ask this question: >From "'Turning Tables' shared page tables vuln": >""" >'New "Turning Tables" Technique Bypasses All Windows Kernel Mitigations' > >

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-03 Thread Andi Kleen
On Sat, Sep 01, 2018 at 06:33:22PM -0400, Wes Turner wrote: >Speaking of pages and slowdowns, >is there a better place to ask this question: >From "'Turning Tables' shared page tables vuln": >""" >'New "Turning Tables" Technique Bypasses All Windows Kernel Mitigations' > >

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-03 Thread Andi Kleen
On Sat, Sep 01, 2018 at 02:38:43PM -0700, Linus Torvalds wrote: > On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: > > > > I've been spending some cycles on the XPFO patch set this week. For the > > patch set as it was posted for v4.13, the performance overhead of > > compiling a Linux

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-03 Thread Andi Kleen
On Sat, Sep 01, 2018 at 02:38:43PM -0700, Linus Torvalds wrote: > On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: > > > > I've been spending some cycles on the XPFO patch set this week. For the > > patch set as it was posted for v4.13, the performance overhead of > > compiling a Linux

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-03 Thread Julian Stecklina
Linus Torvalds writes: > On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: >> >> I've been spending some cycles on the XPFO patch set this week. For the >> patch set as it was posted for v4.13, the performance overhead of >> compiling a Linux kernel is ~40% on x86_64[1]. The overhead

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-03 Thread Julian Stecklina
Linus Torvalds writes: > On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: >> >> I've been spending some cycles on the XPFO patch set this week. For the >> patch set as it was posted for v4.13, the performance overhead of >> compiling a Linux kernel is ~40% on x86_64[1]. The overhead

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-01 Thread Linus Torvalds
On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: > > I've been spending some cycles on the XPFO patch set this week. For the > patch set as it was posted for v4.13, the performance overhead of > compiling a Linux kernel is ~40% on x86_64[1]. The overhead comes almost > completely from TLB

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-01 Thread Linus Torvalds
On Fri, Aug 31, 2018 at 12:45 AM Julian Stecklina wrote: > > I've been spending some cycles on the XPFO patch set this week. For the > patch set as it was posted for v4.13, the performance overhead of > compiling a Linux kernel is ~40% on x86_64[1]. The overhead comes almost > completely from TLB

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-31 Thread Tycho Andersen
On Thu, Aug 30, 2018 at 06:00:51PM +0200, Julian Stecklina wrote: > Hey everyone, > > On Mon, 20 Aug 2018 15:27 Linus Torvalds > wrote: > > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > >> > >> It's the *kernel* we don't want being able to access those pages, > >> because of the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-31 Thread Tycho Andersen
On Thu, Aug 30, 2018 at 06:00:51PM +0200, Julian Stecklina wrote: > Hey everyone, > > On Mon, 20 Aug 2018 15:27 Linus Torvalds > wrote: > > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > >> > >> It's the *kernel* we don't want being able to access those pages, > >> because of the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-31 Thread James Bottomley
On Mon, 2018-08-20 at 21:52 +, Woodhouse, David wrote: > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > Of course, after the long (and entirely unrelated) discussion about > > the TLB flushing bug we had, I'm starting to worry about my own > > competence, and maybe I'm

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-31 Thread James Bottomley
On Mon, 2018-08-20 at 21:52 +, Woodhouse, David wrote: > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > Of course, after the long (and entirely unrelated) discussion about > > the TLB flushing bug we had, I'm starting to worry about my own > > competence, and maybe I'm

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-31 Thread Julian Stecklina
Hey everyone, On Mon, 20 Aug 2018 15:27 Linus Torvalds wrote: > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: >> >> It's the *kernel* we don't want being able to access those pages, >> because of the multitude of unfixable cache load gadgets. > > Ahh. > > I guess the proof is in the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-31 Thread Julian Stecklina
Hey everyone, On Mon, 20 Aug 2018 15:27 Linus Torvalds wrote: > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: >> >> It's the *kernel* we don't want being able to access those pages, >> because of the multitude of unfixable cache load gadgets. > > Ahh. > > I guess the proof is in the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread Liran Alon
> On 21 Aug 2018, at 17:22, David Woodhouse wrote: > > On Tue, 2018-08-21 at 17:01 +0300, Liran Alon wrote: >> >>> On 21 Aug 2018, at 12:57, David Woodhouse >> wrote: >>> >>> Another alternative... I'm told POWER8 does an interesting thing >> with >>> hyperthreading and gang scheduling

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread Liran Alon
> On 21 Aug 2018, at 17:22, David Woodhouse wrote: > > On Tue, 2018-08-21 at 17:01 +0300, Liran Alon wrote: >> >>> On 21 Aug 2018, at 12:57, David Woodhouse >> wrote: >>> >>> Another alternative... I'm told POWER8 does an interesting thing >> with >>> hyperthreading and gang scheduling

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread David Woodhouse
On Tue, 2018-08-21 at 17:01 +0300, Liran Alon wrote: > > > On 21 Aug 2018, at 12:57, David Woodhouse > wrote: > >  > > Another alternative... I'm told POWER8 does an interesting thing > with > > hyperthreading and gang scheduling for KVM. The host kernel doesn't > > actually *see* the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread David Woodhouse
On Tue, 2018-08-21 at 17:01 +0300, Liran Alon wrote: > > > On 21 Aug 2018, at 12:57, David Woodhouse > wrote: > >  > > Another alternative... I'm told POWER8 does an interesting thing > with > > hyperthreading and gang scheduling for KVM. The host kernel doesn't > > actually *see* the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread Liran Alon
> On 21 Aug 2018, at 12:57, David Woodhouse wrote: > > Another alternative... I'm told POWER8 does an interesting thing with > hyperthreading and gang scheduling for KVM. The host kernel doesn't > actually *see* the hyperthreads at all, and KVM just launches the full > set of siblings when it

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread Liran Alon
> On 21 Aug 2018, at 12:57, David Woodhouse wrote: > > Another alternative... I'm told POWER8 does an interesting thing with > hyperthreading and gang scheduling for KVM. The host kernel doesn't > actually *see* the hyperthreads at all, and KVM just launches the full > set of siblings when it

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread David Woodhouse
On Mon, 2018-08-20 at 15:27 -0700, Linus Torvalds wrote: > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > > > > It's the *kernel* we don't want being able to access those pages, > > because of the multitude of unfixable cache load gadgets. > > Ahh. > > I guess the proof is in the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-21 Thread David Woodhouse
On Mon, 2018-08-20 at 15:27 -0700, Linus Torvalds wrote: > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > > > > It's the *kernel* we don't want being able to access those pages, > > because of the multitude of unfixable cache load gadgets. > > Ahh. > > I guess the proof is in the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Linus Torvalds
On Mon, Aug 20, 2018 at 4:27 PM Dave Hansen wrote: > > You're right that we could have a full physmap that we switch to for > kmap()-like access to user pages. But, the real problem is > transitioning pages from kernel to user usage since it requires shooting > down the old kernel mappings for

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Linus Torvalds
On Mon, Aug 20, 2018 at 4:27 PM Dave Hansen wrote: > > You're right that we could have a full physmap that we switch to for > kmap()-like access to user pages. But, the real problem is > transitioning pages from kernel to user usage since it requires shooting > down the old kernel mappings for

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Dave Hansen
On 08/20/2018 04:14 PM, David Woodhouse wrote: > If you need the physmap, then rather than manually mapping with 4KiB > pages, you just switch. Having first ensured that no malicious guest or > userspace is running on a sibling, of course. The problem is determining when "you need the physmap".

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Dave Hansen
On 08/20/2018 04:14 PM, David Woodhouse wrote: > If you need the physmap, then rather than manually mapping with 4KiB > pages, you just switch. Having first ensured that no malicious guest or > userspace is running on a sibling, of course. The problem is determining when "you need the physmap".

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread David Woodhouse
On Mon, 2018-08-20 at 15:59 -0700, Dave Hansen wrote: > On 08/20/2018 03:35 PM, Tycho Andersen wrote: > > Since meltdown hit, I haven't worked seriously on understand and > > implementing his suggestions, in part because it wasn't clear to me > > what pieces of the infrastructure we might be

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread David Woodhouse
On Mon, 2018-08-20 at 15:59 -0700, Dave Hansen wrote: > On 08/20/2018 03:35 PM, Tycho Andersen wrote: > > Since meltdown hit, I haven't worked seriously on understand and > > implementing his suggestions, in part because it wasn't clear to me > > what pieces of the infrastructure we might be

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Dave Hansen
On 08/20/2018 03:35 PM, Tycho Andersen wrote: > Since meltdown hit, I haven't worked seriously on understand and > implementing his suggestions, in part because it wasn't clear to me > what pieces of the infrastructure we might be able to re-use. Someone > who knows more about mm/ might be able to

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Dave Hansen
On 08/20/2018 03:35 PM, Tycho Andersen wrote: > Since meltdown hit, I haven't worked seriously on understand and > implementing his suggestions, in part because it wasn't clear to me > what pieces of the infrastructure we might be able to re-use. Someone > who knows more about mm/ might be able to

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Tycho Andersen
On Mon, Aug 20, 2018 at 03:27:52PM -0700, Linus Torvalds wrote: > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > > > > It's the *kernel* we don't want being able to access those pages, > > because of the multitude of unfixable cache load gadgets. > > Ahh. > > I guess the proof is in

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Tycho Andersen
On Mon, Aug 20, 2018 at 03:27:52PM -0700, Linus Torvalds wrote: > On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > > > > It's the *kernel* we don't want being able to access those pages, > > because of the multitude of unfixable cache load gadgets. > > Ahh. > > I guess the proof is in

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Linus Torvalds
On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > > It's the *kernel* we don't want being able to access those pages, > because of the multitude of unfixable cache load gadgets. Ahh. I guess the proof is in the pudding. Did somebody try to forward-port that patch set and see what the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Linus Torvalds
On Mon, Aug 20, 2018 at 3:02 PM Woodhouse, David wrote: > > It's the *kernel* we don't want being able to access those pages, > because of the multitude of unfixable cache load gadgets. Ahh. I guess the proof is in the pudding. Did somebody try to forward-port that patch set and see what the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Kees Cook
On Mon, Aug 20, 2018 at 2:52 PM, Woodhouse, David wrote: > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: >> >> Of course, after the long (and entirely unrelated) discussion about >> the TLB flushing bug we had, I'm starting to worry about my own >> competence, and maybe I'm missing

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Kees Cook
On Mon, Aug 20, 2018 at 2:52 PM, Woodhouse, David wrote: > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: >> >> Of course, after the long (and entirely unrelated) discussion about >> the TLB flushing bug we had, I'm starting to worry about my own >> competence, and maybe I'm missing

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Linus Torvalds
On Mon, Aug 20, 2018 at 2:26 PM Konrad Rzeszutek Wilk wrote: > > See eXclusive Page Frame Ownership (https://lwn.net/Articles/700606/) which > was posted > way back in in 2016.. Ok, so my gut feel is that the above was reasonable within the context of 2016, but that the XPFO model is completely

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Linus Torvalds
On Mon, Aug 20, 2018 at 2:26 PM Konrad Rzeszutek Wilk wrote: > > See eXclusive Page Frame Ownership (https://lwn.net/Articles/700606/) which > was posted > way back in in 2016.. Ok, so my gut feel is that the above was reasonable within the context of 2016, but that the XPFO model is completely

Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Konrad Rzeszutek Wilk
Hi! See eXclusive Page Frame Ownership (https://lwn.net/Articles/700606/) which was posted way back in in 2016.. In the last couple of months there has been a slew of CPU issues that have complicated a lot of things. The latest - L1TF - is still fresh in folks's mind and it is especially acute

Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-08-20 Thread Konrad Rzeszutek Wilk
Hi! See eXclusive Page Frame Ownership (https://lwn.net/Articles/700606/) which was posted way back in in 2016.. In the last couple of months there has been a slew of CPU issues that have complicated a lot of things. The latest - L1TF - is still fresh in folks's mind and it is especially acute