aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/bpf.txt
diff options
context:
space:
mode:
authorPaul Chaignon <paul.chaignon@gmail.com>2024-10-10 00:14:22 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-10-10 09:10:20 +0000
commitd44647df1f3b9d3b0e1ae15e2cd12ede672283fb (patch)
treebcb482af8197733426a3a01b05ff55e91e83a307 /sys/linux/bpf.txt
parent3937a9e90d502451ef8555e1ed1eca08dd50da7b (diff)
sys/linux: describe new BTF types
Describe four new BTF types introduced in commits [1, 2, 3, 4] upstream. Note BTF_KIND_TAG was later renamed to BTF_KIND_DECL_TAG. These four types are also described in the documentation at [5]. 1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1828f0b04828 2 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b5ea834dde6b6 3 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8c42d2fa4eeab 4 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6089fb325cf73 5 - https://docs.kernel.org/bpf/btf.html#btf-kind-float Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/linux/bpf.txt')
-rw-r--r--sys/linux/bpf.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt
index 9f856d70c..2f4a7bd50 100644
--- a/sys/linux/bpf.txt
+++ b/sys/linux/bpf.txt
@@ -671,6 +671,10 @@ btf_type [
func_proto btf_type_func_proto
var btf_type_var
datasec btf_type_datasec
+ float btf_type_float
+ decl_tag btf_type_decl_tag
+ type_tag btf_type_type_tag
+ enum64 btf_type_enum64
] [varlen]
btf_type_int {
@@ -797,6 +801,52 @@ btf_var_secinfo {
size int32
}
+btf_float_size = 2, 4, 8, 12, 16
+
+btf_type_float {
+ name_off btf_name_off
+ info_vlen const[0, int16]
+ info_pad const[0, int8]
+ info_typ const[BTF_KIND_FLOAT, int8]
+ size flags[btf_float_size, int32]
+}
+
+btf_type_decl_tag {
+ name_off btf_name_off
+ info_vlen const[0, int16]
+ info_pad const[0, int8]
+ info_typ const[BTF_KIND_DECL_TAG, int8]
+ type btf_type_id
+# -1 or the index of a struct field or function argument.
+ component_idx int32[-1:10]
+}
+
+btf_type_type_tag {
+ name_off btf_name_off
+ info_vlen const[0, int16]
+ info_pad const[0, int8]
+ info_typ const[BTF_KIND_TYPE_TAG, int8]
+ type btf_type_id
+}
+
+btf_enum64_sizes = 1, 2, 4, 8
+
+btf_type_enum64 {
+ name_off btf_name_off
+ info_vlen len[enum64, int16]
+ info_pad const[0, int8]
+ info_typ const[BTF_KIND_ENUM64, int8:7]
+ info_kflag int8:1
+ size flags[btf_enum64_sizes, int32]
+ enum64 array[btf_enum64]
+}
+
+btf_enum64 {
+ name_off btf_name_off
+ val_lo32 int32
+ val_hi32 int32
+}
+
bpf_btf_strings {
z0 const[0, int8]
data array[flags[bpf_btf_strings_elem, int8]]