Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Victor Nogueira <victor@mojatatu.com>,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	jiri@resnulli.us, horms@kernel.org, vega@nebusec.ai,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] net/sched: Avoid quadratic handle scan in qdisc_alloc_handle
Date: Tue, 15 Sep 2026 08:53:04 -0700	[thread overview]
Message-ID: <20260915085304.775a829a@kernel.org> (raw)
In-Reply-To: <CAM0EoMk7CZA2qAPEfvZ_+tUDkcUYF5nanaxER1soLJQZqMuXxQ@mail.gmail.com>

On Tue, 15 Sep 2026 07:50:54 -0400 Jamal Hadi Salim wrote:
> On Mon, Sep 14, 2026 at 10:11 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Fri, 11 Sep 2026 10:31:46 -0300 Victor Nogueira wrote:  
> > > This is a less intrusive fix meant for backporting; a cleaner approach that
> > > uses a per-device IDA over all qdisc handles is planned for net-next.  
> >
> > I don't think this is net-worthy in the first place.
> > We have a ton of code under rtnl_lock.
> > We cannot provide any protection from malicious netns admin from
> > overloading the machine.  
> 
> That is the one million dollar question.  We labelled this as net for
> this exact reason. i.e malicious container could overload the whole
> machine.
> But it borders on "hardening" (improves performance), so net-next as a
> target sounds reasonable. It was a coin toss.

IMO any attack from containers / user ns is hardening. If it leads
to a crash we take it via net _because it's a crash_ not because
user ns can trigger it.
 
> Since we have a few similar "grey" issues in our pending queue - so
> where's the line for net/net-next?

TBH the line shifts depending on how bad the AI flood is.
I tried to document some rules but it only lead to bikesheding.
So my recommendation is to write the final fix, without worrying
about keeping it simple. And assume the maintainers will redirect
to the other tree based on their judgement when applying.

With all the AI kiddies these days we routinely apply to a different
tree than tagged.

> > Nothing against the patch itself, but if you plan to do something
> > else in net-next let's just go with that from the start..  
> 
> We could resend the same patch for net-next, the alternative "proper
> fix" is more intrusive. See attached.

I'm not sure we have to do this, given Victor's patch already
drops the time 50x ?

> Another option: Is this worth fixing?

Right, I think it is but IDK if it's worth maintaining state for.
IOW Victor's patch would be enough for my taste.

  parent reply	other threads:[~2026-09-15 15:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 13:31 [PATCH net] net/sched: Avoid quadratic handle scan in qdisc_alloc_handle Victor Nogueira
2026-09-14  8:22 ` Simon Horman
2026-09-15  2:11 ` Jakub Kicinski
2026-09-15 11:50   ` Jamal Hadi Salim
2026-09-15 12:28     ` Eric Dumazet
2026-09-15 14:01       ` Jamal Hadi Salim
2026-09-15 15:53     ` Jakub Kicinski [this message]
2026-09-16 10:34       ` Jamal Hadi Salim
2026-09-17  0:04         ` Jakub Kicinski
2026-09-17 11:24           ` Jamal Hadi Salim
2026-09-18  0:46             ` Jakub Kicinski

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=20260915085304.775a829a@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vega@nebusec.ai \
    --cc=victor@mojatatu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox