* [PATCH RESEND] cgroupv2, docs: fix misinformation in "device controller" section
@ 2021-09-08 8:08 ArthurChiao
2021-09-13 18:09 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: ArthurChiao @ 2021-09-08 8:08 UTC (permalink / raw)
To: cgroups; +Cc: linux-doc, ArthurChiao
Hotmail was rejected by the mailing list, switched to gmail to resend.
1. Clarify cgroup BPF program type and attach type;
2. Fix file path broken.
Signed-off-by: ArthurChiao <arthurchiao@hotmail.com>
---
Documentation/admin-guide/cgroup-v2.rst | 26 ++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 5c7377b5bd3e..ad83f87a042c 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -2159,19 +2159,19 @@ existing device files.
Cgroup v2 device controller has no interface files and is implemented
on top of cgroup BPF. To control access to device files, a user may
-create bpf programs of the BPF_CGROUP_DEVICE type and attach them
-to cgroups. On an attempt to access a device file, corresponding
-BPF programs will be executed, and depending on the return value
-the attempt will succeed or fail with -EPERM.
-
-A BPF_CGROUP_DEVICE program takes a pointer to the bpf_cgroup_dev_ctx
-structure, which describes the device access attempt: access type
-(mknod/read/write) and device (type, major and minor numbers).
-If the program returns 0, the attempt fails with -EPERM, otherwise
-it succeeds.
-
-An example of BPF_CGROUP_DEVICE program may be found in the kernel
-source tree in the tools/testing/selftests/bpf/progs/dev_cgroup.c file.
+create bpf programs of type BPF_PROG_TYPE_CGROUP_DEVICE and attach
+them to cgroups with BPF_CGROUP_DEVICE flag. On an attempt to access a
+device file, corresponding BPF programs will be executed, and depending
+on the return value the attempt will succeed or fail with -EPERM.
+
+A BPF_PROG_TYPE_CGROUP_DEVICE program takes a pointer to the
+bpf_cgroup_dev_ctx structure, which describes the device access attempt:
+access type (mknod/read/write) and device (type, major and minor numbers).
+If the program returns 0, the attempt fails with -EPERM, otherwise it
+succeeds.
+
+An example of BPF_PROG_TYPE_CGROUP_DEVICE program may be found in
+tools/testing/selftests/bpf/progs/dev_cgroup.c in the kernel source tree.
RDMA
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] cgroupv2, docs: fix misinformation in "device controller" section
2021-09-08 8:08 [PATCH RESEND] cgroupv2, docs: fix misinformation in "device controller" section ArthurChiao
@ 2021-09-13 18:09 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2021-09-13 18:09 UTC (permalink / raw)
To: ArthurChiao; +Cc: cgroups, linux-doc, ArthurChiao
On Wed, Sep 08, 2021 at 04:08:15PM +0800, ArthurChiao wrote:
> Hotmail was rejected by the mailing list, switched to gmail to resend.
>
> 1. Clarify cgroup BPF program type and attach type;
> 2. Fix file path broken.
>
> Signed-off-by: ArthurChiao <arthurchiao@hotmail.com>
Applied to cgroup/for-5.15-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-13 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-08 8:08 [PATCH RESEND] cgroupv2, docs: fix misinformation in "device controller" section ArthurChiao
2021-09-13 18:09 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).