<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 11, 2018 at 11:20 AM, Nico Williams <span dir="ltr"><<a href="mailto:nico@cryptonector.com" target="_blank">nico@cryptonector.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Suppose speculative execution never evicted cache lines in any cache,<br>
except a special, _small_ (say, 8 cache lines) cache only used during<br>
speculation.  Call this cache L0.<br>
<br>
When a speculated thread is committed <br></blockquote><div>...... </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Is this crazy?  Workable?  </blockquote><div><br></div><div>Neither crazy or ....<br><br>One example of L0 cache in place now is the register set.<br>If nothing else the register set differences between 32bit ABI programs</div><div>and 64bit API programs is the set of registers.  The more registers</div><div>the greater the context time.   However register sets like the Z80 might help.<br>More than the two sets of the Z80  but how many is a question. <br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If so, would there still be timing side-<br>
channel attacks on speculative execution left unadressed?  Perhaps there<br>
might be timing leaks via cache coherency effects?<br></blockquote><div><br></div><div>Cache line impact depends on associativity and the memory subsystem.<br>The speed differences are LARGE... <br>from <a href="https://gist.github.com/jboner/2841832" target="_blank">https://gist.github.com/<wbr>jboner/2841832</a><br><table class="m_7245501144127368545gmail-highlight m_7245501144127368545gmail-tab-size m_7245501144127368545gmail-js-file-line-container" style="box-sizing:border-box;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-LC1" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">Latency Comparison Numbers</td></tr><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-L2" class="m_7245501144127368545gmail-blob-num m_7245501144127368545gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7245501144127368545gmail-file-latency-txt-LC2" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">--------------------------</td></tr><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-L3" class="m_7245501144127368545gmail-blob-num m_7245501144127368545gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7245501144127368545gmail-file-latency-txt-LC3" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">L1 cache reference                           0.5 ns</td></tr><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-L4" class="m_7245501144127368545gmail-blob-num m_7245501144127368545gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7245501144127368545gmail-file-latency-txt-LC4" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">Branch mispredict                            5   ns</td></tr><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-L5" class="m_7245501144127368545gmail-blob-num m_7245501144127368545gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7245501144127368545gmail-file-latency-txt-LC5" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">L2 cache reference                           7   ns                      14x L1 cache</td></tr><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-L6" class="m_7245501144127368545gmail-blob-num m_7245501144127368545gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7245501144127368545gmail-file-latency-txt-LC6" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">Mutex lock/unlock                           25   ns</td></tr><tr style="box-sizing:border-box"><td id="m_7245501144127368545gmail-file-latency-txt-L7" class="m_7245501144127368545gmail-blob-num m_7245501144127368545gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7245501144127368545gmail-file-latency-txt-LC7" class="m_7245501144127368545gmail-blob-code m_7245501144127368545gmail-blob-code-inner m_7245501144127368545gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">Main memory reference                      100   ns                      20x L2 cache, 200x L1 cache</td></tr></tbody></table> </div></div><br><br clear="all"><div><br></div>-- <br><div class="m_7245501144127368545gmail_signature"><div dir="ltr">  T o m    M i t c h e l l</div></div>
</div></div>