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: <f86f5c83-0fc2-4c40-b8f9-f20f5b755cb1@linux.dev>
Date: Tue, 29 Jul 2025 09:06:36 -0700
From: Zhu Yanjun <yanjun.zhu@...ux.dev>
To: Sabrina Dubroca <sd@...asysnail.net>, netdev@...r.kernel.org
Cc: Leon Romanovsky <leonro@...dia.com>,
 Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [PATCH ipsec 1/3] xfrm: restore GSO for SW crypto


在 2025/7/28 8:17, Sabrina Dubroca 写道:
> Commit 49431af6c4ef incorrectly assumes that the GSO path is only used
> by HW offload, but it's also useful for SW crypto.
>
> This patch re-enables GSO for SW crypto. It's not an exact revert to
> preserve the other changes made to xfrm_dev_offload_ok afterwards, but
> it reverts all of its effects.
>
> Fixes: 49431af6c4ef ("xfrm: rely on XFRM offload")
> Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>

Thanks a lot.

Reviewed-by: Zhu Yanjun <yanjun.zhu@...ux.dev>

Zhu Yanjun

> ---
>   net/xfrm/xfrm_device.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c
> index d2819baea414..1f88472aaac0 100644
> --- a/net/xfrm/xfrm_device.c
> +++ b/net/xfrm/xfrm_device.c
> @@ -415,10 +415,12 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x)
>   	struct net_device *dev = x->xso.dev;
>   	bool check_tunnel_size;
>   
> -	if (x->xso.type == XFRM_DEV_OFFLOAD_UNSPECIFIED)
> +	if (!x->type_offload ||
> +	    (x->xso.type == XFRM_DEV_OFFLOAD_UNSPECIFIED && x->encap))
>   		return false;
>   
> -	if ((dev == xfrm_dst_path(dst)->dev) && !xdst->child->xfrm) {
> +	if ((!dev || dev == xfrm_dst_path(dst)->dev) &&
> +	    !xdst->child->xfrm) {
>   		mtu = xfrm_state_mtu(x, xdst->child_mtu_cached);
>   		if (skb->len <= mtu)
>   			goto ok;
> @@ -430,6 +432,9 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x)
>   	return false;
>   
>   ok:
> +	if (!dev)
> +		return true;
> +
>   	check_tunnel_size = x->xso.type == XFRM_DEV_OFFLOAD_PACKET &&
>   			    x->props.mode == XFRM_MODE_TUNNEL;
>   	switch (x->props.family) {

-- 
Best Regards,
Yanjun.Zhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ