bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Petr Machata <petrm@nvidia.com>
Cc: ast@kernel.org, andrii@kernel.org, martin.lau@linux.dev,
	razor@blackwall.org, sdf@google.com, john.fastabend@gmail.com,
	kuba@kernel.org, dxu@dxuuu.xyz, joe@cilium.io, toke@kernel.org,
	davem@davemloft.net, bpf@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v6 2/8] bpf: Add fd-based tcx multi-prog infra with link support
Date: Sat, 22 Jul 2023 01:43:39 +0200	[thread overview]
Message-ID: <aaed850b-0c30-ab8f-09f6-9245f1af4e46@iogearbox.net> (raw)
In-Reply-To: <87a5vp6vrv.fsf@nvidia.com>

On 7/21/23 4:57 PM, Petr Machata wrote:
> As of this patch (commit e420bed02507), TC qdisc installation and/or
> removal cause memory access issues in the system.
> 
> A semi-minimal reproducer is:
> 
>      bash-5.2# ip l a name v1 type veth peer name v2
>      bash-5.2# ip l s dev v1 up
>      bash-5.2# ip l s dev v2 up
>      bash-5.2# tc q a dev v1 ingress
>      bash-5.2# tc q d dev v1 ingress
>      bash-5.2# tc q a dev v1 ingress
>      bash-5.2# tc q d dev v1 ingress
> 
> It's a bit finnicky, but only a little. For me, the first two "tc q"
> operations never triggered a splat. Then it could take a few "tc q a"
> "tc q d" iterations to get it to splat. So it looks like maybe the first
> "tc q d" is the problematic bit? And then there's some likelihood of
> failing on any following "tc q" operation. The above in particular
> produced three warning splats for me (attached as decoded.txt,
> decoded2.txt and decoded3.txt). Probing further:
> 
>      bash-5.2# tc q a dev v1 ingress
> 
> Produced two more splats from KASAN (decoded4.txt and decoded5.txt),
> which look more serious.
> 
> Further attempts to prod the system deadlock it, I guess because RTNL
> was left locked.
> 
> Reverting e420bed02507, and fe20ce3a5126 + 55cc3768473e that fail to
> build without it, makes net-next/main work again.

Sorry about that, fix should be here:
https://lore.kernel.org/netdev/20230721233330.5678-1-daniel@iogearbox.net/

Thanks,
Daniel

  reply	other threads:[~2023-07-21 23:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 14:08 [PATCH bpf-next v6 0/8] BPF link support for tc BPF programs Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 1/8] bpf: Add generic attach/detach/query API for multi-progs Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 2/8] bpf: Add fd-based tcx multi-prog infra with link support Daniel Borkmann
2023-07-20  2:13   ` Yafang Shao
2023-07-21 12:53     ` Daniel Borkmann
2023-07-21 14:57   ` Petr Machata
2023-07-21 23:43     ` Daniel Borkmann [this message]
2023-07-19 14:08 ` [PATCH bpf-next v6 3/8] libbpf: Add opts-based attach/detach/query API for tcx Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 4/8] libbpf: Add link-based " Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 5/8] libbpf: Add helper macro to clear opts structs Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 6/8] bpftool: Extend net dump with tcx progs Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 7/8] selftests/bpf: Add mprog API tests for BPF tcx opts Daniel Borkmann
2023-07-19 14:08 ` [PATCH bpf-next v6 8/8] selftests/bpf: Add mprog API tests for BPF tcx links Daniel Borkmann
2023-07-19 17:20 ` [PATCH bpf-next v6 0/8] BPF link support for tc BPF programs 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=aaed850b-0c30-ab8f-09f6-9245f1af4e46@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=dxu@dxuuu.xyz \
    --cc=joe@cilium.io \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=sdf@google.com \
    --cc=toke@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;
as well as URLs for NNTP newsgroup(s).