linux/drivers/net
Paolo Abeni 64d2616972 Merge branch 'add-basic-psp-encryption-for-tcp-connections'
Daniel Zahka says:

==================
add basic PSP encryption for TCP connections

This is v13 of the PSP RFC [1] posted by Jakub Kicinski one year
ago. General developments since v1 include a fork of packetdrill [2]
with support for PSP added, as well as some test cases, and an
implementation of PSP key exchange and connection upgrade [3]
integrated into the fbthrift RPC library. Both [2] and [3] have been
tested on server platforms with PSP-capable CX7 NICs. Below is the
cover letter from the original RFC:

Add support for PSP encryption of TCP connections.

PSP is a protocol out of Google:
https://github.com/google/psp/blob/main/doc/PSP_Arch_Spec.pdf
which shares some similarities with IPsec. I added some more info
in the first patch so I'll keep it short here.

The protocol can work in multiple modes including tunneling.
But I'm mostly interested in using it as TLS replacement because
of its superior offload characteristics. So this patch does three
things:

 - it adds "core" PSP code
   PSP is offload-centric, and requires some additional care and
   feeding, so first chunk of the code exposes device info.
   This part can be reused by PSP implementations in xfrm, tunneling etc.

 - TCP integration TLS style
   Reuse some of the existing concepts from TLS offload, such as
   attaching crypto state to a socket, marking skbs as "decrypted",
   egress validation. PSP does not prescribe key exchange protocols.
   To use PSP as a more efficient TLS offload we intend to perform
   a TLS handshake ("inline" in the same TCP connection) and negotiate
   switching to PSP based on capabilities of both endpoints.
   This is also why I'm not including a software implementation.
   Nobody would use it in production, software TLS is faster,
   it has larger crypto records.

 - mlx5 implementation
   That's mostly other people's work, not 100% sure those folks
   consider it ready hence the RFC in the title. But it works :)

Not posted, queued a branch [4] are follow up pieces:
 - standard stats
 - netdevsim implementation and tests

[1] https://lore.kernel.org/netdev/20240510030435.120935-1-kuba@kernel.org/
[2] https://github.com/danieldzahka/packetdrill
[3] https://github.com/danieldzahka/fbthrift/tree/dzahka/psp
[4] https://github.com/kuba-moo/linux/tree/psp

Comments we intend to defer to future series:
   - we prefer to keep the version field in the tx-assoc netlink
     request, because it makes parsing keys require less state early
     on, but we are willing to change in the next version of this
     series.
   - using a static branch to wrap psp_enqueue_set_decrypted() and
     other functions called from tcp.
   - using INDIRECT_CALL for tls/psp in sk_validate_xmit_skb(). We
     prefer to address this in a dedicated patch series, so that this
     series does not need to modify the way tls_validate_xmit_skb() is
     declared and stubbed out.

v12: https://lore.kernel.org/netdev/20250916000559.1320151-1-kuba@kernel.org/
v11: https://lore.kernel.org/20250911014735.118695-1-daniel.zahka@gmail.com
v10: https://lore.kernel.org/netdev/20250828162953.2707727-1-daniel.zahka@gmail.com/
v9: https://lore.kernel.org/netdev/20250827155340.2738246-1-daniel.zahka@gmail.com/
v8: https://lore.kernel.org/netdev/20250825200112.1750547-1-daniel.zahka@gmail.com/
v7: https://lore.kernel.org/netdev/20250820113120.992829-1-daniel.zahka@gmail.com/
v6: https://lore.kernel.org/netdev/20250812003009.2455540-1-daniel.zahka@gmail.com/
v5: https://lore.kernel.org/netdev/20250723203454.519540-1-daniel.zahka@gmail.com/
v4: https://lore.kernel.org/netdev/20250716144551.3646755-1-daniel.zahka@gmail.com/
v3: https://lore.kernel.org/netdev/20250702171326.3265825-1-daniel.zahka@gmail.com/
v2: https://lore.kernel.org/netdev/20250625135210.2975231-1-daniel.zahka@gmail.com/
v1: https://lore.kernel.org/netdev/20240510030435.120935-1-kuba@kernel.org/
==================

Links: https://patch.msgid.link/20250917000954.859376-1-daniel.zahka@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
* add-basic-psp-encryption-for-tcp-connections:
  net/mlx5e: Implement PSP key_rotate operation
  net/mlx5e: Add Rx data path offload
  psp: provide decapsulation and receive helper for drivers
  net/mlx5e: Configure PSP Rx flow steering rules
  net/mlx5e: Add PSP steering in local NIC RX
  net/mlx5e: Implement PSP Tx data path
  psp: provide encapsulation helper for drivers
  net/mlx5e: Implement PSP operations .assoc_add and .assoc_del
  net/mlx5e: Support PSP offload functionality
  psp: track generations of device key
  net: psp: update the TCP MSS to reflect PSP packet overhead
  net: psp: add socket security association code
  net: tcp: allow tcp_timewait_sock to validate skbs before handing to device
  net: move sk_validate_xmit_skb() to net/core/dev.c
  psp: add op for rotation of device key
  tcp: add datapath logic for PSP with inline key exchange
  net: modify core data structures for PSP datapath support
  psp: base PSP device support
  psp: add documentation
2025-09-18 12:38:34 +02:00
..
arcnet
bonding bonding: fix standard reference typo in ad_select description 2025-09-15 18:12:35 -07:00
caif
can can: rcar_can: rcar_can_resume(): fix s2ram with PSCI 2025-09-10 17:12:05 +02:00
dsa net: dsa: mv88e6xxx: move mv88e6xxx_hwtstamp_work() prototype 2025-09-17 18:21:12 -07:00
ethernet Merge branch 'add-basic-psp-encryption-for-tcp-connections' 2025-09-18 12:38:34 +02:00
fddi
fjes
hamradio hamradio: ignore ops-locked netdevs 2025-08-08 13:22:28 -07:00
hippi
hyperv net: hv_netvsc: fix loss of early receive events from host during channel open. 2025-08-26 18:15:19 -07:00
ieee802154
ipa ipa: fix compile-testing with qcom-mdt=m 2025-08-04 17:15:15 -07:00
ipvlan ipv4: Convert ->flowi4_tos to dscp_t. 2025-08-26 17:34:31 -07:00
mctp net: mctp: usb: initialise mac header in RX path 2025-09-02 14:48:19 +02:00
mdio of: mdio: warn if deprecated fixed-link binding is used 2025-09-15 18:15:41 -07:00
netdevsim devlink: Move graceful period parameter to reporter ops 2025-08-26 17:24:16 -07:00
ovpn
pcs net: pcs: Kconfig: Fix unmet dependency warning 2025-09-17 14:57:52 -07:00
phy net: phy: remove mdio_board_info support from phylib 2025-09-17 15:24:01 -07:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-09-04 13:33:00 -07:00
pse-pd net: pse-pd: Add Si3474 PSE controller driver 2025-08-28 14:41:59 +02:00
slip
team
thunderbolt
usb Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups" 2025-09-11 16:46:04 +02:00
vmxnet3
vxlan vxlan: Make vxlan_fdb_find_uc() more robust against NPDs 2025-09-09 18:27:33 -07:00
wan net: lapbether: ignore ops-locked netdevs 2025-08-08 13:22:28 -07:00
wireguard wireguard: queueing: always return valid online CPU in wg_cpumask_choose_online() 2025-09-11 18:52:21 -07:00
wireless Plenty of things going on, notably: 2025-09-11 17:50:46 -07:00
wwan net: wwan: iosm: use int type to store negative error codes 2025-08-27 18:17:15 -07:00
xen-netback
amt.c ipv4: Convert ->flowi4_tos to dscp_t. 2025-08-26 17:34:31 -07:00
bareudp.c
dummy.c
eql.c
geneve.c geneve: Avoid -Wflex-array-member-not-at-end warning 2025-09-11 18:49:16 -07:00
gtp.c ipv4: Convert ->flowi4_tos to dscp_t. 2025-08-26 17:34:31 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-09-11 17:40:13 -07:00
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c netconsole: use netpoll_parse_ip_addr in local_ip_store 2025-08-12 17:32:42 -07:00
netkit.c
nlmon.c
ntb_netdev.c
pfcp.c
rionet.c
Space.c net: Space: Replace memset(0) + strscpy() with strscpy_pad() 2025-08-15 12:37:50 -07:00
sungem_phy.c
tap.c
tun_vnet.h
tun.c tun: replace strcpy with strscpy for ifr_name 2025-08-13 17:20:51 -07:00
veth.c
virtio_net.c net: xdp: pass full flags to xdp_update_skb_shared_info() 2025-09-11 12:00:20 +02:00
vrf.c ipv4: Convert ->flowi4_tos to dscp_t. 2025-08-26 17:34:31 -07:00
vsockmon.c
xen-netfront.c