diff options
author | 2022-08-05 14:48:14 -0700 | |
---|---|---|
committer | 2022-08-09 09:11:17 -0700 | |
commit | fa96b24204af42274ec13dfb2f2e6990d7510e55 (patch) | |
tree | ccc467d01ec4d09c09f9531b43e16b16ac6e490e /include | |
parent | bpf: Improve docstring for BPF_F_USER_BUILD_ID flag (diff) | |
download | linux-fa96b24204af42274ec13dfb2f2e6990d7510e55.tar.gz linux-fa96b24204af42274ec13dfb2f2e6990d7510e55.tar.bz2 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 'include')
-rw-r--r-- | include/linux/btf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/btf.h b/include/linux/btf.h index cdb376d53238..976cbdd2981f 100644 --- a/include/linux/btf.h +++ b/include/linux/btf.h @@ -49,6 +49,7 @@ * for this case. */ #define KF_TRUSTED_ARGS (1 << 4) /* kfunc only takes trusted pointer arguments */ +#define KF_SLEEPABLE (1 << 5) /* kfunc may sleep */ struct btf; struct btf_member; |