Re: [RFC PATCH] x86/arch_prctl: Add ARCH_SET_XCR0 to mask XCR0 per-thread
From: Andi Kleen
Date: Mon Jun 18 2018 - 12:58:49 EST
> Unfortunately, that is insufficient. Almost difference in CPU behavior
> between the replayer
> and the replayee. In particular, the problems for rr here are
> 1) xgetbv, which can introduce differing register contents (and if
> code branches on this,
> potentially differences in control flow).
So you're saying that software checks XGETBV first before checking
CPUID?
That seems broken. Without AVX XGETBV may not exist.
You always have to check CPUID first. And then it should just branch
around the XGETBV.
So we're talking about a workaround for broken software. The question
is how wide spread is it?
> 2) xsave writing more memory than the trace expects, causing
> divergence in the memory
> contents of the process.
Do memory contents which are never read by the application matter?
-Andi