Revision da4282c17d695b9311608aa63b3c633e649aadea authored by Jiang Wang on 24 December 2020, 01:12:42 UTC, committed by Daniel Borkmann on 29 December 2020, 14:16:21 UTC
When CONFIG_BPF_LSM is not configured, running bpf selftesting will show BPF_F_BPRM_SECUREEXEC undefined error for bprm_opts.c. The problem is that bprm_opts.c includes vmliunx.h. The vmlinux.h is generated by "bpftool btf dump file ./vmlinux format c". On the other hand, BPF_F_BPRM_SECUREEXEC is defined in include/uapi/linux/bpf.h and used only in bpf_lsm.c. When CONFIG_BPF_LSM is not set, bpf_lsm will not be compiled, so vmlinux.h will not include definition of BPF_F_BPRM_SECUREEXEC. Ideally, we want to compile bpf selftest regardless of the configuration setting, so change the include file from vmlinux.h to bpf.h. Signed-off-by: Jiang Wang <jiang.wang@bytedance.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20201224011242.585967-1-jiang.wang@bytedance.com
1 parent 4bfc471
File | Mode | Size |
---|---|---|
.gitignore | -rw-r--r-- | 62 bytes |
Kconfig | -rw-r--r-- | 3.4 KB |
Makefile | -rw-r--r-- | 4.1 KB |
blacklist.c | -rw-r--r-- | 4.0 KB |
blacklist.h | -rw-r--r-- | 84 bytes |
blacklist_hashes.c | -rw-r--r-- | 166 bytes |
blacklist_nohashes.c | -rw-r--r-- | 122 bytes |
system_certificates.S | -rw-r--r-- | 828 bytes |
system_keyring.c | -rw-r--r-- | 8.7 KB |
Computing file changes ...