public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ptrace: fix 2.6.25 ptrace_bts_config structure declaration
@ 2008-02-21 16:45 Dave Anderson
  2008-02-22  9:19 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Anderson @ 2008-02-21 16:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo, markus.t.metzger, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]


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: anderson@redhat.com







[-- Attachment #2: ptrace-abi.patch --]
[-- Type: text/x-patch, Size: 450 bytes --]

--- linux-2.6.25-rc2/include/asm-x86/ptrace-abi.h.orig
+++ linux-2.6.25-rc2/include/asm-x86/ptrace-abi.h
@@ -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
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-22  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 16:45 [PATCH] ptrace: fix 2.6.25 ptrace_bts_config structure declaration Dave Anderson
2008-02-22  9:19 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox