From: David Miller <davem@davemloft.net>
To: simon@fire.lp0.eu
Cc: netdev@vger.kernel.org, paulus@samba.org, linux-ppp@vger.kernel.org
Subject: Re: [PATCH 2/2] ppp_generic: linearise skbs before passing them to pppd
Date: Sun, 02 May 2010 23:27:11 -0700 (PDT) [thread overview]
Message-ID: <20100502.232711.256856995.davem@davemloft.net> (raw)
In-Reply-To: <4BDB2469.6020105@simon.arlott.org.uk>
From: Simon Arlott <simon@fire.lp0.eu>
Date: Fri, 30 Apr 2010 19:41:45 +0100
> Frequently when using PPPoE with an interface MTU greater than 1500,
> the skb is likely to be non-linear. If the skb needs to be passed to
> pppd then the skb must be linearised first.
>
> The previous commit fixes an issue with accidentally sending skbs
> to pppd based on an invalid read of the protocol type. When that
> error occurred pppd was reading invalid skb data too.
>
> Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Don't propagate stupidity.
The real problem is that ppp_read() can't handle non-linear SKBs, so
fix that instead. The easiest way to do that is to put a "struct
iovec iov;" on ppp_read()'s stack, fill it in with ther user buffer
pointer and length, then use that to call
skb_copy_datagram_const_iovec().
next prev parent reply other threads:[~2010-05-03 6:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 18:41 [PATCH 1/2] ppp_generic: pull 2 bytes so that PPP_PROTO(skb) is valid Simon Arlott
2010-04-30 18:41 ` [PATCH 2/2] ppp_generic: linearise skbs before passing them to pppd Simon Arlott
2010-05-03 6:27 ` David Miller [this message]
2010-05-03 16:51 ` [PATCH 2/2] ppp_generic: handle non-linear skbs when " Simon Arlott
2010-05-03 6:25 ` [PATCH 1/2] ppp_generic: pull 2 bytes so that PPP_PROTO(skb) is valid David Miller
2010-05-03 11:50 ` Simon Arlott
2010-05-03 19:49 ` David Miller
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=20100502.232711.256856995.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=simon@fire.lp0.eu \
/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;
as well as URLs for NNTP newsgroup(s).