mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Fang <wei.fang@nxp.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Zefir Kurtisi <zefir.kurtisi@westermo.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Simon Horman <horms@kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH v2 net 2/6] net: enetc: linearize PTP event packets with one-step TX timestamping
Date: Wed, 8 Apr 2026 04:44:01 +0000	[thread overview]
Message-ID: <AM8PR04MB7284A378E8FD79C53E77B0C1885BA@AM8PR04MB7284.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20260406204122.167237-3-vladimir.oltean@nxp.com>

> Sashiko reports that enetc_ptp_parse() uses ptp_parse_header(), which
> does not handle fragmented headers, and expects the entire area between
> skb_mac_header() and the end of the PTP header to be linear.

I think we should correct the check in ptp_parse_header().

@@ -130,7 +130,7 @@ struct ptp_header *ptp_parse_header(struct sk_buff *skb, unsigned int type)
        ptr += ETH_HLEN;

        /* Ensure that the entire header is present in this packet. */
-       if (ptr + sizeof(struct ptp_header) > skb->data + skb->len)
+       if (ptr + sizeof(struct ptp_header) > skb->data + skb_headlen(skb))
                return NULL;

  reply	other threads:[~2026-04-08  4:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06 20:41 [PATCH v2 net 0/6] Fix short frame transmission in enetc Vladimir Oltean
2026-04-06 20:41 ` [PATCH v2 net 1/6] net: enetc: increment error counter in enetc_xdp_xmit() on DMA mapping errors Vladimir Oltean
2026-04-08  3:16   ` Wei Fang
2026-04-06 20:41 ` [PATCH v2 net 2/6] net: enetc: linearize PTP event packets with one-step TX timestamping Vladimir Oltean
2026-04-08  4:44   ` Wei Fang [this message]
2026-04-06 20:41 ` [PATCH v2 net 3/6] net: enetc: ensure enetc_xdp_xmit() calls enetc_update_tx_ring_tail() Vladimir Oltean
2026-04-08  5:06   ` Wei Fang
2026-04-06 20:41 ` [PATCH v2 net 4/6] net: enetc: fix bogus TX ring consumer index after reinitialization Vladimir Oltean
2026-04-08  5:09   ` Wei Fang
2026-04-06 20:41 ` [PATCH v2 net 5/6] net: enetc: pad short frames in software Vladimir Oltean
2026-04-08  5:17   ` Wei Fang
2026-04-06 20:41 ` [PATCH v2 net 6/6] net: enetc: pad short XDP frames coming from devmap Vladimir Oltean

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=AM8PR04MB7284A378E8FD79C53E77B0C1885BA@AM8PR04MB7284.eurprd04.prod.outlook.com \
    --to=wei.fang@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=claudiu.manoil@nxp.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=ioana.ciornei@nxp.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    --cc=zefir.kurtisi@westermo.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®