From 622e52f44c4904c8e58cb23dc3259d69a9a6c38e Mon Sep 17 00:00:00 2001 From: bobogei81123 Date: Mon, 24 Aug 2020 13:36:18 -0700 Subject: sys/linux: make bpf_lsm_btf_id optional (#2054) Pull request #1971 add the resource bpf_lsm_btf_id and make that a required resource for bpf$BPF_LSM_PROG_LOAD. However, we need #2035 merged to get a bpf_lsm_btf_id, and the pull request is currently blocked by a pahole issue. Thus, bpf$BPF_LSM_PROG_LOAD will be disabled for now. This pull request makes bpf_lsm_btf_id optional for bpf$BPF_LSM_PROG_LOAD, so we can test this syscall before the issue is resolved. --- sys/linux/bpf_lsm.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/linux') diff --git a/sys/linux/bpf_lsm.txt b/sys/linux/bpf_lsm.txt index 7f5d88d9c..e59aa9310 100644 --- a/sys/linux/bpf_lsm.txt +++ b/sys/linux/bpf_lsm.txt @@ -9,7 +9,10 @@ syz_btf_id_by_name$bpf_lsm(name ptr[in, string[bpf_lsm_func_names]]) bpf_lsm_btf bpf$BPF_LSM_PROG_LOAD(cmd const[BPF_PROG_LOAD], arg ptr[in, bpf_lsm_prog], size len[arg]) fd_bpf_prog (timeout[500]) -type bpf_lsm_prog bpf_prog_t[const[BPF_PROG_TYPE_LSM, int32], const[BPF_LSM_MAC, int32], bpf_lsm_btf_id, const[0, int32]] +# NEED: After #2035 is merged (which we can't for now due to pahole issues), +# syz_btf_id_by_name should work and we can remove the optional flag from +# bpf_lsm_btf_id. +type bpf_lsm_prog bpf_prog_t[const[BPF_PROG_TYPE_LSM, int32], const[BPF_LSM_MAC, int32], bpf_lsm_btf_id[opt], const[0, int32]] # The list is generated by the following commands: # $ VMLINUX=[path to Linux kernel source directory]/vmlinux -- cgit mrf-deployment