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: <CAADnVQJEE5yfhpqJ0f4BQVtVh+SWrPeA-9pPu0gfRZB6rm59Ag@mail.gmail.com>
Date: Mon, 4 Nov 2024 14:32:24 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: Xu Kuohai <xukuohai@...weicloud.com>, Martin KaFai Lau <martin.lau@...nel.org>, 
	bpf <bpf@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, 
	Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman <eddyz87@...il.com>, 
	Yonghong Song <yonghong.song@...ux.dev>, Kui-Feng Lee <thinker.li@...il.com>
Subject: Re: [PATCH bpf-next v2] bpf: Add kernel symbol for struct_ops trampoline

On Mon, Nov 4, 2024 at 2:13 PM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
>
> On 11/4/24 9:53 AM, Alexei Starovoitov wrote:
>
> > As a separate clean up I would switch the freeing to call_rcu_tasks.
> > Synchronous waiting is expensive.
> >
> > Martin,
> >
> > any suggestions?
>
> There is a map->rcu now. May be add a "bool free_after_rcu_tasks_gp" to "struct
> bpf_map" and do the call_rcu_tasks() in bpf_map_put(). The
> bpf_struct_ops_map_alloc() can set the map->free_after_rcu_tasks_gp.

Ohh. Great point.
struct_ops map can just set the existing free_after_mult_rcu_gp flag
and get rid of this sync call.
Another flag is overkill imo.

> Take this chance to remove the "st_map->rcu" from "struct bpf_struct_ops_map"
> also. It is a left over after cleaning up the kvalue->refcnt in the
> commit b671c2067a04 ("bpf: Retire the struct_ops map kvalue->refcnt.").

+1

> Xu, it will be great if you can follow up with this cleanup. Otherwise, I will
> put it under the top of my todo list. Let me know what you prefer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ