From: Andi Kleen <ak@muc.de>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: "Lorenzo Hernández García-Hierro" <lorenzo@gnu.org>,
linux-kernel@vger.kernel.org, chrisw@osdl.org,
netdev@oss.sgi.com, arjan@infradead.org,
hlein@progressive-comp.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] OpenBSD Networking-related randomization port
Date: Sat, 29 Jan 2005 07:59:33 +0100 [thread overview]
Message-ID: <m1hdl0lnze.fsf@muc.de> (raw)
In-Reply-To: <20050128133408.49021343@dxpl.pdx.osdl.net> (Stephen Hemminger's message of "Fri, 28 Jan 2005 13:34:08 -0800")
Stephen Hemminger <shemminger@osdl.org> writes:
> On Fri, 28 Jan 2005 12:45:17 -0800
> "David S. Miller" <davem@davemloft.net> wrote:
>
>> On Fri, 28 Jan 2005 21:34:52 +0100
>> Lorenzo Hernández García-Hierro <lorenzo@gnu.org> wrote:
>>
>> > Attached the new patch following Arjan's recommendations.
>>
>> No SMP protection on the SBOX, better look into that.
>> The locking you'll likely need to add will make this
>> routine serialize many networking operations which is
>> one thing we've been trying to avoid.
>>
>
> per-cpu would be the way to go here.
I don't think so no - just doing per cpu counters you
risk nearby duplicates, which can cause even easier data corruption
(e.g. during ip fragment reassembly - it is already very weak
and making it weaker is probably not a good idea)
If you want SMP performance for ipids you can resurrect
the old "cookie jar" approach I used in 2.4 time frame to get
rid of inetpeers. The idea was that you have global state,
and each CPU would regenerate some numbers from the state,
then store them in a private "jar" and use them use, then
look at the global state with locking again etc.
This can be tuned on how big the jar is - the bigger the
smaller the sequence space (risky for 16bit ipids), but
the better the scalability.
But before doing anything like this I would recommend
that someone skilled in cryptography evaluates the security
of these functions carefully and see if it actually has any
advantages. I remember that Andrey S. broke
some of the "cool" "secure" openbsd IDs easily some years ago.
At least for ipids I'm utterly sceptical. 16bits are just
hopeless.
-Andi
next prev parent reply other threads:[~2005-01-29 6:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1106932637.3778.92.camel@localhost.localdomain>
[not found] ` <20050128174046.GR28047@stusta.de>
[not found] ` <1106934475.3778.98.camel@localhost.localdomain>
2005-01-28 18:18 ` [PATCH] OpenBSD Networking-related randomization port Stephen Hemminger
2005-01-28 18:54 ` Lorenzo Hernández García-Hierro
[not found] ` <20050128100229.5c0e4ea1@dxpl.pdx.osdl.net>
2005-01-28 18:31 ` Lorenzo Hernández García-Hierro
2005-01-28 18:52 ` Stephen Hemminger
2005-01-28 18:58 ` Lorenzo Hernández García-Hierro
2005-01-28 20:34 ` Lorenzo Hernández García-Hierro
2005-01-28 20:45 ` David S. Miller
2005-01-28 21:34 ` Stephen Hemminger
2005-01-28 21:45 ` David S. Miller
2005-01-29 6:59 ` Andi Kleen [this message]
2005-01-28 20:47 ` Arjan van de Ven
2005-01-28 22:12 ` Lorenzo Hernández García-Hierro
2005-01-29 8:04 ` Arjan van de Ven
2005-01-29 8:05 ` Arjan van de Ven
2005-01-29 9:15 ` Valdis.Kletnieks
2005-01-31 16:50 ` Adrian Bunk
2005-01-31 17:23 ` Lorenzo Hernández García-Hierro
2005-01-31 20:11 ` Ingo Molnar
2005-01-31 23:27 ` linux
2005-02-12 22:29 ` Andi Kleen
2005-02-12 23:25 ` linux
2005-02-13 0:18 ` Roland Dreier
2005-02-13 1:41 ` linux
2005-02-02 17:17 ` linux
2005-02-02 17:38 ` Lorenzo Hernández García-Hierro
2005-02-03 19:51 ` Stephen Hemminger
2005-02-03 20:14 ` Lennert Buytenhek
2005-01-31 19:42 ` Valdis.Kletnieks
2005-01-31 20:03 ` Lorenzo Hernández García-Hierro
2005-02-01 23:22 ` Matt Mackall
[not found] ` <1106935677.7776.29.camel@laptopd505.fenrus.org>
2005-01-28 18:36 ` Lorenzo Hernández García-Hierro
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=m1hdl0lnze.fsf@muc.de \
--to=ak@muc.de \
--cc=arjan@infradead.org \
--cc=chrisw@osdl.org \
--cc=hlein@progressive-comp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@gnu.org \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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).