[MODERATED] Encrypted Message
Jon Masters <[email protected]>
| Newsgroups | org.kernel.lore.historical-speck |
|---|---|
| Message-ID | <[email protected]> |
On 3/1/19 3:58 PM, speck for Jon Masters wrote: > On 2/26/19 9:19 AM, speck for Josh Poimboeuf wrote: > >> On Fri, Feb 22, 2019 at 11:24:22PM +0100, speck for Thomas Gleixner wrote: >>> +MFBDS leaks Fill Buffer Entries. Fill buffers are used internally to manage >>> +L1 miss situations and to hold data which is returned or sent in response >>> +to a memory or I/O operation. Fill buffers can forward data to a load >>> +operation and also write data to the cache. When the fill buffer is >>> +deallocated it can retain the stale data of the preceding operations which >>> +can then be forwarded to a faulting or assisting load operation, which can >>> +be exploited under certain conditions. Fill buffers are shared between >>> +Hyper-Threads so cross thread leakage is possible. > > The fill buffers sit opposite the L1D$ and participate in coherency > directly. They supply data directly to the load store units. Here's the > internal summary I wrote (feel free to use any of it that is useful): > > "Intel processors utilize fill buffers to perform loads of data when a > miss occurs in the Level 1 data cache. The fill buffer allows the > processor to implement a non-blocking cache, continuing with other > operations while the necessary cache data “line” is loaded from a higher > level cache or from memory. It also allows the result of the fill to be > forwarded directly to the EU (Execution Unit) requiring the load, > without waiting for it to be written into the L1 Data Cache. > > A load operation is not decoupled in the same way that a store is, but > it does involve an AGU (Address Generation Unit) operation. If the AGU > generates a fault (#PF, etc.) or an assist (A/D bits) then the classical > Intel design would block the load and later reissue it. In contemporary > designs, it instead allows subsequent speculation operations to > temporarily see a forwarded data value from the fill buffer slot prior > to the load actually taking place. Thus it is possible to read data that > was recently accessed by another thread, if the fill buffer entry is not > reused. > > It is this attack that allows cross-thread SMT leakage and breaks HT > without recourse other than to disable it or to implement core > scheduling in the Linux kernel. > > Variants of this include loads that cross cache or page boundaries due > to further optimizations in Intel’s implementation. For example, Intel > incorporate logic to guess at address generation prior to determining > whether it crosses such a boundary (covered in US5335333A) and will > forward this to the TLB/load logic prior to resolving the full address. > They will retry the load by re-issuing uops in the case of a cross > cacheline/page boundary but in that case will leak state as well." Btw, I've various reproducers here that I'm happy to share if useful with the right folks. Thomas and Linus should already have my IFU one for later testing of that, I've also e.g. an FBBF. Currently it just spews whatever it sees from the other threads, but in the next few days I'll have it cleaned up to send/receive specific messages - then can just wrap it with a bow so it can print yes/no vulnerable. Ping if you have a need for a repro (keybase/email) and I'll go through our process for sharing as appropriate. Jon. -- Computer Architect | Sent with my Fedora powered laptop
(unnamed)
(text/rfc822-headers, 161 B)
From: Jon Masters <[email protected]> To: speck for Jon Masters <[email protected]> Subject: Re: [patch V4 04/11] x86/speculation/mds: Add mds_clear_cpu_buffer()