[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <C8KER7U60WXE.25UFD8RE6QZQK@oguc>
Date: Sat, 16 Jan 2021 20:35:41 +1300
From: "Oliver Giles" <ohw.giles@...il.com>
To: <linux-kernel@...r.kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Christoph Hellwig" <hch@....de>
Subject: Splicing to/from a tty
Commit 36e2c7421f02 (fs: don't allow splice read/write without explicit ops) broke my userspace application which talks to an SSL VPN by splice()ing between "openssl s_client" and "pppd". The latter operates over a pty, and since that commit there is no fallback for splice()ing between a pipe and a pty, or any tty for that matter.
The above commit mentions switching them to the iter ops and using generic_file_splice_read. IIUC, this would require implementing iter ops also on the line disciplines, which sounds pretty disruptive.
For my case, I attempted to instead implement splice_write and splice_read in tty_fops; I managed to get splice_write working calling ld->ops->write, but splice_read is not so simple because the tty_ldisc_ops read method expects a userspace buffer. So I cannot see how to implement this without either (a) using set_fs, or (b) implementing iter ops on all line disciplines.
Is splice()ing between a tty and a pipe worth supporting at all? Not a big deal for my use case at least, but it used to work.
Powered by blists - more mailing lists