public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Anderson <anderson@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, markus.t.metzger@intel.com,
	David Woodhouse <dwmw2@infradead.org>
Subject: [PATCH] ptrace: fix 2.6.25 ptrace_bts_config structure declaration
Date: Thu, 21 Feb 2008 11:45:38 -0500	[thread overview]
Message-ID: <47BDAAB2.3000100@redhat.com> (raw)

[-- 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
 

             reply	other threads:[~2008-02-21 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 16:45 Dave Anderson [this message]
2008-02-22  9:19 ` [PATCH] ptrace: fix 2.6.25 ptrace_bts_config structure declaration Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47BDAAB2.3000100@redhat.com \
    --to=anderson@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@intel.com \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox