netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ben Greear <greearb@candelatech.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>, Thomas Graf <tgraf@suug.ch>
Subject: Re: Question on rhashtable in worst-case scenario.
Date: Wed, 30 Mar 2016 16:03:08 +0200	[thread overview]
Message-ID: <1459346588.2055.6.camel@sipsolutions.net> (raw)
In-Reply-To: <20160330135521.GA19423@gondor.apana.org.au>

On Wed, 2016-03-30 at 21:55 +0800, Herbert Xu wrote:

> Well to start with you should assess whether you really want to
> hash multiple objects with the same key.  In particular, can an
> adversary generate a large number of such objects?

No, the only reason this happens is local - if you take the single
hardware and connect it to the same AP many times. This is what Ben is
doing - he's creating virtual interfaces on top of the same physical
hardware, and then connection all of these to the same AP, mostly for
testing the AP.

> If your conclusion is that yes you really want to do this, then
> we have the parameter insecure_elasticity that you can use to
> disable the rehashing based on chain length.

But we really don't want that either - in the normal case where you
don't create all these virtual interfaces for testing, you have a
certain number of peers that can vary a lot (zero to hundreds, in
theory thousands) where you *don't* have the same key, so we still want
to have the rehashing if the chains get longer in that case.

It's really just the degenerate case that Ben is creating locally
that's causing a problem, afaict, though it's a bit disconcerting that
rhashtable in general can cause strange failures at delete time.

johannes

  reply	other threads:[~2016-03-30 14:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <56F9941A.3080501@candelatech.com>
     [not found] ` <56FAAA6D.3070806@candelatech.com>
2016-03-30  9:14   ` Question on rhashtable in worst-case scenario Johannes Berg
     [not found]     ` <1459329252.2055.1.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-03-30 13:55       ` Herbert Xu
2016-03-30 14:03         ` Johannes Berg [this message]
2016-03-30 14:09           ` Herbert Xu
2016-03-30 16:38     ` David Miller
2016-03-30 16:52       ` Ben Greear
2016-03-31  7:46         ` Johannes Berg
2016-03-31  7:50           ` Herbert Xu
2016-03-31 15:29             ` Johannes Berg
2016-04-01  0:46               ` Herbert Xu
2016-04-01 18:17                 ` Ben Greear
2016-04-01 21:34                 ` Johannes Berg
2016-04-02  1:46                   ` Herbert Xu
2016-04-02 18:33                     ` Johannes Berg
2016-03-31 15:13           ` Ben Greear
2016-03-31 15:22             ` Johannes Berg

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=1459346588.2055.6.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=greearb@candelatech.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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).