mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryam Vargas <hexlabsecurity@proton.me>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Alexandra Winter <wintera@linux.ibm.com>,
	Thorsten Winkler <twinkler@linux.ibm.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Ursula Braun <ursula.braun@de.ibm.com>,
	Hidayath Khan <hidayath@linux.ibm.com>,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net/iucv: take a private, writable frame before rewriting it in place
Date: Thu, 29 Oct 2026 04:31:41 +0000	[thread overview]
Message-ID: <20261029043134.432738-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <eb32ba07-0a4c-4bc6-acda-36e6b95af89b@redhat.com>

On Tue, 13 Oct 2026 15:05:54 +0200, Paolo Abeni wrote:
> > +	if (skb_cow_head(skb, ETH_HLEN)) {
>
> Sashiko (nipa) noted the above is the wrong helper:
>
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261008-b4-disp-bf46f1ba-v2-1-46ff1ea9c40b@proton.me
>
> you should use skb_ensure_writable() or skb_cow()

Agreed, and sorry for the slow answer. The rewrite is in the data, not
the headroom, and skb_cow_head() only tests skb_header_cloned(), which
leaves the data shared with a nohdr holder. No af_iucv frame has one
today (nohdr is set only on the TCP, SCTP and GRO frag_list paths), so
the two cases in the commit message still get their copy; it's still
the wrong contract for a data rewrite.

v3 uses skb_cow(skb, ETH_HLEN): skb_cloned() for the rewrite, the same
ETH_HLEN headroom for the push in afiucv_swap_src_dest(). Same s390x
QEMU A/B as v2, re-run on v3: eight boots, the tap and the
ETH_P_AF_IUCV socket read every frame as sent, and each of the two
calls is still needed.

Thanks,
Bryam

pw-bot: cr


      reply	other threads:[~2026-10-29  4:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  9:21 Bryam Vargas via B4 Relay
2026-10-13 13:05 ` Paolo Abeni
2026-10-29  4:31   ` Bryam Vargas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261029043134.432738-1-hexlabsecurity@proton.me \
    --to=hexlabsecurity@proton.me \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hidayath@linux.ibm.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=twinkler@linux.ibm.com \
    --cc=ursula.braun@de.ibm.com \
    --cc=wintera@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®