Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1898823imm; Thu, 12 Jul 2018 09:34:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc9N/RYDewwxaUeRJcI4QENnZ6LjrQ/Z+LEqFiiulLfLE0xDFv8gNOi7C/ZAzMjxCg6tQwj X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr2861836plg.170.1531413243804; Thu, 12 Jul 2018 09:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531413243; cv=none; d=google.com; s=arc-20160816; b=dipseMRhzkXCBUkxFPrxlGpO3q4Ribo7M3SHpefZtmLv1cI9RlPCdFZ1KKfVXFcL33 7KhVE6EXpRjBeVFtODfot0oXEY/pD7Ufkzg2BDeCideV8nfJ2gX7P0VCtZAlTP2mpQYA DxMxsifgyNzOoFcpU31aK1yR+eNmdUBhgJi2Ah3lkUSIgyq5w2Tb4nG2tEw5ynux5NC8 WOZuqiDwSUgsOlvdwMs4OFXlHsqyqJqNLsstpTG/39rScYWxKh1DLkKFy7dKDYsjbveb MeJ3yfMfI41CUJU2YXdFklxQOmO2JcfNwmdhI75VK45WGJyzfHoGB9BQkoAf+5amCqi0 KdJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=9YxS0ZbkW4hVB9BRyltVHTVBbsfvQeP8hnulchFeYdw=; b=IqtWgmM2yJqIgYYTkDHO0fAE1miUJwEd+abknFw90JIvor8By01fycfDqbO6tSjN/S NTYb8AHbf1QOkTwIKVu6wENDPxQ5gVuNXb9nHQut6HFHj6kjBnNITkt2JPnHqa5y718h pdchgjN/bLvO8naq/cOIksx7kqtouv/iPXPMGk+haWwO8+ctpzNVfrcKsw5ugS6ow5Jl OX7k8VfwbTbHCS0uquChbyxmGbXw76/39BCQXVH8Fo3JFey+qQkn9tVnZLJVlGw6Bltd 3o2r4ZBh+W20hfGfxLY4E1tGAsMCMJq7LdumTKiV4ELXx5cy37NeIGQeCz+DN0tshfHN b4sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y123-v6si23324046pfc.302.2018.07.12.09.33.48; Thu, 12 Jul 2018 09:34:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732386AbeGLQl2 (ORCPT + 99 others); Thu, 12 Jul 2018 12:41:28 -0400 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 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fdeUl-0001T6-IF; Thu, 12 Jul 2018 16:31:07 +0000 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: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.