[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 5/7] x86: guard against straight-line speculation past RET
On 10.11.2020 10:31, Roger Pau Monné wrote: > On Fri, Oct 23, 2020 at 10:38:04AM +0200, Jan Beulich wrote: >> Under certain conditions CPUs can speculate into the instruction stream >> past a RET instruction. Guard against this just like 3b7dab93f240 >> ("x86/spec-ctrl: Protect against CALL/JMP straight-line speculation") >> did - by inserting an "INT $3" insn. It's merely the mechanics of how to >> achieve this that differ: A set of macros gets introduced to post- >> process RET insns issued by the compiler (or living in assembly files). >> >> Unfortunately for clang this requires further features their built-in >> assembler doesn't support: We need to be able to override insn mnemonics >> produced by the compiler (which may be impossible, if internally >> assembly mnemonics never get generated), and we want to use \(text) >> escaping / quoting in the auxiliary macro. > > Could this have an option to enable/disable at build time? Well, a subsequent patch adds a config option for this, which in the worst case could be turned off. I'm afraid though I'm not clear about the question, because ... > FreeBSD will drop GNU as quite soon from base, and albeit it can be > installed as a package I would like to be able to build Xen using a > toolchain based on LLVM exclusively. ... it's not clear to me what the implications here are: Are you saying -no-integrated-as is not going to function anymore, unless people explicitly install gas? If that's not what you meant to indicate, then I don't see how building would become impossible. Depending on the situation as a whole, we might then be in need of a 2nd config option... And btw, good that you pointed me back at this: The v3 change wasn't quite complete, since we now don't need to check for proper \(text) handling anymore in our logic to establish CLANG_FLAGS. I've dropped that part for v4. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |