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.)
-hpa
-
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Eric W. Biederman | [PATCH] nfs lockd reclaimer: Convert to kthread API |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
