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]
Date:   Wed, 25 May 2022 10:57:33 +0300
From:   Nikolay Aleksandrov <razor@...ckwall.org>
To:     Daniel Borkmann <daniel@...earbox.net>, kuba@...nel.org
Cc:     wangyuweihx@...il.com, pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] net, neigh: Set lower cap for neigh_managed_work
 rearming

On 25/05/2022 01:56, Daniel Borkmann wrote:
> Yuwei reported that plain reuse of DELAY_PROBE_TIME to rearm work queue
> in neigh_managed_work is problematic if user explicitly configures the
> DELAY_PROBE_TIME to 0 for a neighbor table. Such misconfig can then hog
> CPU to 100% processing the system work queue. Instead, set lower interval
> bound to HZ which is totally sufficient. Yuwei is additionally looking
> into making the interval separately configurable from DELAY_PROBE_TIME.
> 
> Reported-by: Yuwei Wang <wangyuweihx@...il.com>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: Nikolay Aleksandrov <razor@...ckwall.org>
> Link: https://lore.kernel.org/netdev/797c3c53-ce1b-9f60-e253-cda615788f4a@iogearbox.net
> ---
>  net/core/neighbour.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index f64ebd050f6..fd69133dc7c 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1579,7 +1579,7 @@ static void neigh_managed_work(struct work_struct *work)
>  	list_for_each_entry(neigh, &tbl->managed_list, managed_list)
>  		neigh_event_send_probe(neigh, NULL, false);
>  	queue_delayed_work(system_power_efficient_wq, &tbl->managed_work,
> -			   NEIGH_VAR(&tbl->parms, DELAY_PROBE_TIME));
> +			   max(NEIGH_VAR(&tbl->parms, DELAY_PROBE_TIME), HZ));
>  	write_unlock_bh(&tbl->lock);
>  }
>  

Reviewed-by: Nikolay Aleksandrov <razor@...ckwall.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ