Netdev List
 help / color / mirror / Atom feed
From: Marco Baffo <marco@mandelbit.com>
To: Jakub Kicinski <kuba@kernel.org>,
	Antonio Quartulli <antonio@openvpn.net>
Cc: netdev@vger.kernel.org, Sabrina Dubroca <sd@queasysnail.net>,
	Ralf Lici <ralf@mandelbit.com>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net 6/6] ovpn: use monotonic clock for peer keepalive timeouts
Date: Wed, 10 Jun 2026 10:44:15 +0200 (CEST)	[thread overview]
Message-ID: <1290464191.15539.1781081055969@app.mailbox.org> (raw)
In-Reply-To: <20260609194246.23c66818@kernel.org>


> On 06/10/2026 4:42 AM CEST Jakub Kicinski <kuba@kernel.org> wrote:
> 
>  
> On Mon,  8 Jun 2026 17:07:37 +0200 Antonio Quartulli wrote:
> > Replace ktime_get_real_seconds() with the monotonic ktime_get_boottime_seconds()
> > to ensure the keepalive mechanism is robust against system clock modifications.
> 
> Why boottime? Unless there's a reason shouldn't we be using
> plain ktime_get_seconds() which is CLOCK_MONOTONIC?
> 
> (if you decide to respin could you also drop the selftest change
> from this PR and move it to net-next? memory leaks in selftests
> are not important)

Hi Jakub!
ktime_get_boottime() is like ktime_get() but it does not stop when suspended.
From Documentation/core-api/timekeeping.rst :
>ktime_t ktime_get(void)
>CLOCK_MONOTONIC
>Useful for reliable timestamps and measuring short time intervals >accurately. Starts at system boot time but stops during suspend.
>
>ktime_t ktime_get_boottime(void)
>CLOCK_BOOTTIME
>Like ktime_get(), but does not stop when suspended. This can be used >e.g. for key expiration times that need to be synchronized with other >machines across a suspend operation.

      reply	other threads:[~2026-06-10  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 15:07 [PATCH net 0/6] pull request: fixes for ovpn 2026-06-08 Antonio Quartulli
2026-06-08 15:07 ` [PATCH net 1/6] ovpn: avoid putting unrelated P2P peer on socket release Antonio Quartulli
2026-06-08 15:07 ` [PATCH net 2/6] ovpn: fix peer refcount leak in TCP error paths Antonio Quartulli
2026-06-08 15:07 ` [PATCH net 3/6] ovpn: hold peer before scheduling keepalive work Antonio Quartulli
2026-06-08 15:07 ` [PATCH net 4/6] selftests/net: ovpn: fix getaddrinfo memory leak in ovpn_parse_remote() Antonio Quartulli
2026-06-08 15:07 ` [PATCH net 5/6] ovpn: fix use after free in unlock_ovpn() Antonio Quartulli
2026-06-08 15:07 ` [PATCH net 6/6] ovpn: use monotonic clock for peer keepalive timeouts Antonio Quartulli
2026-06-10  2:42   ` Jakub Kicinski
2026-06-10  8:44     ` Marco Baffo [this message]

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=1290464191.15539.1781081055969@app.mailbox.org \
    --to=marco@mandelbit.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=antonio@openvpn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ralf@mandelbit.com \
    --cc=sd@queasysnail.net \
    /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