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] [day] [month] [year] [list]
Date: Thu, 23 May 2024 19:06:37 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: bpf@...r.kernel.org, kadlec@...filter.org, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
	ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
	martin.lau@...ux.dev, eddyz87@...il.com,
	lorenzo.bianconi@...hat.com, toke@...hat.com, fw@...len.de,
	hawk@...nel.org, horms@...nel.org, donhunte@...hat.com,
	memxor@...il.com
Subject: Re: [PATCH v3 bpf-next 1/3] netfilter: nf_tables: add flowtable map
 for xdp offload

> Hi Lorenzo,
> 
> On Thu, May 23, 2024 at 02:06:16PM +0200, Lorenzo Bianconi wrote:
> > From: Florian Westphal <fw@...len.de>
> > 
> > This adds a small internal mapping table so that a new bpf (xdp) kfunc
> > can perform lookups in a flowtable.
> > 
> > As-is, xdp program has access to the device pointer, but no way to do a
> > lookup in a flowtable -- there is no way to obtain the needed struct
> > without questionable stunts.
> > 
> > This allows to obtain an nf_flowtable pointer given a net_device
> > structure.
> > 
> > In order to keep backward compatibility, the infrastructure allows the
> > user to add a given device to multiple flowtables, but it will always
> > return the first added mapping performing the lookup since it assumes
> > the right configuration is 1:1 mapping between flowtables and net_devices.
> 
> Would it be possible to move this new code in _offload.c to
> nf_flow_table_xdp.c?

ack, I will do in v4.

Regards,
Lorenzo

> 
> The flowtable offload code is already a bit convoluted, the hardware
> offload API for payload matching results in chatty with many sparse
> warnings (unless I adds casting everywhere), but I remember I failed
> to provide a convincing improvements on that front without requiring
> changes to drivers at the time. This is of course no related to this
> series.

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ