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: <CAEf4Bza_=HUKT6_sxrO=xC37DGyTgnvKtqd9Zdmq-crbtdTYSA@mail.gmail.com>
Date: Tue, 1 Jul 2025 13:55:01 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Jakub Sitnicki <jakub@...udflare.com>
Cc: bpf@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>, 
	Arthur Fabre <arthur@...hurfabre.com>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>, 
	Jesse Brandeburg <jbrandeburg@...udflare.com>, Joanne Koong <joannelkoong@...il.com>, 
	Lorenzo Bianconi <lorenzo@...nel.org>, Toke Høiland-Jørgensen <thoiland@...hat.com>, 
	Yan Zhai <yan@...udflare.com>, netdev@...r.kernel.org, kernel-team@...udflare.com, 
	Stanislav Fomichev <sdf@...ichev.me>
Subject: Re: [PATCH bpf-next 01/13] bpf: Ignore dynptr offset in skb data access

On Mon, Jun 30, 2025 at 8:23 AM Jakub Sitnicki <jakub@...udflare.com> wrote:
>
> Prepare to use (struct bpf_dynptr)->offset to distinguish between an skb
> dynptr for the payload vs the metadata area.
>
> ptr->offset is always set to zero by bpf_dynptr_from_skb(). We don't need
> to account for it on access.

Huh?.. What about bpf_dynptr_adjust()? This is a wrong approach to
have some magical offset values.

More general question about your patch set: is there ever a need to
work with both metadata and data as one area of memory (i.e., copying
both metadata and data in the same single operation, or setting it as
one thing?). If not, why not have two different dynptrs, one for data
(what we have today) and one exclusively for packet's metadata?

>
> Signed-off-by: Jakub Sitnicki <jakub@...udflare.com>
> ---
>  kernel/bpf/helpers.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ