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: <CAMB2axMxJT4UJjE+=zk-yTpptMW5ZcFTM09B86r_cdnJFfvfew@mail.gmail.com>
Date: Mon, 25 Aug 2025 15:36:17 -0700
From: Amery Hung <ameryhung@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <stfomichev@...il.com>, bpf@...r.kernel.org, netdev@...r.kernel.org, 
	alexei.starovoitov@...il.com, andrii@...nel.org, daniel@...earbox.net, 
	martin.lau@...nel.org, mohsin.bashr@...il.com, saeedm@...dia.com, 
	tariqt@...dia.com, mbloch@...dia.com, maciej.fijalkowski@...el.com, 
	kernel-team@...a.com
Subject: Re: [RFC bpf-next v1 3/7] bpf: Support pulling non-linear xdp data

On Mon, Aug 25, 2025 at 3:29 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 25 Aug 2025 15:23:23 -0700 Amery Hung wrote:
> > > > +     if (!len)
> > > > +             len = xdp_get_buff_len(xdp);
> > >
> > > Why not return -EINVAL here for len=0?
> > >
> >
> > I try to mirror the behavior of bpf_skb_pull_data() to reduce confusion here.
>
> Different question for the same LoC :)
>
> Why not
>
>         if (!len)
>                 len = buff_len;
> ?
> Or perhaps:
>
>         len = len ?: buf_len;

... Ope. Thanks for catching this. I will fix it in the next iteration.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ