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]
Date: Wed, 3 Jan 2024 13:21:19 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Barret Rhoden <brho@...gle.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 Wed, Jan 3, 2024 at 12:06 PM Barret Rhoden <brho@...gle.com> wrote:
>
> 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.

ok, cool, thanks for checking! The less special macros, the better.

>
> thanks,
>
> barret
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ