[PATCH] D12277: [X86] Add intrinsic support for clac, stac, lgdt and sgdt

PaX Team via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 12:09:05 PDT 2015


On 24 Aug 2015 at 16:30, Reid Kleckner via llvm-commit wrote:

> They have no constraints, which means they are equivalent to a normal
> external function call. Isn't that enough of a barrier? I think most
> users (kernels, hypervisors) are fine with LLVM reordering identified
> object memory accesses across such a barrier. 

i think the compiler must not reorder any memory accesses across any
of lgdt/clac/stac as both the logical/virtual mappings (lgdt) and the
access rights (clac/stac) may change for such memory accesses and cause
misbehaviour (e.g., security bugs).



More information about the llvm-commits mailing list