]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xattr,net: support limited amount of extended attributes on sockfs sockets
authorChristian Brauner <brauner@kernel.org>
Mon, 16 Feb 2026 13:32:06 +0000 (14:32 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 2 Mar 2026 10:06:42 +0000 (11:06 +0100)
commitb6d6ab1b6dd2ead98f8915e47895ea4014ac3cb2
treebb32f45071c14eeebee6758fbb388c7bd3bc47c2
parent4fbe9e78bb415dd632ff63a9f620af0be58ef820
xattr,net: support limited amount of extended attributes on sockfs sockets

Now that we've generalized the infrastructure for user.* xattrs make it
possible to set up to 128 user.* extended attributes on a sockfs inode
or up to 128kib. kernfs (cgroupfs) has the same limits and it has proven
to be quite sufficient for nearly all use-cases.

This will allow containers to label sockets and will e.g., be used by
systemd and Gnome to find various sockets in containers where
high-privilege or more complicated solutions aren't available.

Link: https://patch.msgid.link/20260216-work-xattr-socket-v1-10-c2efa4f74cb7@kernel.org
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
net/socket.c