----- On Nov 14, 2017, at 11:08 AM, Peter Zijlstra peterz@xxxxxxxxxxxxx wrote:
On Tue, Nov 14, 2017 at 05:05:41PM +0100, Peter Zijlstra wrote:What I'm trying to reproduce is something that breaks in single-threaded
On Tue, Nov 14, 2017 at 03:17:12PM +0000, Mathieu Desnoyers wrote:And even if you could, you can always execute a local serializing
I've tried to create a small single-threaded self-modifying loop inI thought the whole problem was per definition multi-threaded.
user-space to trigger a trace cache or speculative execution quirk,
but I have not succeeded yet. I suspect that I would need to know
more about the internals of the processor architecture to create the
right stalls that would allow speculative execution to move further
ahead, and trigger an incoherent execution flow. Ideas on how to
trigger this would be welcome.
Single-threaded stuff can't get out of sync with itself; you'll always
observe your own stores.
instruction like CPUID to force things.
case if I explicitly leave out the CPUID core serializing instruction
when doing code modification on upcoming code, in a loop.
AFAIU, Intel requires a core serializing instruction to be issued even
in single-threaded scenarios between code update and execution, to ensure
that speculative execution does not observe incoherent code. Now the
question we all have for Intel is: is this requirement too strong, or
required by reality ?