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, 15 May 2024 00:26:20 -0600
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, pabeni@...hat.com, bpf@...r.kernel.org
Subject: Re: [GIT PULL] Networking for v6.10

On Tue, May 14, 2024 at 10:06 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Tue, 14 May 2024 at 20:32, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > Why does it do that disgusting
> >
> >         struct bpf_array *array = container_of(map, struct bpf_array, map);
> >         ...
> >                 *insn++ = BPF_ALU32_IMM(BPF_AND, BPF_REG_0, array->index_mask);
> >
> > thing? As far as I can tell, a bpf map can be embedded in many
> > different structures, not just that 'bpf_array' thing.
>
> Bah. It still needs to do that array->elem_size, so it's not just the
> spectre-v1 code that needs that 'bpf_array' thing.
>
> And the non-percpu case seems to do all the same contortions, so I
> don't know why the new percpu array would show issues.

There is a special check for non-percpu arrays (ops == &array_map_ops
check), which was missed and not updated for percpu arrays,
unfortunately. I've added more map-in-map combinations to our tests so
this can be caught sooner. Good thing Jakub tested in our production
setup so we could catch this sooner!

>
> Oh well. I guess the bpf people will figure it out once they come back
> from "partying at LSFMM" as you put it.

Not much partying today, but the day was still quite hectic, sorry for
delays. Just sent out the fix (rebased on top of the latest
net-next/main).

>
>            Linus
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ