diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2022-08-05 23:48:14 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-08-09 18:11:17 +0200 |
commit | fa96b24204af42274ec13dfb2f2e6990d7510e55 (patch) | |
tree | ccc467d01ec4d09c09f9531b43e16b16ac6e490e /Documentation/bpf/kfuncs.rst | |
parent | bpf: Improve docstring for BPF_F_USER_BUILD_ID flag (diff) | |
download | linux-fa96b24204af42274ec13dfb2f2e6990d7510e55.tar.xz linux-fa96b24204af42274ec13dfb2f2e6990d7510e55.zip |
btf: Add a new kfunc flag which allows to mark a function to be sleepable
This allows to declare a kfunc as sleepable and prevents its use in
a non sleepable program.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Co-developed-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Hao Luo <haoluo@google.com>
Link: https://lore.kernel.org/r/20220805214821.1058337-2-haoluo@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'Documentation/bpf/kfuncs.rst')
-rw-r--r-- | Documentation/bpf/kfuncs.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/bpf/kfuncs.rst b/Documentation/bpf/kfuncs.rst index c0b7dae6dbf5..c8b21de1c772 100644 --- a/Documentation/bpf/kfuncs.rst +++ b/Documentation/bpf/kfuncs.rst @@ -146,6 +146,12 @@ that operate (change some property, perform some operation) on an object that was obtained using an acquire kfunc. Such kfuncs need an unchanged pointer to ensure the integrity of the operation being performed on the expected object. +2.4.6 KF_SLEEPABLE flag +----------------------- + +The KF_SLEEPABLE flag is used for kfuncs that may sleep. Such kfuncs can only +be called by sleepable BPF programs (BPF_F_SLEEPABLE). + 2.5 Registering the kfuncs -------------------------- |