Re: [PATCH] selftests/bpf: fix a compile error for BPF_F_BPRM_SECUREEXEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Song Liu wrote:
> On Wed, Dec 23, 2020 at 5:14 PM Jiang Wang <jiang.wang@xxxxxxxxxxxxx> wrote:
> >
> > 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@xxxxxxxxxxxxx>
> 
> Thanks for the fix!
> 
> Acked-by: Song Liu <songliubraving@xxxxxx>
> 
> [...]


LGTM

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux