Migrating to larger numbers

H. Peter Anvin (hpa@transmeta.com)
27 May 1999 00:16:43 GMT


Okay, 2.3 is out; it's time to get some fundamental data types
expanded:

REQUIRED:

uid_t, gid_t: 32 bits minimum, 32 bits probably OK.
dev_t: 32 bits minimum, suggest 64 bits (split 16:48, 24:40
or 32:32).

SOME PEOPLE HAVE SUGGESTED:

off_t, time_t, ino_t.

It seems to me that the proper implementation order of these are:

1. Implement in the filesystems, especially ext2.
Recall that uid_t, gid_t and dev_t both have -1 (0xffff) reserved
in a 16-bit environment; the two former because -1 is special in most
system calls and the latter by explicit allocation for this
purpose.

dev_t should be easy: most filesystems store device numbers in
block pointers, and have plenty of spare block pointers. UMSDOS
doesn't, but has a 12-byte spare field. UMSDOS also have the
option of migrating to a new format and have umssync do the
conversion. If so, I suggest the following:

a. Call the file --umsdos.--- (a filesystem shouldn't be
OS-specific, really...)
b. Store the unmangled name in the file! Since the DOS namespace
is, to put it mildly, weird, it's probably quite a bad idea to
assume that we'll be able to keep the mangling scheme constant
while needing to avoid things like common device names
(MSCD001, anyone?)

2. Implement the system calls.

3. Hook it up in glibc.

-hpa

-- 
"The user's computer downloads the ActiveX code and simulates a 'Blue
Screen' crash, a generally benign event most users are familiar with
and that would not necessarily arouse suspicions."
-- Security exploit description on http://www.zks.net/p3/how.asp

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