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:   Tue, 07 Dec 2021 18:49:22 +0100
From:   Toke Høiland-Jørgensen <toke@...hat.com>
To:     John Fastabend <john.fastabend@...il.com>,
        Lorenzo Bianconi <lorenzo@...nel.org>, bpf@...r.kernel.org,
        netdev@...r.kernel.org
Cc:     lorenzo.bianconi@...hat.com, davem@...emloft.net, kuba@...nel.org,
        ast@...nel.org, daniel@...earbox.net, shayagr@...zon.com,
        john.fastabend@...il.com, dsahern@...nel.org, brouer@...hat.com,
        echaudro@...hat.com, jasowang@...hat.com,
        alexander.duyck@...il.com, saeed@...nel.org,
        maciej.fijalkowski@...el.com, magnus.karlsson@...el.com,
        tirthendu.sarkar@...el.com
Subject: RE: [PATCH v19 bpf-next 19/23] bpf: generalise tail call map
 compatibility check

John Fastabend <john.fastabend@...il.com> writes:

> Lorenzo Bianconi wrote:
>> From: Toke Hoiland-Jorgensen <toke@...hat.com>
>> 
>> The check for tail call map compatibility ensures that tail calls only
>> happen between maps of the same type. To ensure backwards compatibility for
>> XDP multi-buffer we need a similar type of check for cpumap and devmap
>> programs, so move the state from bpf_array_aux into bpf_map, add xdp_mb to
>> the check, and apply the same check to cpumap and devmap.
>> 
>> Co-developed-by: Lorenzo Bianconi <lorenzo@...nel.org>
>> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
>> Signed-off-by: Toke Hoiland-Jorgensen <toke@...hat.com>
>> ---
>
> ...
>
>> -bool bpf_prog_array_compatible(struct bpf_array *array, const struct bpf_prog *fp);
>> +static inline bool map_type_contains_progs(struct bpf_map *map)
>
> Maybe map_type_check_needed()? Just noticing that devmap doesn't contain
> progs.

Ah, but it does :)

See: fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry")

Indeed this feature is why this check is needed, so I think the name is
accurate...

-Toke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ