Skip to content

Commit c56a12c

Browse files
author
Peter Zijlstra
committed
x86/bug: Fix old GCC compile fails
For some mysterious reasons the GCC 8 and 9 preprocessor manages to sporadically fumble _ASM_BYTES(0x0f, 0x0b): $ grep ".byte[ ]*0x0f" defconfig-build/drivers/net/wireless/realtek/rtlwifi/base.s 1: .byte0x0f,0x0b ; 1: .byte 0x0f,0x0b ; which makes the assembler upset and all that. While there are more _ASM_BYTES() users (notably the NOP instructions), those don't seem affected. Therefore replace the offending ASM_UD2 with one using the ud2 mnemonic. Reported-by: Jean Delvare <jdelvare@suse.de> Suggested-by: Uros Bizjak <ubizjak@gmail.com> Fixes: 85a2d4a ("x86,ibt: Use UDB instead of 0xEA") Cc: stable@kernel.org Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20251218104659.GT3911114@noisy.programming.kicks-ass.net
1 parent 0edc78b commit c56a12c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • arch/x86/include/asm

arch/x86/include/asm/bug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);
1515
/*
1616
* Despite that some emulators terminate on UD2, we use it for WARN().
1717
*/
18-
#define ASM_UD2 _ASM_BYTES(0x0f, 0x0b)
18+
#define ASM_UD2 __ASM_FORM(ud2)
1919
#define INSN_UD2 0x0b0f
2020
#define LEN_UD2 2
2121

0 commit comments

Comments
 (0)