aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbobogei81123 <chmnchiang@google.com>2020-08-24 13:36:18 -0700
committerGitHub <noreply@github.com>2020-08-24 13:36:18 -0700
commit622e52f44c4904c8e58cb23dc3259d69a9a6c38e (patch)
treef73d07db50b5b1ce83c1ada7fbff8f55b6d6a7e3 /sys
parent9e08308fe145de471082b83b28ada6e84706b9a5 (diff)
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/linux/bpf_lsm.txt5
1 files changed, 4 insertions, 1 deletions
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