Netdev List
 help / color / mirror / Atom feed
* [PATCH v5.15.205] ipv4: set SKBFL_SHARED_FRAG in the right skb field
@ 2026-05-09  5:37 Feng zhou
  2026-05-09  6:13 ` Qingfang Deng
  2026-05-09  6:30 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Feng zhou @ 2026-05-09  5:37 UTC (permalink / raw)
  To: gregkh, imv4bel, h3xrabbit, steffen.klassert, benh
  Cc: netdev, linux-kernel, yangzhenze, wangdongdong.6, zhoufeng.zf

From: Feng Zhou <zhoufeng.zf@bytedance.com>

commit ab8b995323e5237041472d07e5055f5f7dcdf15b
("xfrm: esp: avoid in-place decrypt on shared skb frags")
backported the shared frag marking to ip_append_page(), but it writes
SKBFL_SHARED_FRAG to skb_shinfo(skb)->tx_flags.

SKBFL_SHARED_FRAG is a skb_shared_info::flags bit, so storing it in
skb_shinfo(skb)->tx_flags does not mark the skb as carrying shared
frags for later consumers.

Set the bit in skb_shinfo(skb)->flags instead. This makes the
backport actually tag spliced UDP pages as shared and restores the
protection intended for the ESP-in-UDP path.

Fixes: ab8b995323e5237041472d07e5055f5f7dcdf15b ("xfrm: esp: avoid in-place decrypt on shared skb frags")
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
---
 net/ipv4/ip_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 68509e1f89b5b..5d8f8a5901bc6 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1443,7 +1443,7 @@ ssize_t	ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
 			goto error;
 		}
 
-		skb_shinfo(skb)->tx_flags |= SKBFL_SHARED_FRAG;
+		skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
 
 		if (skb->ip_summed == CHECKSUM_NONE) {
 			__wsum csum;
-- 
2.39.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v5.15.205] ipv4: set SKBFL_SHARED_FRAG in the right skb field
  2026-05-09  5:37 [PATCH v5.15.205] ipv4: set SKBFL_SHARED_FRAG in the right skb field Feng zhou
@ 2026-05-09  6:13 ` Qingfang Deng
  2026-05-09  6:30 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Qingfang Deng @ 2026-05-09  6:13 UTC (permalink / raw)
  To: Feng Zhou
  Cc: gregkh, imv4bel, h3xrabbit, steffen.klassert, benh, netdev,
	linux-kernel, yangzhenze, wangdongdong.6

On Sat, 9 May 2026 at 13:37:51 +0800, Feng Zhou wrote:
> 
> commit ab8b995323e5237041472d07e5055f5f7dcdf15b
> ("xfrm: esp: avoid in-place decrypt on shared skb frags")
> backported the shared frag marking to ip_append_page(), but it writes
> SKBFL_SHARED_FRAG to skb_shinfo(skb)->tx_flags.
> 
> SKBFL_SHARED_FRAG is a skb_shared_info::flags bit, so storing it in
> skb_shinfo(skb)->tx_flags does not mark the skb as carrying shared
> frags for later consumers.
> 
> Set the bit in skb_shinfo(skb)->flags instead. This makes the
> backport actually tag spliced UDP pages as shared and restores the
> protection intended for the ESP-in-UDP path.
> 
> Fixes: ab8b995323e5237041472d07e5055f5f7dcdf15b ("xfrm: esp: avoid in-place decrypt on shared skb frags")
> Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>

Duplicate of commit fe785bb3a809.

FYI, stable patches should be sent to stable@vger.kernel.org.

Regards,
Qingfang

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v5.15.205] ipv4: set SKBFL_SHARED_FRAG in the right skb field
  2026-05-09  5:37 [PATCH v5.15.205] ipv4: set SKBFL_SHARED_FRAG in the right skb field Feng zhou
  2026-05-09  6:13 ` Qingfang Deng
@ 2026-05-09  6:30 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2026-05-09  6:30 UTC (permalink / raw)
  To: Feng zhou
  Cc: imv4bel, h3xrabbit, steffen.klassert, benh, netdev, linux-kernel,
	yangzhenze, wangdongdong.6

On Sat, May 09, 2026 at 01:37:51PM +0800, Feng zhou wrote:
> From: Feng Zhou <zhoufeng.zf@bytedance.com>
> 
> commit ab8b995323e5237041472d07e5055f5f7dcdf15b
> ("xfrm: esp: avoid in-place decrypt on shared skb frags")
> backported the shared frag marking to ip_append_page(), but it writes
> SKBFL_SHARED_FRAG to skb_shinfo(skb)->tx_flags.
> 
> SKBFL_SHARED_FRAG is a skb_shared_info::flags bit, so storing it in
> skb_shinfo(skb)->tx_flags does not mark the skb as carrying shared
> frags for later consumers.
> 
> Set the bit in skb_shinfo(skb)->flags instead. This makes the
> backport actually tag spliced UDP pages as shared and restores the
> protection intended for the ESP-in-UDP path.
> 
> Fixes: ab8b995323e5237041472d07e5055f5f7dcdf15b ("xfrm: esp: avoid in-place decrypt on shared skb frags")
> Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
> ---
>  net/ipv4/ip_output.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index 68509e1f89b5b..5d8f8a5901bc6 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -1443,7 +1443,7 @@ ssize_t	ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
>  			goto error;
>  		}
>  
> -		skb_shinfo(skb)->tx_flags |= SKBFL_SHARED_FRAG;
> +		skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
>  
>  		if (skb->ip_summed == CHECKSUM_NONE) {
>  			__wsum csum;
> -- 
> 2.39.5

This is already fixed, why send it again?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-09  6:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09  5:37 [PATCH v5.15.205] ipv4: set SKBFL_SHARED_FRAG in the right skb field Feng zhou
2026-05-09  6:13 ` Qingfang Deng
2026-05-09  6:30 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox