]> xenbits.xensource.com Git - xen.git/commit
x86/clang: add retpoline support
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 31 Mar 2022 08:56:34 +0000 (10:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 31 Mar 2022 08:56:34 +0000 (10:56 +0200)
commitdc24f4342b718c570ec794a0fc953e82e894ee3c
tree542e1f7f55f7d8afac8238e4685ae10349f541f2
parent0caab659704bb0944a62f7535f3c726f5db922c5
x86/clang: add retpoline support

Detect whether the compiler supports clang retpoline option and enable
by default if available, just like it's done for gcc.

Note clang already disables jump tables when retpoline is enabled, so
there's no need to also pass the fno-jump-tables parameter. Also clang
already passes the return address in a register always on amd64, so
there's no need for any equivalent mindirect-branch-register
parameter.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 9412486707f8f1ca2eb31c2ef330c5e39c0a2f30
master date: 2022-02-21 18:17:56 +0000
xen/arch/x86/Kconfig
xen/arch/x86/arch.mk