From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Jakub Kicinski <kuba@kernel.org>, admiyo@os.amperecomputing.com
Cc: matt@codeconstruct.com.au, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
sudeep.holla@arm.com, Jonathan.Cameron@huawei.com,
lihuisong@huawei.com
Subject: Re: [net-next v38] mctp pcc: Implement MCTP over PCC Transport
Date: Mon, 13 Apr 2026 10:15:04 +0800 [thread overview]
Message-ID: <34340ac20daba31f2cabe20adfe08ca08fb2908d.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20260410032441.1844450-1-kuba@kernel.org>
Hi Adam,
> > + memcpy_toio(outbox->chan->shmem, skb->data, skb->len);
>
> Is it possible to read out of bounds here if the skb is fragmented?
>
> The skb->data pointer only points to the linear portion of the packet, while
> skb->len represents the total packet length including page fragments.
> skb_cow_head() does not linearize the packet, so a call to skb_linearize()
> might be needed before copying.
I assume that we should only be seeing linear skbs here, as the driver
does not advertise NETIF_F_FRAGLIST or NETIF_F_SG.
(that said, this could support fragmented skbs quite easily, but that
would be more suitable for a follow-up change)
Cheers,
Jeremy
next prev parent reply other threads:[~2026-04-13 2:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 18:07 [net-next v38] mctp pcc: Implement MCTP over PCC Transport Adam Young
2026-04-10 3:24 ` Jakub Kicinski
2026-04-13 2:15 ` Jeremy Kerr [this message]
2026-04-10 3:29 ` Jakub Kicinski
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=34340ac20daba31f2cabe20adfe08ca08fb2908d.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=Jonathan.Cameron@huawei.com \
--cc=admiyo@os.amperecomputing.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sudeep.holla@arm.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