From: Qingfang Deng <qingfang.deng@linux.dev>
To: Vlatko Kosturjak <vlatko.kosturjak@gmail.com>,
linux-ppp@vger.kernel.org, netdev@vger.kernel.org,
Eric Dumazet <edumazet@google.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH] ppp: make room for the filter tag instead of assuming it
Date: Wed, 2 Sep 2026 15:59:02 +0800 [thread overview]
Message-ID: <1d27bb3a-c92b-46f1-a7c3-b3d9ea7136e5@linux.dev> (raw)
In-Reply-To: <CAPAw8HE6QgnePG=UUfU2d9mYXNpY2O_kp5v0J82VuVoR6gwWOg@mail.gmail.com>
Hi,
Please avoid sending patches with Gmail Web, as it replaces tabs with
spaces.
On 2026/9/2 14:22, Vlatko Kosturjak wrote:
> ppp_receive_nonmp_frame() prepends a two-byte direction tag before running
> the pass/active BPF filters:
>
> *(__be16 *)skb_push(skb, 2) = htons(PPP_FILTER_INBOUND_TAG);
>
> Nothing on the receive path guarantees those two bytes of headroom, and a
> peer can arrange for only one to be available. ppp_async.c contributes two
> halves of the problem.
>
> First, the frame-error path resets a reused skb's headroom to zero while
> claiming to restore it to a freshly allocated state - but a fresh skb from
> dev_alloc_skb() carries NET_SKB_PAD:
>
> err:
> if (skb) {
> /* make skb appear as freshly allocated */
> skb_trim(skb, 0);
> skb_reserve(skb, - skb_headroom(skb));
> }
I agree with Eric. Dropping the skb on error is cleaner and easier.
But I think the Fixes tag should reference the commit that introduced
the skb_reserve() call:
6722e78c9005 ("[PPP]: handle misaligned accesses")
instead of 2.6.12-rc2.
Kind regards,
prev parent reply other threads:[~2026-09-02 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 6:22 [PATCH] ppp: make room for the filter tag instead of assuming it Vlatko Kosturjak
2026-09-02 6:59 ` Eric Dumazet
2026-09-02 7:59 ` Qingfang Deng [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=1d27bb3a-c92b-46f1-a7c3-b3d9ea7136e5@linux.dev \
--to=qingfang.deng@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vlatko.kosturjak@gmail.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