Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-18 Thread Thomas Gleixner
On Tue, 18 Jun 2019, Tim Chen wrote: > On 6/17/19 1:30 PM, Jon Masters wrote: > > On 6/17/19 4:22 PM, Jon Masters wrote: > > > >>> + For kernel code that has been identified where data pointers could > >>> + potentially be influenced for Spectre attacks, new "nospec" accessor > >>> + macros

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-18 Thread Tim Chen
On 6/17/19 1:30 PM, Jon Masters wrote: > On 6/17/19 4:22 PM, Jon Masters wrote: > >>> + For kernel code that has been identified where data pointers could >>> + potentially be influenced for Spectre attacks, new "nospec" accessor >>> + macros are used to prevent speculative loading of data.

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Tim Chen
On 6/17/19 3:16 PM, Jonathan Corbet wrote: > On Mon, 17 Jun 2019 22:21:51 +0200 (CEST) > Thomas Gleixner wrote: > >>> +Spectre variant 1 attacks take advantage of speculative execution of >>> +conditional branches, while Spectre variant 2 attacks use speculative >>> +execution of indirect branche

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Jonathan Corbet
On Mon, 17 Jun 2019 22:21:51 +0200 (CEST) Thomas Gleixner wrote: > > +Spectre variant 1 attacks take advantage of speculative execution of > > +conditional branches, while Spectre variant 2 attacks use speculative > > +execution of indirect branches to leak privileged memory. See [1] [5] > > +[7]

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Jon Masters
On 6/17/19 4:22 PM, Jon Masters wrote: >> + For kernel code that has been identified where data pointers could >> + potentially be influenced for Spectre attacks, new "nospec" accessor >> + macros are used to prevent speculative loading of data. > > Maybe explain that nospec (speculative cl

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Thomas Gleixner
Tim, On Mon, 17 Jun 2019, Thomas Gleixner wrote: > Tim, > > On Mon, 17 Jun 2019, Tim Chen wrote: > > > +Spectre variant 1 attacks take advantage of speculative execution of > > +conditional branches, while Spectre variant 2 attacks use speculative > > +execution of indirect branches to leak pri

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Thomas Gleixner
Tim, On Mon, 17 Jun 2019, Tim Chen wrote: > +Spectre variant 1 attacks take advantage of speculative execution of > +conditional branches, while Spectre variant 2 attacks use speculative > +execution of indirect branches to leak privileged memory. See [1] [5] > +[7] [10] [11]. It would be great

Re: [PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Jon Masters
Hi Tim, Nice writeup. A few suggestions inline. On 6/17/19 3:11 PM, Tim Chen wrote: > +In Spectre variant 2 attacks, the attacker can steer speculative indirect > +branches in the victim to gadget code by poisoning the branch target > +buffer of a CPU used for predicting indirect branch addresse

[PATCH v3] Documentation: Add section about CPU vulnerabilities for Spectre

2019-06-17 Thread Tim Chen
Add documentation for Spectre vulnerability and the mitigation mechanisms: - Explain the problem and risks - Document the mitigation mechanisms - Document the command line controls - Document the sysfs files Co-developed-by: Andi Kleen Signed-off-by: Andi Kleen Co-developed-by: Tim Chen Signed