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: <CAADnVQKdkkeaxdwx7Tw0eTnD3Lsp9do6S2LN=iEHukj_Q=pZig@mail.gmail.com>
Date: Fri, 23 Jun 2023 20:57:24 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Hou Tao <houtao@...weicloud.com>
Cc: Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, 
	David Vernet <void@...ifault.com>, "Paul E. McKenney" <paulmck@...nel.org>, Tejun Heo <tj@...nel.org>, 
	rcu@...r.kernel.org, Network Development <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>, 
	Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf-next 07/12] bpf: Add a hint to allocated objects.

On Fri, Jun 23, 2023 at 8:54 PM Hou Tao <houtao@...weicloud.com> wrote:
>
> Hi,
>
> On 6/24/2023 11:42 AM, Alexei Starovoitov wrote:
> > On Fri, Jun 23, 2023 at 8:28 PM Hou Tao <houtao@...weicloud.com> wrote:
> >>>                */
> >>> -             obj = __llist_del_first(&c->free_by_rcu_ttrace);
> >>> +             obj = llist_del_first(&c->free_by_rcu_ttrace);
> >> According to the comments in llist.h, when there are concurrent
> >> llist_del_first() and llist_del_all() operations, locking is needed.
> > Good question.
> > 1. When only one cpu is doing llist_del_first() locking is not needed.
> >  This is the case here. Only this cpu is doing llist_del_first() from this 'c'.
> > 2. The comments doesn't mention it, but llist_del_first() is ok on
> > multiple cpus if ABA problem is addressed by other means.
> Haven't checked the implementation details of lockless list. Will do
> that later. "by other means" do you mean RCU ? because the reuse will be
> possible only after one RCU GP.

Right. Like RCU, but that's if we go that route in future patches.
We're at 1 == only one cpu is doing llist_del_first.

> > PS
> > please trim your replies.
> Sorry for the inconvenience. Will do next time.
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ