From: John Fastabend <john.fastabend@gmail.com>
To: Song Liu <song@kernel.org>, Jiang Wang <jiang.wang@bytedance.com>
Cc: bpf <bpf@vger.kernel.org>,
cong.wang@bytedance.com, KP Singh <kpsingh@google.com>
Subject: Re: [PATCH] selftests/bpf: fix a compile error for BPF_F_BPRM_SECUREEXEC
Date: Mon, 28 Dec 2020 21:14:21 -0800 [thread overview]
Message-ID: <5feabb2d30e93_7421e208de@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <CAPhsuW4aYbyAdz0txmnudwe4E-NYoC3Up5oxd-LBzyfTtLGn7w@mail.gmail.com>
Song Liu wrote:
> On Wed, Dec 23, 2020 at 5:14 PM Jiang Wang <jiang.wang@bytedance.com> 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@bytedance.com>
>
> Thanks for the fix!
>
> Acked-by: Song Liu <songliubraving@fb.com>
>
> [...]
LGTM
Acked-by: John Fastabend <john.fastabend@gmail.com>
next prev parent reply other threads:[~2020-12-29 5:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-24 1:12 [PATCH] selftests/bpf: fix a compile error for BPF_F_BPRM_SECUREEXEC Jiang Wang
2020-12-28 18:37 ` Song Liu
2020-12-29 5:14 ` John Fastabend [this message]
2020-12-29 14:28 ` Daniel Borkmann
2020-12-29 18:39 ` [External] " Jiang Wang .
2020-12-28 18:41 ` Song Liu
2020-12-29 14:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5feabb2d30e93_7421e208de@john-XPS-13-9370.notmuch \
--to=john.fastabend@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=jiang.wang@bytedance.com \
--cc=kpsingh@google.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox