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: <0467d279-e825-4c15-ac85-859fc6b95ee2@linux.dev>
Date: Fri, 6 Sep 2024 14:26:46 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Andrii Nakryiko <andrii@...nel.org>, netdev@...r.kernel.org,
 bpf@...r.kernel.org, eric.dumazet@...il.com,
 syzbot <syzkaller@...glegroups.com>,
 John Fastabend <john.fastabend@...il.com>,
 Jakub Sitnicki <jakub@...udflare.com>, Paolo Abeni <pabeni@...hat.com>,
 "David S . Miller" <davem@...emloft.net>,
 Daniel Borkmann <daniel@...earbox.net>, Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH bpf] sock_map: add a cond_resched() in sock_hash_free()

On 9/6/24 8:44 AM, Eric Dumazet wrote:
> Several syzbot soft lockup reports all have in common sock_hash_free()
> 
> If a map with a large number of buckets is destroyed, we need to yield
> the cpu when needed.
> 
> Fixes: 75e68e5bf2c7 ("bpf, sockhash: Synchronize delete from bucket list on map free")
> Reported-by: syzbot <syzkaller@...glegroups.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: John Fastabend <john.fastabend@...il.com>
> Cc: Jakub Sitnicki <jakub@...udflare.com>
> ---
>   net/core/sock_map.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/net/core/sock_map.c b/net/core/sock_map.c
> index d3dbb92153f2fe7f1ddc8e35b495533fbf60a8cb..724b6856fcc3e9fd51673d31927cfd52d5d7d0aa 100644
> --- a/net/core/sock_map.c
> +++ b/net/core/sock_map.c
> @@ -1183,6 +1183,7 @@ static void sock_hash_free(struct bpf_map *map)
>   			sock_put(elem->sk);
>   			sock_hash_free_elem(htab, elem);
>   		}
> +		cond_resched();

Acked-by: Martin KaFai Lau <martin.lau@...nel.org>

Jakub, may be you can directly take it to net tree ?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ