Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1905172imm; Thu, 12 Jul 2018 09:40:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf1NIM8IZQcql00/QQ1sGBwS8ezS6S64vAfSv2EemSuHEX+GeXg3Vc4wOFYwdhJ9UWut284 X-Received: by 2002:a65:608c:: with SMTP id t12-v6mr2809138pgu.159.1531413651214; Thu, 12 Jul 2018 09:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531413651; cv=none; d=google.com; s=arc-20160816; b=qLwkjiSpP3NPQkTIhcMs6Up3X7TVmjG2cTSfe8++PSagC5cqs4B5MbVIJ6Haol6sFZ rtYDFqKePIMe/H0pH7Ug7n4vdpDrQUYZsxTsAlF8iJTTnwRMnimznSeAB9PtqHXeHXrz Lz4sIUQPXC55hHCucj9MAtHREYKaBgp4LaV3J2TGQqFMmW5a+wNCPKcqjeAvFs+vIrA0 QwacjXEqBgceUfhCPMMhLAV9IqwfRTX6MNPrMP0pCx+mrnyTKbfFGkeIYWv+u8ZusFY/ EELK7bI0RiIrTDRw4DGMs8HL3jYCVmEI7n3U8m09dIax9PFHvczwLWxUo3iXxBFGlLpz 2qQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=BBSrpycUf6ADtvbqlfgOzLlhjDsMWn/zuemyfSnSpVg=; b=hlNKgNen/6Qk9maxw6C8DURcGEfeaRqHPJgNWR18fFcphs9aiuPa52iTJmrPUyVLIn Cv32H72myLi8rlrrCtbSaQsB4kIDLnckeAv0NKnHhB+Cb1Uy20BxKqERMDMMAMlVnKUI OrKryfSLVCpqF6AuJ/cF5lprYSdXvcdrRK7oFoM2axmfHLSUxSPev2v8Wwnj2xFS8BOC kCqsb5zXYrmPDi3WZCtLy0E/kBX4gKhdtLYHvqmmnp9P1aiqHaw2e/VJyttRX0s8mXsZ BADc7ykPnVBJkSEdXoaFO5N6shA+AQtRfdb8cp32Vxs7LXQwo3CPQ8WIKYO8qdmwgqqy CwUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NGZ9eX3s; 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 d9-v6si12188116pgg.423.2018.07.12.09.40.27; Thu, 12 Jul 2018 09:40:51 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NGZ9eX3s; 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 S1732380AbeGLQuC (ORCPT + 99 others); Thu, 12 Jul 2018 12:50:02 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:36793 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbeGLQuB (ORCPT ); Thu, 12 Jul 2018 12:50:01 -0400 Received: by mail-io0-f195.google.com with SMTP id k3-v6so28794675iog.3; Thu, 12 Jul 2018 09:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BBSrpycUf6ADtvbqlfgOzLlhjDsMWn/zuemyfSnSpVg=; b=NGZ9eX3sXNY3EpOfF0DUseouV+l2B/haDXuUPe9eL0CYk/2ujd2hg/qBE1D5b3Vw9h bk3gS+chmAUII8e7y8gd9N9gVJOt1iHcrQbmsBCUOW3m2BFEjfQMMytrNOoFYAVB/WU+ 02wKZ9NPgrr5PFuClV/uNVLrxrq2I6HiSKcMo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BBSrpycUf6ADtvbqlfgOzLlhjDsMWn/zuemyfSnSpVg=; b=T59VCceAm9Aw28eVoK6Sb4e7s8l0t6ia0AQ/0EheNWez99yeGAy4G7v3+QC5mRimBW GM5Hz13Hw1Nc1OH38pkHwV6YUSbhm6JXaTE3AszLXi6wkcI/Row84d4Y7PyBdfhyce9P Yxz087AXDwUuqzVVkLOkq9AVyk0z36Vw3BJyZYpmrauignVrc77n7PUJaqArdWZkflOF Vb72XPBnI5rMvUSsAkKLiQGi5nSwbaRkA2DuuinPmbKRp6sIWkmfxDpTZte7ZzgAyV4t LP5C0XkRjEidk1SttrqiLGqBknjrzeu/kjPu9GAZjntHH0kAQwCJAaHk3A3ZgguP/DAJ Hv9g== X-Gm-Message-State: APt69E3OQ+iRkxDgvS7lz7nxYhe4aTJS6RFdNUPC2fYkTlnwmPU74AVv ifDBwiM+zjvBjWwBN9c++8MxMJHONLdIN/W0W8k= X-Received: by 2002:a6b:7a05:: with SMTP id h5-v6mr13259337iom.238.1531413582469; Thu, 12 Jul 2018 09:39:42 -0700 (PDT) MIME-Version: 1.0 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> <20180712163107.GW30522@ZenIV.linux.org.uk> In-Reply-To: <20180712163107.GW30522@ZenIV.linux.org.uk> From: Linus Torvalds Date: Thu, 12 Jul 2018 09:39:31 -0700 Message-ID: Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] To: Al Viro Cc: David Howells , Andrew Lutomirski , Linux API , linux-fsdevel , Linux Kernel Mailing List , Jann Horn Content-Type: text/plain; charset="UTF-8" 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 9:31 AM Al Viro wrote: > > And seriously, ioctl? _That_ has a great track record... I agree that a system call is likely saner. Especially since we'd have one to _start_ this (ie "fsopen()") it would make sense to have the one to finalize it. > [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. .. and all of that is just data to the kernel. Yes, vt100 escape sequences etc _are_ commands, and boy have we had bugs in that area. But there the excuse is "that's how the world is". The thing is, "reality" is the ultimate argument. You can't argue with cold hard facts. But when designing a new interface that doesn't have that kind of constraints, do it right. > 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... SG_IO actually gets it right. It doesn't do async, but that's part of the design (and a big part of why it's a lot simpler - the read-write thing is actually broken too and just forces user space to basically know SCSI). Linus