aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2022-12-03 10:46:13 -0800
committerAlexei Starovoitov <[email protected]>2022-12-04 12:52:40 -0800
commitf53625649888c6ec9eeca151f802e905482c6698 (patch)
treece785f382237fb42178ddb609ae78bfb334357bf
parent8723ec22a31db3f400fce440c235ada0fff95657 (diff)
docs/bpf: Add KF_RCU documentation
Add proper KF_RCU documentation in kfuncs.rst. Signed-off-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
-rw-r--r--Documentation/bpf/kfuncs.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/bpf/kfuncs.rst b/Documentation/bpf/kfuncs.rst
index 90774479ab7a..b027fe16ee66 100644
--- a/Documentation/bpf/kfuncs.rst
+++ b/Documentation/bpf/kfuncs.rst
@@ -191,6 +191,15 @@ rebooting or panicking. Due to this additional restrictions apply to these
calls. At the moment they only require CAP_SYS_BOOT capability, but more can be
added later.
+2.4.8 KF_RCU flag
+-----------------
+
+The KF_RCU flag is used for kfuncs which have a rcu ptr as its argument.
+When used together with KF_ACQUIRE, it indicates the kfunc should have a
+single argument which must be a trusted argument or a MEM_RCU pointer.
+The argument may have reference count of 0 and the kfunc must take this
+into consideration.
+
2.5 Registering the kfuncs
--------------------------