mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-arch@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: struct user . u_ar0
Date: Sun, 28 Oct 2007 03:04:27 -0500	[thread overview]
Message-ID: <8bd0f97a0710280104k4784c7afo11b9d803e963ed13@mail.gmail.com> (raw)
In-Reply-To: <4723DDDD.8050900@zytor.com>

On 10/27/07, H. Peter Anvin <hpa@zytor.com> wrote:
> I recently noticed that all architectures appear to have an entry n
> struct user called u_ar0:
>
>    struct user_pt_regs * u_ar0;  /* Used by gdb to help find the values
> for */
>                                  /* the registers. */
>
> In all cases, u_ar0 is a pointer type, although the type of pointer
> varies with the architecture.
>
> However, under no conditions does this field ever contain a pointer
> value!  It is set by the a.out code and its derivatives as an offset,
> not a pointer value (there are a total of four references in the kernel,
> in arch/{m68k,blackfin}/kernel/process.c, arch/x86/ia32/ia32_aout.c and
> fs/binfmt_aout.c -- they are all functionally identical and write-only):
>
> dump.u_ar0 = (void *)(((unsigned long)(&dump.regs)) - ((unsigned
> long)(&dump)));
>
> Any reason to *NOT* change this field to "unsigned long"?  <asm/user.h>,
> where struct user is defined, is not exported to userspace in any
> architecture as far as I can tell, although <linux/user.h>, which just
> contains #include <asm/user.h>, *is* exported (clearly a bug.)

Blackfin doesnt support a.out, so it may be easier to just change it
to "reserved2" (assuming this structure is part of our ABI), or delete
it (assuming the structure is internal to the kernel only).
-mike

  reply	other threads:[~2007-10-28  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28  0:54 H. Peter Anvin
2007-10-28  8:04 ` Mike Frysinger [this message]
2007-10-28 18:27   ` H. Peter Anvin

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=8bd0f97a0710280104k4784c7afo11b9d803e963ed13@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®