x86_init_func_common: Add ENDBR at function entry
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 27 Feb 2020 17:18:37 +0000 (09:18 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 26 Mar 2020 18:36:20 +0000 (18:36 +0000)
commit007e623025bfc1f66686d1e1cd6a3efeff863f69
treea15f229891e765278756aea43cb1810cabb73692
parent2d0599b1b46968dda34953118e92d8720875162c
x86_init_func_common: Add ENDBR at function entry

Intel Control-flow Enforcement Technology (CET):

https://software.intel.com/en-us/articles/intel-sdm

when IBT is enabled, all indirect branch targets must start with ENDBR
instruction which is a NOP on non-CET processors.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2575
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ben Widawsky <ben.widawsky@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3985>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3985>
src/gallium/auxiliary/rtasm/rtasm_x86sse.c