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: <685d816dd20ff_2eacd529452@willemb.c.googlers.com.notmuch>
Date: Thu, 26 Jun 2025 13:20:45 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Daniel Zahka <daniel.zahka@...il.com>, 
 Donald Hunter <donald.hunter@...il.com>, 
 "David S. Miller" <davem@...emloft.net>, 
 Eric Dumazet <edumazet@...gle.com>, 
 Paolo Abeni <pabeni@...hat.com>, 
 Simon Horman <horms@...nel.org>, 
 Jonathan Corbet <corbet@....net>, 
 Andrew Lunn <andrew+netdev@...n.ch>, 
 Saeed Mahameed <saeedm@...dia.com>, 
 Leon Romanovsky <leon@...nel.org>, 
 Tariq Toukan <tariqt@...dia.com>, 
 Boris Pismenny <borisp@...dia.com>, 
 Kuniyuki Iwashima <kuniyu@...gle.com>, 
 Willem de Bruijn <willemb@...gle.com>, 
 David Ahern <dsahern@...nel.org>, 
 Neal Cardwell <ncardwell@...gle.com>, 
 Patrisious Haddad <phaddad@...dia.com>, 
 Raed Salem <raeds@...dia.com>, 
 Jianbo Liu <jianbol@...dia.com>, 
 Dragos Tatulea <dtatulea@...dia.com>, 
 Rahul Rameshbabu <rrameshbabu@...dia.com>, 
 Stanislav Fomichev <sdf@...ichev.me>, 
 Toke Høiland-Jørgensen <toke@...hat.com>, 
 Alexander Lobakin <aleksander.lobakin@...el.com>, 
 Jacob Keller <jacob.e.keller@...el.com>, 
 netdev@...r.kernel.org
Subject: Re: [PATCH v2 02/17] psp: base PSP device support

Jakub Kicinski wrote:
> On Thu, 26 Jun 2025 10:25:11 -0400 Willem de Bruijn wrote:
> > Preferable over the following?
> > 
> > 	struct psphdr {
> > 		u8      nexthdr;
> > 		u8      hdrlen;
> > 		u8      crypt_offset;
> > 
> > 		u8      sample:1;
> > 		u8      drop:1;
> > 		u8	version:4;
> > 		u8	vc_present:1;
> > 		u8	reserved:1;
> > 
> > 		__be32  spi;
> > 		__be64  iv;
> > 		__be64  vc[]; /* optional */
> > 	};
> > 
> > I suppose that has an endianness issue requiring
> > variants with __LITTLE_ENDIAN_BITFIELD and
> > __BIG_ENDIAN_BITFIELD.
> 
> Right, this part. Always gives me pause :(
> 
> > > > This makes sense with a single physical device plus optional virtual
> > > > (vlan, bonding, ..) devices.
> > > > 
> > > > It may also be possible for a single physical device (with single
> > > > device key) to present multiple PFs and/or VFs. In that case, will
> > > > there be multiple struct psp_dev, or will one PF be the "main".  
> > > 
> > > AFAIU we have no ability to represent multi-PCIe function devices 
> > > in the kernel model today. So realistically I think psp_dev per
> > > function and then propagate the rotation events.  
> > 
> > IDPF does support multiple "vports" (num_alloc_vports), and with that
> > struct net_device, from a single BDF.
> 
> Upstream? If yes then I'm very bad at reviewing code :D

I then don't think I want to focus your attention on this, but..

See use num_alloc_ports in idpf_init_task. Which keeps requeueing
itself until num_default_vports is reached. Which is a variable
received from the device in VIRTCHNL2_OP_GET_CAPS.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ