Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp987464imm; Wed, 11 Jul 2018 14:52:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfPe2EIgh6h849fSGIgOxJDulwjzO2PvfVvIovL2UpmYf15XSybwS9Ae3aQGJfRyIY89gZK X-Received: by 2002:a63:d20e:: with SMTP id a14-v6mr322284pgg.226.1531345967544; Wed, 11 Jul 2018 14:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531345967; cv=none; d=google.com; s=arc-20160816; b=cZX+7XXBuiSqvm0w5Y8wtqTxknzv2LOo6Rd0CkF7YcTAzun6c+JlmAaL9an5iZ4sFg Tfg474yyDSTcW2GAHxN7nxAo+jt/XihzT8GGj/KyaaVDMIRYFl/LL13kT4akHFd/jYxH H+dgzY/e9c6zuKSUY8uBrUnBRq2BY1/YXSqRSFE4dLeKoZ6Xr8vq/wJrZ770vON4jyAx ykSw/w/re/L2carhIUBi5e448XfDsxMYNQXLr6gHjUWCnLpakiwt++zh5sDuxnDPEnSL kMVxxBcXfQyNCwCvDLfTHCZU/jtVX0Id/OZw3Z2TGiZfOiMdzWqi8TqjGmGqtCwpAJam 3Iow== 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=kWLBywxe48pLQ70B3+vZi590UDg9apxQDpHljnI9auI=; b=AWIOI+ndLy994KwkZiHwIRflnk4Eg37bnzpAbbiIkkjqlKZe6meGVTO6tZ2IjfQGl6 /YHFAfPgUwCWwZ/LKDazql/0X8R5YFLZF641wtYph3gFQpEA2xLGtsXBL/H+IEIg2xdR iBw8RIazpRA56gpdP0DfU5+CZELI+af2N7VK84aZju7jjls+g/kz5qipv9o9UvQh2umc 7iLWqTK/DD5gg8g795SX0nSy6NM5LJ6JVBD8YObUR08n6LSTftcE3PVhT0iO6fM33phR 58CcKQIquuhLTW73YVkNqHC1L/Ivm0OfXMNNptPPkq979MYz6AmJWfAO/eHL+jC3ekrY S0QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IuZxTx1u; 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 r3-v6si6713253pgg.201.2018.07.11.14.52.32; Wed, 11 Jul 2018 14:52:47 -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=IuZxTx1u; 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 S1732840AbeGKQIX (ORCPT + 99 others); Wed, 11 Jul 2018 12:08:23 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:45944 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbeGKQIW (ORCPT ); Wed, 11 Jul 2018 12:08:22 -0400 Received: by mail-io0-f195.google.com with SMTP id l25-v6so24146938ioh.12; Wed, 11 Jul 2018 09:03:22 -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=kWLBywxe48pLQ70B3+vZi590UDg9apxQDpHljnI9auI=; b=IuZxTx1us2OhUFKKofPI8Vd3kbh7UT7vaupoH3MshKCBVVYxaqNxPnoBD6POB7zdgV dG/Ft5ZXrg7O0GySRKY5biXcsuS1m5RCARMGnswXs66Egab7M6tJZhKdq8IWxc8/xjBW tECBzEv9V2GP8zlH+R8KjQcPQQepcHXcD23qc= 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=kWLBywxe48pLQ70B3+vZi590UDg9apxQDpHljnI9auI=; b=Y/QSp7hTqIU6Yv7I31bvdzELJezMB7/5eXpXKVt9ISNHhRruJlYMr+QDqmtMwCZuuy n1TbFt+revKBS4T1S4jdfIQ+nhVOfpyCpxt0RkcdttUhOwEu5TW4wfkc6Sp4wrlx2FGT B6NTzFHivHQKCAWfD2KNHWQuMKUU7dgIPXl3vIZ8YD9ZojgNLVVrkB7wImZRvGDLxE26 86S+Q9qs4/DjHzcsVXevNv5sW9OV9epu77QvWwW2uNXIjdaTNVnyGQORxw9qJwj9QUj5 XIKqK3lL2LZIv62fiIzsRjXMEBDUn5TptH9XeAcgZcAU4Jau0fBWGTnt2EXkgOLFarDA 9Wmg== X-Gm-Message-State: APt69E2qHj8R6ENjzChwaoSE8EVA7e7t6eRym7lZhwjpqA05QlqskEPN yCoNz5/0mPqAkD3oveOi0gsvrH9bURU8qpSZIP0= X-Received: by 2002:a6b:1502:: with SMTP id 2-v6mr26636116iov.203.1531325001214; Wed, 11 Jul 2018 09:03:21 -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> <24347.1531298554@warthog.procyon.org.uk> In-Reply-To: <24347.1531298554@warthog.procyon.org.uk> From: Linus Torvalds Date: Wed, 11 Jul 2018 09:03:10 -0700 Message-ID: Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] To: David Howells Cc: Andy Lutomirski , Al Viro , 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 Wed, Jul 11, 2018 at 1:42 AM David Howells wrote: > > Buffering till the end means you have to buffer *everything* - and, > unless you limit your buffer, you risk running out of RAM Do we really care? Can't we limit the buffer size to something small? Right now, the mount options can't be bigger than a page anyway. Why would we want to extend on that? Btw, the magic word here is "why". I really really want to see a fairly exhaustive explanation of why this all is such a big deal, and exactly what limitations (including perhaps the mount option buffer size) are such a pain right now and need changing. > Now, I can replace the 'x' command with an ioctl() so that just writing random > rubbish to the fd won't cause anything to actually happen. > > fd = fsopen("ext4"); > write(fd, "s /dev/sda1"); > write(fd, "o user_xattr"); > ioctl(fd, FSOPEN_IOC_CREATE_SB, 0); > > or I could make a special syscall for it: > > fscommit(fd, FSCOMMIT_CREATE); > > or: > > fscommit(fd, FSCOMMIT_RECONFIGURE); > > and require that you have CAP_SYS_ADMIN to enact it. I think any of them sound fairly ok, with that whole "we need reasons" caveat. Linus