Skip to contentSkip to conversation

MIPS: Quit exporting kernel internel break codes to uapi/asm/break.h

PATCH New David Daney 1 participant 1 message Feb 8, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Quit exporting kernel internel break codes to uapi/asm/break.h

From: David Daney <[email protected]>

The internal codes are not part of the kernel's abi.

---

The transition of break.h to /uapi/asm happened in 3.8rc, so it is not too late to prevent this crap from escaping to the kernel's userspace ABI.

 arch/mips/include/asm/break.h      | 27 +++++++++++++++++++++++++++
 arch/mips/include/uapi/asm/break.h | 12 +++---------
 2 files changed, 30 insertions(+), 9 deletions(-)
 create mode 100644 arch/mips/include/asm/break.h
arch/mips/include/asm/break.h new file +27 -0
new file mode 100644
index 0000000..67b6f72
@@ -0,0 +1,27 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995, 2003 by Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
+ */
+#ifndef __ASM_BREAK_H
+#define __ASM_BREAK_H
+
+#ifdef __UAPI_ASM_BREAK_H
+#error "Error: Do not directly include <uapi/asm/break.h>"
+#endif
+#include <uapi/asm/break.h>
+
+/*
+ * Break codes used internally to the kernel.
+ */
+#define BRK_BUG		512	/* Used by BUG() */
+#define BRK_KDB		513	/* Used in KDB_ENTER() */
+#define BRK_MEMU	514	/* Used by FPU emulator */
+#define BRK_KPROBE_BP	515	/* Kprobe break */
+#define BRK_KPROBE_SSTEPBP 516	/* Kprobe single step software implementation */
+#define BRK_MULOVF	1023	/* Multiply overflow */
+
+#endif /* __ASM_BREAK_H */
arch/mips/include/uapi/asm/break.h +3 -9
index 9161e68..ede4baa 100644
@@ -6,8 +6,8 @@
  * Copyright (C) 1995, 2003 by Ralf Baechle
  * Copyright (C) 1999 Silicon Graphics, Inc.
  */
-#ifndef __ASM_BREAK_H
-#define __ASM_BREAK_H
+#ifndef __UAPI_ASM_BREAK_H
+#define __UAPI_ASM_BREAK_H
 
 /*
  * The following break codes are or were in use for specific purposes in
@@ -27,11 +27,5 @@
 #define BRK_STACKOVERFLOW 9	/* For Ada stackchecking */
 #define BRK_NORLD	10	/* No rld found - not used by Linux/MIPS */
 #define _BRK_THREADBP	11	/* For threads, user bp (used by debuggers) */
-#define BRK_BUG		512	/* Used by BUG() */
-#define BRK_KDB		513	/* Used in KDB_ENTER() */
-#define BRK_MEMU	514	/* Used by FPU emulator */
-#define BRK_KPROBE_BP	515	/* Kprobe break */
-#define BRK_KPROBE_SSTEPBP 516	/* Kprobe single step software implementation */
-#define BRK_MULOVF	1023	/* Multiply overflow */
 
-#endif /* __ASM_BREAK_H */
+#endif /* __UAPI_ASM_BREAK_H */
Signature · 1 line
1.7.11.7