android_kernel_motorola_sm6375/fs/kernfs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Xu eae38ad74e
UPSTREAM: kernfs: Add option to enable user xattrs
User extended attributes are useful as metadata storage for kernfs
consumers like cgroups. Especially in the case of cgroups, it is useful
to have a central metadata store that multiple processes/services can
use to coordinate actions.

A concrete example is for userspace out of memory killers. We want to
let delegated cgroup subtree owners (running as non-root) to be able to
say "please avoid killing this cgroup". This is especially important for
desktop linux as delegated subtrees owners are less likely to run as
root.

This patch introduces a new flag, KERNFS_ROOT_SUPPORT_USER_XATTR, that
lets kernfs consumers enable user xattr support. An initial limit of 128
entries or 128KB -- whichever is hit first -- is placed per cgroup
because xattrs come from kernel memory and we don't want to let
unprivileged users accidentally eat up too much kernel memory.

Change-Id: I37209bfa1fde36e39eb81963968675c2f59ae2c2
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Acked-by: Chris Down <chris@chrisdown.name>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
2026-01-14 18:13:12 -08:00
..
dir.c BACKPORT: kernfs: convert kernfs_node->id from union kernfs_node_id to u64 2025-12-23 13:35:40 -08:00
file.c BACKPORT: kernfs: convert kernfs_node->id from union kernfs_node_id to u64 2025-12-23 13:35:40 -08:00
inode.c UPSTREAM: kernfs: Add option to enable user xattrs 2026-01-14 18:13:12 -08:00
Kconfig
kernfs-internal.h UPSTREAM: kernfs: Add option to enable user xattrs 2026-01-14 18:13:12 -08:00
Makefile
mount.c BACKPORT: kernfs: convert kernfs_node->id from union kernfs_node_id to u64 2025-12-23 13:35:40 -08:00
symlink.c