From: Dianne Skoll <dianne@skoll.ca>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: N_HDLC line discipline: Race condition
Date: Thu, 23 May 2024 08:44:09 -0400 [thread overview]
Message-ID: <20240523084409.150fccb1@gato.skoll.ca> (raw)
In-Reply-To: <93ace08e-deb3-46e1-b318-18aecc210a85@kernel.org>
On Thu, 23 May 2024 10:01:51 +0200
Jiri Slaby <jirislaby@kernel.org> wrote:
> The driver definitely behaves as described. If the ldisc is used on a
> real HW. ptys are a different story -- it's not guaranteed there.
> Does it make sense to use nhdlc on a pty pair? I believe not.
OK. Well, the use case was as follows: pppd has an option called `pty`
that makes it execute an arbitrary program, connect to its standard
input and output via a pty pair, and send and receive PPP frames over that
pty pair.
rp-pppoe (https://dianne.skoll.ca/projects/rp-pppoe/) includes a
program called `pppoe` designed to be on the other end of that pty
pair and receive/transmit the PPP frames via PPPoE. pppd includes a
`sync` option, and pppoe a `-s` option that enable N_HDLC on the pty.
This lets pppoe just read/write a frame at a time without worrying
about PPP framing bytes or dealing with PPP escape characters, which
reduces the CPU overhead of pppoe.
Now, the Linux kernel has had built-in support for PPPoE for many
years, and I was thinking of dropping userspace PPPoE support, but I
heard from a user who wants to keep it. ucLinux, it seems, does not
support dlopen(), so this user can't use pppd's `plugin` option to
load the kernel-mode PPPoE support module and has to keep using
user-space PPPoE.
Sync support was added to pppoe decades ago and either it worked well,
nobody used it, or nobody reported a bug until recently. But anyway,
if the consensus is that N_HDLC shouldn't be used on a pty pair, I'm
fine with that. Perhaps a comment in the source file and a note in
the N_HDLC documentation would be good, and then I'll just remove
support for `sync` and `-s` from pppoe, since it can't be guaranteed
to work correctly.
Regards,
Dianne.
prev parent reply other threads:[~2024-05-23 12:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 21:31 N_HDLC line discipline: Race condition Dianne Skoll
2024-04-25 18:01 ` Dianne Skoll
2024-05-15 10:33 ` Jiri Slaby
2024-05-15 13:42 ` Dianne Skoll
2024-05-15 15:44 ` Dianne Skoll
2024-05-21 10:47 ` Jiri Slaby
2024-05-21 14:15 ` Dianne Skoll
2024-05-23 8:01 ` Jiri Slaby
2024-05-23 12:44 ` Dianne Skoll [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=20240523084409.150fccb1@gato.skoll.ca \
--to=dianne@skoll.ca \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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