Skip to contentSkip to conversation

ptrace: fix 2.6.25 ptrace_bts_config structure declaration

PATCH Applied Dave Anderson 2 participants 2 messages Feb 21, 2008 – Feb 22, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptrace: fix 2.6.25 ptrace_bts_config structure declaration

The 2.6.25 ptrace_bts_config structure in asm-x86/ptrace-abi.h is defined with u32 types:

  #include <asm/types.h>

  /* configuration/status structure used in PTRACE_BTS_CONFIG and
     PTRACE_BTS_STATUS commands.
  */
  struct ptrace_bts_config {
          /* requested or actual size of BTS buffer in bytes */
          u32 size;
          /* bitmask of below flags */
          u32 flags;
          /* buffer overflow signal */
          u32 signal;
          /* actual size of bts_struct in bytes */
          u32 bts_size;
  };
  #endif

But u32 is only accessible in asm-x86/types.h if __KERNEL__, leading to compile errors when ptrace.h is included from user-space. Perhaps the double-underscore versions that are exported to user-space in asm-x86/types.h should be used instead?

Signed-off-by [email protected]
include/asm-x86/ptrace-abi.h renamed from include/asm-x86/ptrace-abi.h.orig +4 -4
@@ -89,13 +89,13 @@
 */
 struct ptrace_bts_config {
 	/* requested or actual size of BTS buffer in bytes */
-	u32 size;
+	__u32 size;
 	/* bitmask of below flags */
-	u32 flags;
+	__u32 flags;
 	/* buffer overflow signal */
-	u32 signal;
+	__u32 signal;
 	/* actual size of bts_struct in bytes */
-	u32 bts_size;
+	__u32 bts_size;
 };
 #endif
 
Applied
#1 lore raw
Quoted 2 lines · Dave Anderson

The 2.6.25 ptrace_bts_config structure in asm-x86/ptrace-abi.h is defined with u32 types:

thanks, applied.

Ingo