[LWN Logo]

Date:   Thu, 8 Jul 1999 23:28:48 -0400 (EDT)
From:   Chris Wing <wingc@engin.umich.edu>
To:     linux-kernel@vger.rutgers.edu
Subject: ANNOUNCE: 32-bit UID patch for Linux 2.0, 2.2

Hi. I sent a message to linux-kernel late last year announcing the first
version of this patch, a patch I wrote to support 32-bit UIDs for Linux
2.0. Since people are still asking about 32-bit UIDs on a regular basis, I
thought that it would be a good idea to announce that I have since updated
the patch for newer kernels, including Linux 2.2, rewritten the code to be
a lot cleaner and the patch is now much smaller and more reasonable. 

If you need to use 32-bit UIDs on your Linux systems and you don't mind
running a modified kernel, these patches are for you. 

The code can be downloaded from:
	http://www.engin.umich.edu/caen/systems/Linux/highuids

There, you can find the patches for Linux 2.0.36, Linux 2.2.5, glibc 2.0,
and glibc 2.1. I have also supplied precompiled, drop-in replacements for
the glibc and kernel RPMs in Red Hat 5.2 and Red Hat 6.0. (i386)

Sorry, at the present time I do not have access to an anonymous FTP server
to distribute these patches from. 


The patch for Linux 2.0 is against 2.0.36, and it also applies cleanly to
2.0.37. It should be considered stable, as it has been run continuously
for months without any problems. 

The patch for Linux 2.2 is against 2.2.5, because that is what Red Hat 6.0
is using, and I am using Red Hat 6.0. It would not take much effort to
produce a new patch for a different version of 2.2, or even 2.3, but so
far I simply haven't needed one. Please ask me to make one if you do. 

The Linux 2.2 patch has also been used successfully for several months
here without any problems, but there still are one or two things I may
want to touch up and optimize. 


Brief technical details:

	The kernel patches maintain 100% backwards compatibility with
everything except binary-only kernel modules :), by adding the minimum
number of necessary new system calls to handle 32-bit UIDs and preserving
all original system calls. A patched version of glibc 2.0 or 2.1 is
necessary in order to use the new 32-bit system calls, but since glibc has
always used 32-bit UIDs, you do not need to recompile any of your software
(provided it was linked against glibc to begin with). 
	The 32-bit UIDs are stored in the reserved area of the inode on
ext2 filesystems, and at least ufs and nfs also should work successfully
with 32-bit UIDs. I have used the Arla AFS filesystem implementation
extensively with 32-bit UIDs. 

	The Linux 2.0 patch only supports i386 architecture and ext2 for
storing 32-bit UIDs; the 2.2 patch tries to support/fix everything but has
only been tested on i386. 

Yet to do:
	- C library support for using 32-bit UIDs and semctl(), shmctl(),
	  msgctl()
	- backwards compatibility in the C library (this is a pain due to
	  the way that glibc builds itself)
	- test 2.2 patch on non-i386 platforms
	- support for sparc32 (why is the sparc32 system call table oddly
	  spaced? cache reasons?)


I did this work on behalf of the University of Michigan, College of
Engineering computer network (CAEN). U-M is (probably) one of the few
organizations that needs 32-bit UID support, as we have over 130,000 users
in a campus-wide shared Unix environment.  (files and home directories are
stored in AFS, /afs/*umich.edu) 

Feel free to write back for more information.

Thank you very much,

Chris Wing
wingc@engin.umich.edu




"It hasn't crashed my machine so far and yes, it actually works."


-
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/