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] [day] [month] [year] [list]
Date:   Tue, 6 Oct 2020 00:39:56 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org, kernel-team@...com,
        ast@...nel.org, john.fastabend@...il.com, kpsingh@...omium.org
Subject: Re: [PATCH v2 bpf-next] bpf: use raw_spin_trylock() for
 pcpu_freelist_push/pop in NMI

On 10/5/20 8:03 PM, Martin KaFai Lau wrote:
> On Mon, Oct 05, 2020 at 09:58:38AM -0700, Song Liu wrote:
[...]
>> non-NMI pop(): 	use _lock(); check per cpu lists first;
>>                  if all per cpu lists are empty, check extralist;
>>                  if extralist is empty, return NULL.
>>
>> non-NMI push(): use _lock(); only push to per cpu lists.
>>
>> NMI pop():    use _trylock(); check per cpu lists first;
>>                if all per cpu lists are locked or empty, check extralist;
>>                if extralist is locked or empty, return NULL.
>>
>> NMI push():   use _trylock(); check per cpu lists first;
>>                if all per cpu lists are locked; try push to extralist;
>>                if extralist is also locked, keep trying on per cpu lists.
>>
>> Reported-by: Alexei Starovoitov <ast@...nel.org>
>> Signed-off-by: Song Liu <songliubraving@...com>
>>
>> ---
>> Changes v1 => v2:
>> 1. Update commit log. (Daniel)
> Acked-by: Martin KaFai Lau <kafai@...com>

LGTM, applied, thanks!

Powered by blists - more mailing lists