From 96e2da37710a4f74ccb24cf782cc98dd7c015e1c Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Thu, 24 Aug 2023 13:29:26 +0200 Subject: sys/linux: support O_PATH fds in BPF_OBJ_* cmds Commit [1] upstream added support for O_PATH fds in BPF_OBJ_* commands. This commit implements the same support in syzkaller. The flag BPF_F_PATH_FD must be set when passing an O_PATH to the BPF_OBJ_* commands. We therefore declare generic and O_PATH-specific variants of the existing BPF_OBJ structs. 1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cb8edce2807 Signed-off-by: Paul Chaignon --- sys/linux/bpf.txt.const | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/linux/bpf.txt.const') diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const index 176faccfa..9a2b54374 100644 --- a/sys/linux/bpf.txt.const +++ b/sys/linux/bpf.txt.const @@ -68,6 +68,7 @@ BPF_F_MMAPABLE = 1024 BPF_F_NO_COMMON_LRU = 2 BPF_F_NO_PREALLOC = 1 BPF_F_NUMA_NODE = 4 +BPF_F_PATH_FD = 16384 BPF_F_PRESERVE_ELEMS = 2048 BPF_F_QUERY_EFFECTIVE = 1 BPF_F_RDONLY = 8 -- cgit mrf-deployment