Skip to contentSkip to conversation

locking/refcounts: Switch to UD2 for exceptions

PATCH New Kees Cook 2 participants 2 messages Feb 25, 2018 – Feb 28, 2018 x86

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 locking/refcounts: Switch to UD2 for exceptions

As done in commit 3b3a371cc9bc ("x86/debug: Use UD2 for WARN()"), this switches to UD2 from UD0 to keep disassembly readable.

---
 arch/x86/include/asm/refcount.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/refcount.h +1 -1
index 4e44250e7d0d..ebe0ae2548b6 100644
@@ -17,7 +17,7 @@
 #define _REFCOUNT_EXCEPTION				\
 	".pushsection .text..refcount\n"		\
 	"111:\tlea %[counter], %%" _ASM_CX "\n"		\
-	"112:\t" ASM_UD0 "\n"				\
+	"112:\t" ASM_UD2 "\n"				\
 	ASM_UNREACHABLE					\
 	".popsection\n"					\
 	"113:\n"					\
Signature · 6 lines
2.7.4


-- 
Kees Cook
Pixel Security
#1 lore raw

[tip:x86/urgent] x86/refcounts: Switch to UD2 for exceptions

x86/refcounts: Switch to UD2 for exceptions
Commit-ID:  cb097be7036aa325adba33d8c41fe77b980b0e77
Gitweb:     https://git.kernel.org/tip/cb097be7036aa325adba33d8c41fe77b980b0e77
Author:     Kees Cook <[email protected]>
AuthorDate: Sun, 25 Feb 2018 08:50:56 -0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 28 Feb 2018 15:18:40 +0100

x86/refcounts: Switch to UD2 for exceptions

As done in commit 3b3a371cc9bc ("x86/debug: Use UD2 for WARN()"), this switches to UD2 from UD0 to keep disassembly readable.

---
 arch/x86/include/asm/refcount.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/refcount.h +1 -1
index d65171120e90..4cf11d88d3b3 100644
@@ -17,7 +17,7 @@
 #define _REFCOUNT_EXCEPTION				\
 	".pushsection .text..refcount\n"		\
 	"111:\tlea %[counter], %%" _ASM_CX "\n"		\
-	"112:\t" ASM_UD0 "\n"				\
+	"112:\t" ASM_UD2 "\n"				\
 	ASM_UNREACHABLE					\
 	".popsection\n"					\
 	"113:\n"					\