From: Yury Polyanskiy <ypolyans@princeton.edu>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
peterz@infradead.org, yoshfuji@linux-ipv6.org,
tglx@linutronix.de, mingo@elte.hu
Subject: Re: [PATCH] xfrm: SAD entries do not expire correctly after suspend-resume
Date: Mon, 9 Nov 2009 13:31:53 -0500 [thread overview]
Message-ID: <20091109133153.668bb296@penta.localdomain> (raw)
In-Reply-To: <20091109153910.GA8039@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
On Mon, 9 Nov 2009 10:39:10 -0500
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> However, I have some reservations as to whether this is the ideal
> situation. Unless I'm mistaken, this patch may cause IPsec SAs
> to expire if the system clock was out of sync prior to IPsec startup
> and is subsequently resynced by ntpdate or similar.
>
> For example, it's quite common for clocks to be out-of-sync by
> 10 hours in Australia due to time zone issues with BIOS clocks.
> So potentially ntpdate could move the clock forward by 10 hours
> or more on bootup thus causing IPsec SAs to expire prematurely
> with this patch.
>
> This shouldn't really be a problem in itself except that there
> are some dodgy IPsec gateways out there that refuse to reestablish
> IPsec SAs if the interval between two successive connections is
> too small. This could render the SA inoperable for hours.
But why would it be inoperable for hours?
I think that the following will happen:
* racoon will recreate SAD entry in the larval state, wait 30s and drop
it (since dodgy-gw filtered out all keyexchange packets)
* The next time there is a connect() with a match in the SPD, racoon
will again try to recreate the SAD entry. If there dodgy-gw still
filters out, the larval SAD entry dies after 30s.
So the inoperability will only last as long as dodgy-gw filters
keyexchanges.
In any case, running ntpdate before racoon fixes the problem.
>
> So the upshot of all this is that we definitely want the effect
> of this patch for suspend/resume, but it would be great if we can
> avoid it for settimeofday(2).
I think the natural solution is to have CLOCK_BOOTBASED hrtimers. I.e.
something in the spirit of monotonic_to_bootbased() and getboottime().
I understand that doing +=total_sleep_time is against the core idea of
hires timers, but perhaps there is a nicer way.
Best,
Y
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-11-09 18:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 2:12 [PATCH] xfrm: SAD entries do not expire correctly after suspend-resume Yury Polyanskiy
2009-11-09 4:58 ` David Miller
2009-11-09 15:39 ` Herbert Xu
2009-11-09 18:31 ` Yury Polyanskiy [this message]
2009-11-09 19:23 ` Herbert Xu
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=20091109133153.668bb296@penta.localdomain \
--to=ypolyans@princeton.edu \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=yoshfuji@linux-ipv6.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