lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8cPrYs0TuQfLlKX@hog>
Date: Tue, 4 Mar 2025 15:35:25 +0100
From: Sabrina Dubroca <sd@...asysnail.net>
To: Antonio Quartulli <antonio@...nvpn.net>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Donald Hunter <donald.hunter@...il.com>,
	Shuah Khan <shuah@...nel.org>, ryazanov.s.a@...il.com,
	Andrew Lunn <andrew+netdev@...n.ch>,
	Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org, Xiao Liang <shaw.leon@...il.com>
Subject: Re: [PATCH v21 19/24] ovpn: implement peer add/get/dump/delete via
 netlink

2025-03-04, 01:33:49 +0100, Antonio Quartulli wrote:
> @@ -1317,11 +1336,16 @@ void ovpn_peer_keepalive_work(struct work_struct *work)
>  
>  	/* prevent rearming if the interface is being destroyed */
>  	if (next_run > 0 && ovpn->registered) {
> +		time64_t delta = next_run - now;
> +
>  		netdev_dbg(ovpn->dev,
>  			   "scheduling keepalive work: now=%llu next_run=%llu delta=%llu\n",
> -			   next_run, now, next_run - now);
> +			   next_run, now, delta > 0 ? delta : 0);
> +		/* due to the waiting above, the next_run deadline may have
> +		 * passed: in this case we reschedule the worker immediately
> +		 */

I don't understand this bit. I don't see what waiting you're refering
to (in particular within this patch), and I don't see how we could get
next_run < now based on how next_run is computed in
ovpn_peer_keepalive_work_single (next_run1/next_run2 is always set to
now + X or something that we just tested to be > now).

Am I missing something?

>  		schedule_delayed_work(&ovpn->keepalive_work,
> -				      (next_run - now) * HZ);
> +				      delta * HZ > 0 ? delta * HZ : 0);
>  	}
>  	unlock_ovpn(ovpn, &release_list);
>  }

-- 
Sabrina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ