All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "John Fastabend" <john.fastabend@gmail.com>,
	"Sechang Lim" <rhkrqnwk98@gmail.com>
Cc: "Jiayuan Chen" <jiayuan.chen@linux.dev>,
	"Jakub Sitnicki" <jakub@cloudflare.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Kuniyuki Iwashima" <kuniyu@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Willem de Bruijn" <willemb@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Simon Horman" <horms@kernel.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf] bpf, sockmap: fix lock inversion between stab->lock and sk_callback_lock
Date: Fri, 19 Jun 2026 14:55:18 -0700	[thread overview]
Message-ID: <DJDD01YMA1GE.3G7B4LE5H780G@gmail.com> (raw)
In-Reply-To: <ajLR9CRn6O27Ound@john-p8>

On Wed Jun 17, 2026 at 9:59 AM PDT, John Fastabend wrote:
>
> The bot also thinks it found another locking issue. I'm not sure
> supporting 'tc' is really needed here. sockmap is much more easy
> to reason about from socket layer. What about just blocking sockmap
> manipulations from these prog types.
>
> My current thinking on sockmap at the moment is its has sprawled
> across so many layers the locking is overly tricky to reason about.
>
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index d9bdc3b32c05..5e08d3e03453 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -8567,11 +8567,7 @@ static bool may_update_sockmap(struct bpf_verifier_env *env, int func_id)
>                          return true;
>                  break;
>          case BPF_PROG_TYPE_SOCKET_FILTER:
> -       case BPF_PROG_TYPE_SCHED_CLS:
> -       case BPF_PROG_TYPE_SCHED_ACT:
> -       case BPF_PROG_TYPE_XDP:
>          case BPF_PROG_TYPE_SK_REUSEPORT:
> -       case BPF_PROG_TYPE_FLOW_DISSECTOR:
>          case BPF_PROG_TYPE_SK_LOOKUP:
>                  return true;

+1. Let's disable.

      reply	other threads:[~2026-06-19 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  9:11 [PATCH bpf] bpf, sockmap: fix lock inversion between stab->lock and sk_callback_lock Sechang Lim
2026-06-16  9:24 ` sashiko-bot
2026-06-16 10:17 ` Jiayuan Chen
2026-06-16 18:40   ` Sechang Lim
2026-06-17 16:59     ` John Fastabend
2026-06-19 21:55       ` Alexei Starovoitov [this message]

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=DJDD01YMA1GE.3G7B4LE5H780G@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jakub@cloudflare.com \
    --cc=jiayuan.chen@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rhkrqnwk98@gmail.com \
    --cc=willemb@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.