From 3c29a5fa10a3ca45b251e02c4153a75f45fa8f1c Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 2 May 2023 23:34:59 +0200 Subject: sys/linux: support CO-RE info in PROG_LOAD command Commit [1] upstream added support via the bpf(2) PROG_LOAD command to load BTF CO-RE relocation data. This commit adds basic support for loading the same data in syzkaller. As usual with BTF, we are pretty limited in what we can efficiently describe :-( 1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fbd94c7afcf9 Signed-off-by: Paul Chaignon --- sys/linux/bpf.txt.const | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sys/linux/bpf.txt.const') diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const index 6d68cdbba..176faccfa 100644 --- a/sys/linux/bpf.txt.const +++ b/sys/linux/bpf.txt.const @@ -35,6 +35,20 @@ BPF_CGROUP_UDP4_RECVMSG = 19 BPF_CGROUP_UDP4_SENDMSG = 14 BPF_CGROUP_UDP6_RECVMSG = 20 BPF_CGROUP_UDP6_SENDMSG = 15 +BPF_CORE_ENUMVAL_EXISTS = 10 +BPF_CORE_ENUMVAL_VALUE = 11 +BPF_CORE_FIELD_BYTE_OFFSET = 0 +BPF_CORE_FIELD_BYTE_SIZE = 1 +BPF_CORE_FIELD_EXISTS = 2 +BPF_CORE_FIELD_LSHIFT_U64 = 4 +BPF_CORE_FIELD_RSHIFT_U64 = 5 +BPF_CORE_FIELD_SIGNED = 3 +BPF_CORE_RELO_SIZE = 16 +BPF_CORE_TYPE_EXISTS = 8 +BPF_CORE_TYPE_ID_LOCAL = 6 +BPF_CORE_TYPE_ID_TARGET = 7 +BPF_CORE_TYPE_MATCHES = 12 +BPF_CORE_TYPE_SIZE = 9 BPF_DIV0 = 3 BPF_DW0 = 3 BPF_ENABLE_STATS = 32 -- cgit mrf-deployment