Song Liu
b95ee9049c
bpf: Introduce bpf_cgroup_read_xattr to read xattr of cgroup's node
...
BPF programs, such as LSM and sched_ext, would benefit from tags on
cgroups. One common practice to apply such tags is to set xattrs on
cgroupfs folders.
Introduce kfunc bpf_cgroup_read_xattr, which allows reading cgroup's
xattr.
Note that, we already have bpf_get_[file|dentry]_xattr. However, these
two APIs are not ideal for reading cgroupfs xattrs, because:
1) These two APIs only works in sleepable contexts;
2) There is no kfunc that matches current cgroup to cgroupfs dentry.
bpf_cgroup_read_xattr is generic and can be useful for many program
types. It is also safe, because it requires trusted or rcu protected
argument (KF_RCU). Therefore, we make it available to all program types.
Signed-off-by: Song Liu <song@kernel.org >
Link: https://lore.kernel.org/20250623063854.1896364-3-song@kernel.org
Acked-by: Tejun Heo <tj@kernel.org >
Signed-off-by: Christian Brauner <brauner@kernel.org >
2025-07-02 14:18:20 +02:00
..
2025-06-02 15:04:06 -07:00
2024-10-08 14:41:53 +02:00
2025-03-24 10:47:14 -07:00
2025-06-02 15:04:06 -07:00
2025-04-08 11:24:36 +02:00
2025-06-04 19:14:24 -07:00
2024-09-18 11:44:43 +02:00
2025-04-07 09:36:20 +02:00
2025-05-28 11:59:25 -07:00
2025-06-02 15:04:06 -07:00
2025-06-06 17:56:19 -07:00
2025-02-27 20:00:17 +01:00
2025-05-31 19:12:53 -07:00
2025-04-08 19:32:11 -07:00
2025-04-08 11:24:36 +02:00
2025-04-07 15:22:12 +02:00
2025-06-08 09:07:37 +02:00
2025-04-08 11:24:36 +02:00
2025-05-26 09:33:44 -07:00
2024-10-15 15:58:36 +02:00
2025-06-02 15:04:06 -07:00
2025-05-26 20:25:23 +09:00
2025-05-29 12:31:23 +02:00
2025-04-29 13:08:20 +02:00
2025-06-08 09:07:37 +02:00
2025-05-30 08:40:25 -07:00
2025-02-27 20:00:17 +01:00
2024-11-06 10:42:06 +01:00
2025-06-02 15:31:05 -07:00
2025-05-30 19:20:20 +02:00
2025-04-19 22:48:59 +02:00
2025-05-07 07:31:08 -06:00
2025-04-02 12:25:03 -07:00
2025-02-27 20:00:17 +01:00
2025-04-01 09:29:18 -07:00
2025-05-28 09:26:07 +02:00
2025-04-15 11:56:57 +02:00
2025-06-08 09:07:37 +02:00
2025-05-22 20:54:38 +02:00
2025-05-31 15:44:16 -07:00
2025-07-02 14:18:20 +02:00
2025-03-10 09:11:13 -04:00
2025-02-27 20:00:17 +01:00
2025-06-02 15:04:06 -07:00
2025-06-03 16:13:32 -07:00
2025-05-28 17:17:14 -04:00
2025-06-03 16:13:32 -07:00
2025-06-08 09:07:37 +02:00
2024-10-02 17:23:23 -04:00
2025-05-29 10:34:26 -07:00
2025-06-02 16:00:26 -07:00
2025-06-08 09:07:37 +02:00
2025-04-28 10:54:39 +02:00
2025-05-28 12:05:30 -07:00
2025-06-06 17:54:09 -07:00
2025-05-31 19:12:53 -07:00
2025-04-05 10:30:12 +02:00
2024-12-03 10:40:36 +01:00
2025-04-08 11:24:36 +02:00
2025-02-27 20:00:17 +01:00
2025-06-04 20:32:55 +02:00
2025-06-08 10:20:21 -07:00
2025-05-27 19:40:33 -07:00
2025-04-15 18:46:10 +02:00
2025-04-08 11:24:36 +02:00
2025-06-07 07:24:07 -07:00
2025-05-07 12:04:07 +02:00
2025-05-14 22:40:55 -04:00
2025-02-12 14:00:11 -08:00
2025-04-07 09:36:48 +02:00
2025-02-17 11:34:15 -08:00
2025-06-02 12:49:16 -07:00
2025-05-07 07:31:07 -06:00
2025-05-07 08:00:11 -06:00
2025-04-07 16:19:04 +02:00
2024-10-10 10:20:51 +02:00
2024-12-02 11:25:09 +01:00
2025-02-27 20:00:17 +01:00
2025-03-07 20:07:33 -08:00
2025-05-26 09:02:39 -07:00
2025-01-10 08:49:05 -08:00
2025-04-08 11:24:36 +02:00
2025-07-02 14:18:20 +02:00
2025-05-26 08:23:09 -07:00
2024-10-22 11:16:57 +02:00
2024-10-17 18:38:49 +01:00
2025-05-21 13:59:12 +02:00
2025-06-02 12:49:16 -07:00
2025-05-26 09:02:39 -07:00
2025-02-07 16:53:04 +01:00
2025-02-21 10:25:31 +01:00
2025-05-02 14:21:26 +02:00
2025-05-31 15:44:16 -07:00
2024-12-09 11:34:29 +01:00
2024-12-17 09:16:11 +01:00
2025-04-21 10:27:58 +02:00
2025-04-22 18:16:09 +02:00
2025-04-14 13:05:59 +02:00
2025-04-14 13:05:59 +02:00
2025-04-21 10:27:59 +02:00
2025-02-07 16:53:04 +01:00
2025-02-12 10:02:10 +01:00
2025-03-05 11:52:50 +01:00
2025-03-20 13:06:51 +01:00
2025-05-26 09:33:44 -07:00
2025-05-26 09:33:44 -07:00
2025-05-16 11:05:40 +02:00
2024-11-03 01:28:06 -05:00
2025-05-26 09:33:44 -07:00
2025-01-28 13:48:37 +01:00
2025-05-16 11:05:40 +02:00
2025-02-12 12:12:27 +01:00
2025-05-26 17:35:32 -04:00
2025-05-09 12:37:48 +02:00
2025-05-26 09:02:39 -07:00
2025-06-08 10:35:12 -07:00
2025-03-24 11:38:12 -07:00
2025-05-15 12:03:12 +02:00
2025-05-26 11:17:01 -07:00
2025-05-11 17:54:12 -07:00
2025-05-26 17:35:32 -04:00
2025-05-09 18:06:27 -04:00
2024-10-22 11:16:59 +02:00
2025-05-23 14:20:44 +02:00
2025-05-15 12:03:12 +02:00
2025-05-29 12:31:23 +02:00
2024-11-03 01:28:07 -05:00
2025-04-21 10:27:58 +02:00
2024-10-22 11:16:57 +02:00
2025-02-21 10:25:31 +01:00
2025-04-25 12:11:56 +02:00
2025-05-26 12:56:01 -07:00
2024-11-03 01:28:06 -05:00
2025-05-30 15:38:29 -07:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2025-03-25 10:54:15 -07:00
2025-05-07 23:39:39 -07:00
2024-11-03 01:28:06 -05:00
2025-04-28 10:53:22 +02:00