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: <20250825152946.4c25c538@kernel.org>
Date: Mon, 25 Aug 2025 15:29:46 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Amery Hung <ameryhung@...il.com>
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, 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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ