Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3711514imm; Mon, 4 Jun 2018 08:06:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIyiL3x/CtxqE8ldxjBEgSwJ0YNYHDYCj+JUhjsG0FJb4wKp0hXpLpX5F6JvQAz1BEbncfp X-Received: by 2002:a17:902:be03:: with SMTP id r3-v6mr12981998pls.319.1528124760652; Mon, 04 Jun 2018 08:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528124760; cv=none; d=google.com; s=arc-20160816; b=SZgbnp3rPPgq+XDV8s4VPJV0JN+rm/NtvKvC3guubBg2Z4zWGL4SREznNOOwY8/Vow BLJ8WfGuWMI2j3OJUFl15sUeGVhn3qLV2VHbfPLve7AfuAgYn/9XRA4ZryMGVsv7t78/ BrV0QHSzv7cxi/wmRKXOHb/D8HQDgLoH+th+5l0BCyZjhYy3GVHUtrQD5W8GCQmqextV IEWctadLwXtIcKTdSHuWIjxLg9CZ3Ggrvl3Y/qwiPtIAxVPvGHWIB9B/lUXCkolnJ6Fj CyF16u5uETQtR8EaAvgE0CsmeQLSQT7b1mW3zR7Mase/q5yuo5kfR2wplO32mMp9RNxE KpHg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=R6DwJiQ1DWWzJf0OWhO0mVQXziOUpzVoGDOq/ALtg/w=; b=ANTIqUQWVYuEik2jJ/qB3RKQbsiHJSnbYMo/HNXHFqYPkW+n5iMhgpG3RFjlBF0lSa DKJVWyCylqUstqTN4Boh31lVSQ8tT6OlTjxVLUb2S9y4UyQp/F4kZ1tv8AT26J2q4XkQ llTiTUJTqPd7s7TvVRRNYygVUBaCqBKXyRvgE4ymhkGkIlveqpvW7ccybi2iMN+X9yU7 2IeayN2KhHQRMB3tSXHL99kUoEEe2Hn95FPwzt2b+GGaHcLqWk02wtSDYSlTBt2FfFhf qMF/0v53FuMAMsEsQX0znFFrIqtVHRnVf6ktwztLw7I6E4+ujlbxsAP0mU1XI9EtsCt1 EGAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YeQhrz+q; 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 s13-v6si45835822plp.350.2018.06.04.08.05.46; Mon, 04 Jun 2018 08:06:00 -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=fail header.i=@gmail.com header.s=20161025 header.b=YeQhrz+q; 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 S932067AbeFDPFR (ORCPT + 99 others); Mon, 4 Jun 2018 11:05:17 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:42178 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753410AbeFDPFM (ORCPT ); Mon, 4 Jun 2018 11:05:12 -0400 Received: by mail-lf0-f65.google.com with SMTP id v135-v6so25772905lfa.9; Mon, 04 Jun 2018 08:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=R6DwJiQ1DWWzJf0OWhO0mVQXziOUpzVoGDOq/ALtg/w=; b=YeQhrz+q1paiB+bNkv5KgoF0Kv3xqpm93jiuARmWuU+2ljfCTchQvmbAlZiDGCXJ/0 fPWv7ASwLnlSW6HKxoc0ldz2wa6yWocYnB9S6/dJjc4gHJEWQHQYxohfPcAJvxmBVpT1 bu4sHWDLFlmoWRdyJd21Gg0+w0zkHBwGp+QnimA7XF3RN2ZUb7Kkh/Z7G6vLsI0Qxp/W xnGNTjk16WpJGKCQK4bMO8r2CRvToTS7/03WTCt0K9cgREpRA1KnLGay0/NV8mhCVWVj CkphC6gzPRJokUsbUBGHiz19vJNUOFJHny1yyA86uT2Pu+2TuOb8N0kyHoolRMK5JK5d yX2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=R6DwJiQ1DWWzJf0OWhO0mVQXziOUpzVoGDOq/ALtg/w=; b=fikbbWOg4Dcy2lPFR0Vw4iUfiJPSjzGiDbWD7HSbKAJLbJMGPXFSRaVxapn1zFSiJa seOIYHyUgjpztq9VdE47j/LnsOSYDoF7kvkrOEEcJdSXp/3tuc9ld4Yt7If5Z5RXXE0c NwPFCjEoNNTYHzpFQP+37LGBUVm2St+G2JyDxWp/VYpOd3oIlsK/wF2JCAf4OCue0Bod OSBwfgEeKK8gErPGhZt1zL38+ymrrgIMcVW8zkDc7ndTZbZvsdovzHpTnZdnaF50VrwB DX9k9CltIj5khr5lFbMyQ5qilhUQQ9LnNxIFalf+Ea7pMBtqiu5yC0nJB2yDxMfMFRYf l4Iw== X-Gm-Message-State: ALKqPwfARXkIEQOgwOtFN9cs6FVR3aIiAYtqRo2Qo3uwXkJBGO0P3kI4 cnEGmfu3iKscWDEZI/B6OIirj3ydno8PoXlDxEM= X-Received: by 2002:a19:1460:: with SMTP id k93-v6mr13840815lfi.23.1528124710638; Mon, 04 Jun 2018 08:05:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:56c8:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 08:05:09 -0700 (PDT) In-Reply-To: <152720686035.9073.17015443936296474540.stgit@warthog.procyon.org.uk> References: <152720672288.9073.9868393448836301272.stgit@warthog.procyon.org.uk> <152720686035.9073.17015443936296474540.stgit@warthog.procyon.org.uk> From: Arnd Bergmann Date: Mon, 4 Jun 2018 17:05:09 +0200 X-Google-Sender-Auth: zhBh2907v2XYGvg-zYgwArgu6Qw Message-ID: Subject: Re: [PATCH 21/32] VFS: Implement fsmount() to effect a pre-configured mount [ver #8] To: David Howells Cc: Al Viro , Linux FS-devel Mailing List , linux-afs@lists.infradead.org, Linux Kernel Mailing List 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 Fri, May 25, 2018 at 2:07 AM, David Howells wrote: > Provide a system call by which a filesystem opened with fsopen() and > configured by a series of writes can be mounted: > > int ret = fsmount(int fsfd, int dfd, const char *path, > unsigned int at_flags, unsigned int flags); > > +/* > + * Create a kernel mount representation for a new, prepared superblock > + * (specified by fs_fd) and attach to an O_PATH-class file descriptor. > + */ > +SYSCALL_DEFINE5(fsmount, int, fs_fd, unsigned int, flags, unsigned int, ms_flags, > + void *, spare_4, void *, spare_5) > +++ b/include/linux/syscalls.h > @@ -898,6 +898,8 @@ asmlinkage long sys_statx(int dfd, const char __user *path, unsigned flags, > unsigned mask, struct statx __user *buffer); > asmlinkage long sys_fsopen(const char *fs_name, unsigned int flags, > void *reserved3, void *reserved4, void *reserved5); > +asmlinkage long sys_fsmount(int fsfd, int dfd, const char *path, unsigned int at_flags, > + unsigned int flags); > The prototype in the header doesn't match the one in the implementation, which should cause a compile-time error, at least if syscalls.h is included in namespace.c Do you have a particular use case in mind for the spare_4/spare_5 arguments? If not, we can probably skip them. If we end up needing them after all, we can always add a new syscall entry point, or use one of the flag bits to decide whether the additional arguments are valid or not. > --- a/kernel/sys_ni.c > +++ b/kernel/sys_ni.c > @@ -435,3 +435,4 @@ COND_SYSCALL(setuid16); > > /* fd-based mount */ > COND_SYSCALL(sys_fsopen); > +COND_SYSCALL(sys_fsmount); This should only be needed if the syscall is optional, which it doesn't seem to be (same for the other ones here). Arnd