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: <b18fdfc3-987d-9351-ca6c-5d4cb2d71af1@linux.dev>
Date: Thu, 18 May 2023 09:51:39 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: paulmck@...nel.org
Cc: Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
 Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
 John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
 Stanislav Fomichev <sdf@...gle.com>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf] Use call_rcu_hurry() with synchronize_rcu_mult()

On 5/18/23 7:47 AM, Paul E. McKenney wrote:
> The bpf_struct_ops_map_free() function must wait for both an RCU grace
> period and an RCU Tasks grace period, and so it passes call_rcu() and
> call_rcu_tasks() to synchronize_rcu_mult().  This works, but on ChromeOS
> and Android platforms call_rcu() can have lazy semantics, resulting in
> multi-second delays between call_rcu() invocation and invocation of the
> corresponding callback.
> 
> Therefore, substitute call_rcu_hurry() for call_rcu().

My understanding on the net-effect is to free up the struct_ops resources faster.

I believe call_rcu() should be fine. struct_ops freeing should not happen very 
often. For example, when a bpf written tcp congestion control (struct_ops) is 
registered, it will stay in the kernel for a long time. A couple seconds delay 
in releasing the struct_ops should be acceptable.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ