Skip to contentSkip to conversation

x86/asm: Use UD2 mnemonic in <asm/bug.h>

PATCH New Uros Bizjak 1 participant 1 message Sep 9, 2025 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/asm: Use UD2 mnemonic in <asm/bug.h>

Current minimum required version of binutils is 2.30, which supports UD2 instruction mnemonic.

Replace the byte-wise specification of UD2 with this proper mnemonic.

No functional change intended.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/include/asm/bug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/bug.h +1 -1
index e427a3f7b751..de6015765015 100644
@@ -9,7 +9,7 @@
 /*
  * Despite that some emulators terminate on UD2, we use it for WARN().
  */
-#define ASM_UD2		".byte 0x0f, 0x0b"
+#define ASM_UD2		"ud2"
 #define INSN_UD2	0x0b0f
 #define LEN_UD2		2
 
Signature · 1 line
2.51.0