This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Fix struct siginfo
- To: aj at suse dot de (Andreas Jaeger)
- Subject: Re: Fix struct siginfo
- From: Alan Cox <alan at lxorguk dot ukuu dot org dot uk>
- Date: Wed, 19 Jan 2000 14:01:28 +0000 (GMT)
- Cc: torvalds at transmeta dot com, wingc at engin dot umich dot edu (Chris Wing),libc-alpha at sourceware dot cygnus dot com, linux-kernel at vger dot rutgers dot edu
> The fix for struct siginfo in 2.3.39 was not necessary since uid_t was
> already aligned on a 32bit boundary for ix86 and arm. This patch
The other two bytes don't contain defined values for all 2.2.x/2.3.x kernels.
The memset to clear the other bits went in during 2.2.x so it isnt
safe to trust that an old kernel returns 0 for the padding. Earlier 2.2.x
hands back [Random.W}[uid.w]
Also the 16bit squashed uid format is important for the old binaries to get
correct data. You dont want uid 65536 being misinterpreted as uid 0 by
an old binary. The existing code hands back a plausible token, your change
appears not to do so.
You are right that the field is big enough on most architectures (not m68k
I think as that pads to word alignment - a quirk I had much fun with when
doing mac68k sysv fs support).
You are wrong that it is safe to use the other bytes.
Linus please reject this patch, or revert it if you applied it
Alan