Lines Matching +full:write +full:- +full:1
1 .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
8 provides cgroup-bpf hook for sysctl.
11 process inside that cgroup tries to read from or write to sysctl knob in proc.
13 1. Attach type
26 __u32 write;
30 * ``write`` indicates whether sysctl value is being read (``0``) or written
31 (``1``). This field is read-only.
34 or written. This field is read-write. Writing to the field sets the starting
35 position in sysctl proc file ``read(2)`` will be reading from or ``write(2)``
37 whole sysctl value by ``bpf_sysctl_set_new_value()`` on ``write(2)`` even
38 when it's called by user space on ``file_pos > 0``. Writing non-zero
53 * ``1`` means "proceed with access".
55 If program returns ``0`` user space will get ``-1`` from ``read(2)`` or
56 ``write(2)`` and ``errno`` will be set to ``EPERM``.
69 ``read(2)`` from and ``write(2)`` to sysctl;
72 written to sysctl before actual write happens. This helper can be used only
73 on ``ctx->write == 1``;
76 written to sysctl before actual write happens. Sysctl value will be
77 overridden starting from the current ``ctx->file_pos``. If the whole value
79 to the helper. This helper can be used only on ``ctx->write == 1``. New
112 to read from / write to it and two such processes may run in different
116 As with any cgroup-bpf program additional care should be taken if an
122 .. _strtol(3): http://man7.org/linux/man-pages/man3/strtol.3p.html
123 .. _strtoul(3): http://man7.org/linux/man-pages/man3/strtoul.3p.html