This is a note to let you know that I've just added the patch titled

    x86: Use enum instead of literals for trap values [PARTIAL]

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-use-enum-instead-of-literals-for-trap-values.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected]  Thu Jan 24 12:43:57 2013
From: Kees Cook <[email protected]>
Date: Thu, 24 Jan 2013 14:14:20 -0600
Subject: x86: Use enum instead of literals for trap values [PARTIAL]
To: Greg KH <[email protected]>
Message-ID: <[email protected]>
Content-Disposition: inline

From: Kees Cook <[email protected]>

[Based on commit c94082656dac74257f63e91f78d5d458ac781fa5 upstream, only
taking the traps.h portion.]

The traps are referred to by their numbers and it can be difficult to
understand them while reading the code without context. This patch adds
enumeration of the trap numbers and replaces the numbers with the correct
enum for x86.

Signed-off-by: Kees Cook <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected]>
Signed-off-by: Robin Holt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 arch/x86/include/asm/traps.h |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_X86_TRAPS_H
 #define _ASM_X86_TRAPS_H
 
+#include <linux/kprobes.h>
 #include <asm/debugreg.h>
 #include <asm/siginfo.h>                       /* TRAP_TRACE, ... */
 
@@ -87,4 +88,29 @@ asmlinkage void smp_thermal_interrupt(vo
 asmlinkage void mce_threshold_interrupt(void);
 #endif
 
+/* Interrupts/Exceptions */
+enum {
+       X86_TRAP_DE = 0,        /*  0, Divide-by-zero */
+       X86_TRAP_DB,            /*  1, Debug */
+       X86_TRAP_NMI,           /*  2, Non-maskable Interrupt */
+       X86_TRAP_BP,            /*  3, Breakpoint */
+       X86_TRAP_OF,            /*  4, Overflow */
+       X86_TRAP_BR,            /*  5, Bound Range Exceeded */
+       X86_TRAP_UD,            /*  6, Invalid Opcode */
+       X86_TRAP_NM,            /*  7, Device Not Available */
+       X86_TRAP_DF,            /*  8, Double Fault */
+       X86_TRAP_OLD_MF,        /*  9, Coprocessor Segment Overrun */
+       X86_TRAP_TS,            /* 10, Invalid TSS */
+       X86_TRAP_NP,            /* 11, Segment Not Present */
+       X86_TRAP_SS,            /* 12, Stack Segment Fault */
+       X86_TRAP_GP,            /* 13, General Protection Fault */
+       X86_TRAP_PF,            /* 14, Page Fault */
+       X86_TRAP_SPURIOUS,      /* 15, Spurious Interrupt */
+       X86_TRAP_MF,            /* 16, x87 Floating-Point Exception */
+       X86_TRAP_AC,            /* 17, Alignment Check */
+       X86_TRAP_MC,            /* 18, Machine Check */
+       X86_TRAP_XF,            /* 19, SIMD Floating-Point Exception */
+       X86_TRAP_IRET = 32,     /* 32, IRET Exception */
+};
+
 #endif /* _ASM_X86_TRAPS_H */


Patches currently in stable-queue which might be from [email protected] are

queue-3.0/x86-use-enum-instead-of-literals-for-trap-values.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to