x86: Introduce helpers/checks for endbr64 instructions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 26 Nov 2021 15:34:08 +0000 (15:34 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 25 Mar 2022 17:06:38 +0000 (17:06 +0000)
commit1857cff82c5ff3ae4971e644aad3a6e1391f0280
tree82f117cbfa7b83799eaece32bd2bb391ed3d0ea1
parentf18d3a07a84d1c9c06e2cbf10da2f6f15d55431a
x86: Introduce helpers/checks for endbr64 instructions

... to prevent the optimiser creating unsafe code.  See the code comment for
full details.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 4046ba97446e3974a4411db227263a9f11e0aeb4)

Note: For the backport to 4.14 thru 4.16, we don't care for embedded endbr64
      specifically, but place_endbr64() is a prerequisite for other parts of
      the series.
xen/include/asm-x86/endbr.h [new file with mode: 0644]