All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] fix secure tcp sequence number generation
Date: Tue, 05 Oct 2004 22:41:55 +0200	[thread overview]
Message-ID: <41630713.2080606@colorfullife.com> (raw)
In-Reply-To: <20041005132724.6a913c48.davem@davemloft.net>

David S. Miller wrote:

>On Sat, 02 Oct 2004 20:10:22 +0200
>Manfred Spraul <manfred@colorfullife.com> wrote:
>
>  
>
>>Description:
>>The tcp sequence number generator needs a random seed that is reset every
>>few minutes. Since the sequence numbers should be constantly increasing,
>>for each rekey 2^24 is added to the sequence number.
>>The actual use of the sequence number generator is lockless,
>>synchronization is achieved by having two copies of the control structure.
>>
>>The attached patch:
>>- fixes a race in rekey_seq_generator(): schedule_work doesn't
>>   provide synchronization.
>>- Uses schedule_delayed_work() for the rekey: simplifies synchronization
>>   and speeds up the hot path.
>>- replaces do_gettimeofday with get_seconds(): get_seconds is faster and
>>   usec resolution is not required.
>>- removes tmpdata - not needed with new locking.
>>- Adds a late_initcall for the first initialization after boot.
>>   init_call would be too early, I've checked that the late_initcall runs
>>   before net/ipv4/ipconfig.c, i.e. the BOOTP/DHCP autoconfiguration.
>>
>>Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
>>    
>>
>
>I like this patch, but you may have sent the wrong copy.  You
>mention in the description that you changed over to use
>get_seconds(), yet the only reference to get_seconds() in the
>patch is:
>
>-	keyptr = check_and_rekey(get_seconds());
>+	keyptr = get_keyptr();
>
>Please clarify that this is just a brain fart in the description
>and not the patch.
>  
>
Right patch but wrong description, sorry:
I've recycled the description from the previous patch and that one used 
get_seconds() in rekey_seq_generator(). Now rekey_seq_generator() 
doesn't access the time at all, that's done within schedule_delayed_work().

--
    Manfred

  reply	other threads:[~2004-10-05 20:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-02 18:10 [PATCH] fix secure tcp sequence number generation Manfred Spraul
2004-10-03 22:00 ` David S. Miller
2004-10-04  4:06   ` Manfred Spraul
2004-10-05 20:27 ` David S. Miller
2004-10-05 20:41   ` Manfred Spraul [this message]
2004-10-05 21:31     ` David S. Miller

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=41630713.2080606@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=davem@davemloft.net \
    --cc=netdev@oss.sgi.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.