netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Thomas Graf <tgraf@suug.ch>,
	David Laight <David.Laight@ACULAB.COM>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"paulmck@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"john.r.fastabend@intel.com" <john.r.fastabend@intel.com>,
	"josh@joshtriplett.org" <josh@joshtriplett.org>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH 7/9] rhashtable: Per bucket locks & deferred expansion/shrinking
Date: Sat, 17 Jan 2015 11:56:23 +0000	[thread overview]
Message-ID: <20150117115622.GA8502@acer.localdomain> (raw)
In-Reply-To: <20150117101309.GA19585@gondor.apana.org.au>

On 17.01, Herbert Xu wrote:
> On Sat, Jan 17, 2015 at 09:51:46AM +0000, Patrick McHardy wrote:
> > 
> > I agree, however at least in the case of nftables you can easily do the same thing by adding millions of rules.
> 
> I think that's a problem in itself.  If a single packet can kill
> the CPU through millions of rules, then namespaces would be a joke.
> There has to be a limit to the number of rules or the processing
> has to be deferred into thread context (thus subject to scheduler
> control) at some point.

I think that's a problem that's unrelated to netfilter. Its quite easy
to configure something that will make the network stack eat up all
the CPU, consider f.i.:

bridge name	bridge id		STP enabled	interfaces
br0		8000.625dda62a3d4	no		veth0
							veth1

Now thing of bridging, veth, TC actions, iptables, routing, all in
combination. Sure, single cases can be caught it might be possible
to restrict them, but I don't believe that in the near term we will
be able to handle this properly.

And even if all loops etc are handled, what keeps the user from
creating a million veth devices and putting them into a long
chain?

This needs to be fixed on a different level in my opinion.

> > It doesn't make things worse.
> 
> So I don't think that's a valid justification for ignoring this
> hash table problem.

  reply	other threads:[~2015-01-17 11:56 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1418647641.git.tgraf@suug.ch>
2014-12-15 12:51 ` [PATCH 1/9] rhashtable: Do hashing inside of rhashtable_lookup_compare() Thomas Graf
2014-12-15 12:51 ` [PATCH 5/9] nft_hash: Remove rhashtable_remove_pprev() Thomas Graf
2014-12-15 12:51 ` [PATCH 7/9] rhashtable: Per bucket locks & deferred expansion/shrinking Thomas Graf
2015-01-16 15:34   ` Patrick McHardy
2015-01-16 15:58     ` Thomas Graf
2015-01-16 16:03       ` Patrick McHardy
2015-01-16 16:15         ` Thomas Graf
2015-01-16 16:32           ` Patrick McHardy
2015-01-16 16:38             ` Thomas Graf
2015-01-16 16:51               ` Patrick McHardy
2015-01-16 16:43             ` David Laight
2015-01-16 16:53               ` Thomas Graf
2015-01-16 18:36                 ` Patrick McHardy
2015-01-16 19:18                   ` Thomas Graf
2015-01-16 19:35                     ` Patrick McHardy
2015-01-16 20:46                       ` Pablo Neira Ayuso
2015-01-16 20:53                         ` Patrick McHardy
2015-01-19  9:01                         ` Paul E. McKenney
2015-01-21  5:23                           ` Herbert Xu
2015-01-21  5:29                             ` Paul E. McKenney
2015-01-21  5:30                               ` Herbert Xu
2015-01-21  5:36                                 ` Paul E. McKenney
2015-01-16 20:49                       ` Herbert Xu
2015-01-16 21:31                         ` Patrick McHardy
2015-01-17  0:33                           ` Herbert Xu
2015-01-17  8:06                             ` Patrick McHardy
2015-01-17  9:32                               ` Herbert Xu
2015-01-17  9:51                                 ` Patrick McHardy
2015-01-17 10:13                                   ` Herbert Xu
2015-01-17 11:56                                     ` Patrick McHardy [this message]
2015-01-16 21:36                       ` Thomas Graf
2015-01-16 22:07                         ` Patrick McHardy
2015-01-16 23:34                           ` Thomas Graf
2015-01-17  8:02                             ` Patrick McHardy
2015-01-19 12:58                               ` Thomas Graf
2015-01-19  9:45                         ` David Laight

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=20150117115622.GA8502@acer.localdomain \
    --to=kaber@trash.net \
    --cc=David.Laight@ACULAB.COM \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=john.r.fastabend@intel.com \
    --cc=josh@joshtriplett.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tgraf@suug.ch \
    /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).