Skip to contentSkip to conversation

xen/check-endbr.sh: Explain the purpose of the script

PATCH In review Andrew Cooper 2 participants 2 messages Jul 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/check-endbr.sh: Explain the purpose of the script

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>

---
 xen/tools/check-endbr.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
xen/tools/check-endbr.sh +9 -0
index b97684ac25e9..bf153a570db4 100755
@@ -2,6 +2,15 @@
 #
 # Usage ./$0 xen-syms
 #
+# When CET-IBT (Control-flow Enforcement Technology, Indirect Branch Tracking)
+# is active, ENDBR instructions mark legal indirect branch targets in the
+# .text section.
+#
+# However x86 is a variable length instruction set so the same byte pattern
+# can exist embedded in other instructions, or crossing multiple instructions.
+# This script searches .text for any problematic byte patterns which aren't
+# legitimate ENDBR instructions.
+#
 set -e
 
 # Pretty-print parameters a little for message
Signature · 1 line
2.11.0