aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/bug.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2025-02-07 13:15:36 +0100
committerPeter Zijlstra <peterz@infradead.org>2025-02-14 10:32:06 +0100
commitc20ad96c9a8f0aeaf4e4057730a22de2657ad0c2 (patch)
treecaee2dd6840c85e0bf7dbdfbffed90fde043d154 /arch/x86/include/asm/bug.h
parentx86/alternative: Simplify callthunk patching (diff)
downloadlinux-c20ad96c9a8f0aeaf4e4057730a22de2657ad0c2.tar.gz
linux-c20ad96c9a8f0aeaf4e4057730a22de2657ad0c2.zip
x86/traps: Cleanup and robustify decode_bug()
Notably, don't attempt to decode an immediate when MOD == 3. Additionally have it return the instruction length, such that WARN like bugs can more reliably skip to the correct instruction. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20250207122546.721120726@infradead.org
Diffstat (limited to 'arch/x86/include/asm/bug.h')
-rw-r--r--arch/x86/include/asm/bug.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index e85ac0c7c039..1a5e4b372694 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -22,8 +22,9 @@
#define SECOND_BYTE_OPCODE_UD2 0x0b
#define BUG_NONE 0xffff
-#define BUG_UD1 0xfffe
-#define BUG_UD2 0xfffd
+#define BUG_UD2 0xfffe
+#define BUG_UD1 0xfffd
+#define BUG_UD1_UBSAN 0xfffc
#ifdef CONFIG_GENERIC_BUG