From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:40310 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726922AbeGLQl2 (ORCPT ); Thu, 12 Jul 2018 12:41:28 -0400 Date: Thu, 12 Jul 2018 17:31:07 +0100 From: Al Viro To: Linus Torvalds Cc: David Howells , Andrew Lutomirski , Linux API , linux-fsdevel , Linux Kernel Mailing List , Jann Horn Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] Message-ID: <20180712163107.GW30522@ZenIV.linux.org.uk> References: <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> <686E805C-81F3-43D0-A096-50C644C57EE3@amacapital.net> <22370.1531293761@warthog.procyon.org.uk> <7002.1531407244@warthog.procyon.org.uk> <20180712160030.GV30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jul 12, 2018 at 09:07:36AM -0700, Linus Torvalds wrote: > On Thu, Jul 12, 2018 at 9:00 AM Al Viro wrote: > > > > Wait a sec - that's only a problem if your command contains pointer-chasing > > et.al. > > No. > > It's a problem if anybody ever does something like "let's have a > helper splice thread that uses splice to move data automatically from > one buffer to another". > > And yes, it's something people have wanted. > > Seriously. I'm putting my foot down. NO COMMANDS IN WRITE DATA! > > We have made that mistake in the past. Having done stupid things in > the past is not an excuse for doing so again. Quite the reverse. > Making the same mistake and not learning from your mistakes is the > sign of stupidity. > > So I repeat: write is for data. If you want an action, you do it with > ioctl, or you do it with a system call. *shrug* I think you are wrong[1], but it's your decision. And seriously, ioctl? _That_ has a great track record... [1] one man's data is another man's commands, for starters. All networking protocols would fit your description. So would ANSI escape sequences ("move cursor to line 12 column 45" does sound like a command), so would writing postscript to printer, etc. IME it's more about data structures that are not marshalled cleanly - that tends to go badly wrong. Again, see SG_IO for recent example... Anyway, your tree, your policy.