freenode
Kernel & Low-Level

Kernel RFC proposes native UUID and GUID user IDs

A 41-patch series from Jan Koester would let Linux processes, files, and credentials carry 128-bit directory identities without mapping them to fragile 32-bit numbers.

An RFC posted to the Linux kernel list proposes treating user and group IDs as full UUIDs or Microsoft GUIDs, not only classic 32-bit values, so machines joined to Active Directory, LDAP, and similar services no longer need local mapping tables that diverge, collide, or rewrite ownership on shared storage.

Jan Koester's second-round series argues that directory services already name people by 128-bit objectGUIDs and entryUUIDs. Today winbind, sssd, nfsidmap, and related helpers compress those into 32-bit ranges or hashes. The numbers differ across hosts unless every mapping is identical, collisions remain possible, and a backup or NFS export records whoever wrote the file on that machine rather than the identity the directory issued. Putting the 128-bit id in the kernel would make the directory's id the owner on disk and in every credential.

Internally, kernel uid and gid types become a tagged union holding a legacy number, a UUID, or a GUID. There is no reverse lookup table: the kernel compares, hashes, and stores the whole value. New system calls with an _r suffix accept a 20-byte structure that carries the type and payload. Existing 32-bit calls keep working and report the overflow id for any UUID or GUID, the same way older 16-bit calls once treated large uids. The rich ids exist only in the initial user namespace; child namespaces see the overflow id and gain no privilege over them, while idmapped mounts pass them through unchanged.

The series extends the surfaces that already carry ownership: socket peer credentials and SCM messages, siginfo and signalfd, System V IPC permission records, keyrings, procfs status, audit, POSIX ACL xattrs (a new version format), ext4 inodes via a read-only-compatible feature, overlayfs upper layers, devpts, ksmbd login and SIDs, and NFSv4 owner strings. Filesystems without the feature refuse such owners or mount read-only; classic AUTH_SYS and some fixed-size SMB POSIX SID buffers still cannot carry them and continue to show the overflow id.

Documentation and selftests accompany the RFC. The work is explicitly a request for comments, not a merged change, and would need broad review before any stable kernel could ship native 128-bit identities.