Skip to content

Commit

Permalink
x86 ptrace: fix ptrace_bts_config structure declaration
Browse files Browse the repository at this point in the history
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. The double-underscore versions that are exported
to user-space in asm-x86/types.h should be used instead.

Signed-off-by: Dave Anderson <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Dave Anderson authored and Ingo Molnar committed Feb 29, 2008
1 parent b4ef95d commit 53c5858
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/asm-x86/ptrace-abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 53c5858

Please sign in to comment.