public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: "David S. Miller" <davem@davemloft•net>,
	Daniel Borkmann <daniel@iogearbox•net>,
	Alexei Starovoitov <ast@kernel•org>,
	Andrii Nakryiko <andriin@fb•com>, Martin KaFai Lau <kafai@fb•com>,
	Song Liu <songliubraving@fb•com>, Yonghong Song <yhs@fb•com>,
	John Fastabend <john.fastabend@gmail•com>,
	KP Singh <kpsingh@chromium•org>,
	Jesper Dangaard Brouer <hawk@kernel•org>,
	"Michael S. Tsirkin" <mst@redhat•com>,
	Romain Perier <romain.perier@gmail•com>,
	Allen Pais <apais@linux•microsoft.com>,
	Grygorii Strashko <grygorii.strashko@ti•com>,
	Simon Horman <simon.horman@netronome•com>,
	"Gustavo A. R. Silva" <gustavoars@kernel•org>,
	Lorenzo Bianconi <lorenzo@kernel•org>,
	Wei Yongjun <weiyongjun1@huawei•com>,
	Jiri Benc <jbenc@redhat•com>,
	oss-drivers@netronome•com, linux-omap@vger•kernel.org,
	netdev@vger•kernel.org, bpf@vger•kernel.org
Subject: Re: [PATCH bpf v3 3/7] netdevsim: Add debugfs toggle to reject BPF programs in verifier
Date: Wed, 09 Dec 2020 14:51:44 +0100	[thread overview]
Message-ID: <87pn3jnl3j.fsf@toke.dk> (raw)
In-Reply-To: <160751272126.104774.9977428866761146011.stgit@toke.dk>

Toke Høiland-Jørgensen <toke@redhat•com> writes:

> From: Toke Høiland-Jørgensen <toke@redhat•com>
>
> This adds a new debugfs toggle ('bpf_bind_verifier_accept') that can be
> used to make netdevsim reject BPF programs from being accepted by the
> verifier. If this toggle (which defaults to true) is set to false,
> nsim_bpf_verify_insn() will return EOPNOTSUPP on the last
> instruction (after outputting the 'Hello from netdevsim' verifier message).
>
> This makes it possible to check the verification callback in the driver
> from test_offload.py in selftests, since the verifier now clears the
> verifier log on a successful load, hiding the message from the driver.
>
> Fixes: 6f8a57ccf85 ("bpf: Make verifier log more relevant by default")

Ugh, the patchwork bot pointed out that I somehow managed to truncate
the commit ID here; apologies, will send a v4.

-Toke


  reply	other threads:[~2020-12-09 13:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 11:18 [PATCH bpf v3 0/7] selftests/bpf: Restore test_offload.py to working order Toke Høiland-Jørgensen
2020-12-09 11:18 ` [PATCH bpf v3 1/7] xdp: remove the xdp_attachment_flags_ok() callback Toke Høiland-Jørgensen
2020-12-09 11:18 ` [PATCH bpf v3 2/7] selftests/bpf/test_offload.py: Remove check for program load flags match Toke Høiland-Jørgensen
2020-12-09 11:18 ` [PATCH bpf v3 3/7] netdevsim: Add debugfs toggle to reject BPF programs in verifier Toke Høiland-Jørgensen
2020-12-09 13:51   ` Toke Høiland-Jørgensen [this message]
2020-12-09 11:18 ` [PATCH bpf v3 4/7] selftests/bpf/test_offload.py: only check verifier log on verification fails Toke Høiland-Jørgensen
2020-12-09 11:18 ` [PATCH bpf v3 5/7] selftests/bpf/test_offload.py: fix expected case of extack messages Toke Høiland-Jørgensen
2020-12-09 11:18 ` [PATCH bpf v3 6/7] selftests/bpf/test_offload.py: reset ethtool features after failed setting Toke Høiland-Jørgensen
2020-12-09 11:18 ` [PATCH bpf v3 7/7] selftests/bpf/test_offload.py: filter bpftool internal map when counting maps Toke Høiland-Jørgensen

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=87pn3jnl3j.fsf@toke.dk \
    --to=toke@redhat$(echo .)com \
    --cc=andriin@fb$(echo .)com \
    --cc=apais@linux$(echo .)microsoft.com \
    --cc=ast@kernel$(echo .)org \
    --cc=bpf@vger$(echo .)kernel.org \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=grygorii.strashko@ti$(echo .)com \
    --cc=gustavoars@kernel$(echo .)org \
    --cc=hawk@kernel$(echo .)org \
    --cc=jbenc@redhat$(echo .)com \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=kafai@fb$(echo .)com \
    --cc=kpsingh@chromium$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-omap@vger$(echo .)kernel.org \
    --cc=lorenzo@kernel$(echo .)org \
    --cc=mst@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=oss-drivers@netronome$(echo .)com \
    --cc=romain.perier@gmail$(echo .)com \
    --cc=simon.horman@netronome$(echo .)com \
    --cc=songliubraving@fb$(echo .)com \
    --cc=weiyongjun1@huawei$(echo .)com \
    --cc=yhs@fb$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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