Subject: Re: struct ucred changed.
To: Todd Vierling <tv@wasabisystems.com>
From: Alfred Perlstein <bright@mu.org>
List: tech-kern
Date: 11/29/2001 11:26:24
* Todd Vierling <tv@wasabisystems.com> [011129 11:12] wrote:
> On Thu, 29 Nov 2001, David Laight wrote:
> 
> : Aren't uid_t and gid_t 32 bit?
> : If so you (probably) haven't changed the alignment!
> 
> Depends on the system.  For instance, m68k a.out compat aligns structs and
> 32-bit objects on a 16-bit boundary.  (m68k ELF raises this to 32 bits,
> but m68k a.out compat is still afflicted.)
> 
> : If the 'ucred' structure is zero'd on creation a little-endian
> : system won't see a difference.
> : But you will have changed the values seen on a big-endian system.
> 
> ...the latter of which is quite important for cr_ngroups from userland.

One thing you might want to do is divorce the kernel ucred from the
userland ucred.  We've done that in FreeBSD and it's allowed us to
add mutexes and hang other references off the kernel ucred without
having to go through such pain.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
                           http://www.morons.org/rants/gpl-harmful.php3