Re: [RFC] x86/speculation: add L1 Terminal Fault / Foreshadow demo

2019-01-22 Thread Julian Stecklina
Kees Cook writes: > On Tue, Jan 22, 2019 at 8:15 AM Greg KH wrote: >> >> On Mon, Jan 21, 2019 at 10:36:18AM -0800, Andi Kleen wrote: >> > > + /* Check the start address: needs to be page-aligned.. */ >> > > +- if (start & ~PAGE_MASK) >> > > ++ if (start & ~PAGE_MASK) { >> > > ++ >> > > ++

Re: [RFC] x86/speculation: add L1 Terminal Fault / Foreshadow demo

2019-01-21 Thread Kees Cook
On Tue, Jan 22, 2019 at 8:15 AM Greg KH wrote: > > On Mon, Jan 21, 2019 at 10:36:18AM -0800, Andi Kleen wrote: > > > + /* Check the start address: needs to be page-aligned.. */ > > > +- if (start & ~PAGE_MASK) > > > ++ if (start & ~PAGE_MASK) { > > > ++ > > > ++ /* > > > ++

Re: [RFC] x86/speculation: add L1 Terminal Fault / Foreshadow demo

2019-01-21 Thread Greg KH
On Mon, Jan 21, 2019 at 10:36:18AM -0800, Andi Kleen wrote: > > + /* Check the start address: needs to be page-aligned.. */ > > +- if (start & ~PAGE_MASK) > > ++ if (start & ~PAGE_MASK) { > > ++ > > ++ /* > > ++ * XXX Hack > > ++ * > > ++ * We re-use this

Re: [RFC] x86/speculation: add L1 Terminal Fault / Foreshadow demo

2019-01-21 Thread Andi Kleen
> + /* Check the start address: needs to be page-aligned.. */ > +-if (start & ~PAGE_MASK) > ++if (start & ~PAGE_MASK) { > ++ > ++/* > ++ * XXX Hack > ++ * > ++ * We re-use this error case to show case a cache load gadget: > ++

[RFC] x86/speculation: add L1 Terminal Fault / Foreshadow demo

2019-01-21 Thread Julian Stecklina
This is a proof-of-concept self-contained L1TF demonstrator that works in the presence of the Linux kernel's default L1TF mitigation. This code does by design not work on a vanilla Linux kernel. The purpose is to help validate and improve defenses and not build a practical attack. The Linux