Re: Fix struct siginfo

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Wed Jan 19 2000 - 09:01:28 EST


> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:20 EST