Re: High UID support for Linux

Theodore Y. Ts'o (tytso@mit.edu)
Sat, 21 Nov 1998 00:35:42 -0500


Date: Thu, 19 Nov 1998 17:38:39 -0500
From: Jon Leonard <jbwl@umich.edu>

Has anybody looked seriously at supporting 32 bit UIDs on Linux? We'd
really like to make Linux a commodity at Umich, but with a user base of
about 100,000, high UIDs are an absolute requirement. I've only just
started looking at this, but scanning the include files, it would appear
that some platforms already support high UIDs, but not i386.

Just for grins, I tried changing the typedef in linux/types.h and
recompiling the kernel. Wouldn't even boot. Then I noticed that the
uid and gid fields in ext2 inodes are 16 bits. So it seems like this is
a project, not than a hack. (This was on 2.0.35.)

The ext2 inodes are the smallest part of the problem; there is already
space reserved in the node for the high bytes of the uid and gid
(although every so often I have to tell someone "no" when their favorite
ext2 patch wants to steal those bytes from the inode for their own
purposes).

The harder thing to do is creating the a system call which returns a
new stat structure, and then modifying libc to know about this new
system call --- if it happens to be there.

And of course, checking for all of the other places in the kernel which
might break when changing the size of the uid_t. I'm actually surprised
the your kernel didn't boot, but there may have been some assembly
language part of the kernel which is dependent on the 16 bit uid.

Anyway, this sounds like a great 2.3 project. I don't think it's
actually that hard, especially since glibc's stat already supports the
32-bit uid.

- Ted

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