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: <bedf07d1-2cd5-4bc8-9e59-a96479a7ff14@google.com>
Date: Wed, 3 Jan 2024 15:06:52 -0500
From: Barret Rhoden <brho@...gle.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Andrii Nakryiko <andrii@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Song Liu <song@...nel.org>,
 Yonghong Song <yonghong.song@...ux.dev>, mattbobrowski@...gle.com,
 bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: add inline assembly helpers
 to access array elements

On 1/3/24 14:51, Andrii Nakryiko wrote:
> I'm curious how bpf_cmp_likely/bpf_cmp_unlikely (just applied to
> bpf-next) compares to this?

these work great!

e.g.

         if (bpf_cmp_likely(idx, <, NR_MAP_ELEMS))
                 map_elems[idx] = i;

works fine.  since that's essentially the code that bpf_array_elem() was 
trying to replace, i'd rather just use the new bpf_cmp helpers than have 
the special array_elem helpers.

thanks,

barret



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ