]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/traps: Cleanup and robustify decode_bug()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 7 Feb 2025 12:15:36 +0000 (13:15 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 14 Feb 2025 09:32:06 +0000 (10:32 +0100)
commitc20ad96c9a8f0aeaf4e4057730a22de2657ad0c2
treecaee2dd6840c85e0bf7dbdfbffed90fde043d154
parentab9fea59487d8b5149a323e2092b7c0f53994dd5
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
arch/x86/include/asm/bug.h
arch/x86/include/asm/ibt.h
arch/x86/kernel/traps.c