Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp346047pxb; Wed, 3 Feb 2021 07:01:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+R23fOZMSlQH2NyZqElcxM5usj9AopxiB820tOOj3xmwWlNRHGuuzBKMgLieyQPssp53a X-Received: by 2002:a17:906:af86:: with SMTP id mj6mr1508257ejb.509.1612364469859; Wed, 03 Feb 2021 07:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612364469; cv=none; d=google.com; s=arc-20160816; b=PB9eEa+brsttINI08nK+hLmIoP4NEwGAgMVcOReglU0hzB3cF17KE90yQm0YSgUuDd Pin4cwm8gQUv47pLEhBhvTYX1fNIiTi5WGtiZ/I0nCfGYWxMpfeJttd3HeF3UZwQMGSI 8KPMQZcgH3VcIz7nbLNJe15CYchs2rEVAEXHZegaFNPphVCjMN4daLUqrh8LOODefJSx jG3ppplJvxnPX0eA2QZcF67usVwLGcu8gdRKYH7MSWm6hFQRqKzyQBhUCN6Zg8D2I/Ya OTh4DhLsIWSbKMPai/YBHuSQIQYISix21/TqibJpLi89hkEA1hr0CWlDmwy7TKUIThGg OUHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jHqPAIZKxcFxf2pPTznII237kT1yeHQ+2XeU1SzqGnM=; b=YUJh1eGmQjfW7SH6CYvGPydbWsvvKWRTw4jFsh3zRuhME+OpkZMBitTgn6etf+J26p 2sWtheaZEVqhctr2xFypBJNDzV0Nh/8ZnU2vcWUBEFj2GGWgy7X7WhsTZq2rDgKqrk2q xa3gwq0unbVOc/JhnD6xxBlNDNw1HS7WmUOGDC+llAgjsNff60nQLidP7QZuxA9/jQ98 Kn9qCuJZ7+xTMcXxB8/Rs5iK394q3+uBb/7OQZEff05xX7/XqZji3X8ELlpLvXx0gs7x PGJEb4wtoNY56E2P9iilUDv35xKq6yfIomOHd3zys7NasRWW2tKUZT9+qyBhBTqZtl0u PqEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ciOSmF9Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fx25si1413419ejb.58.2021.02.03.07.00.42; Wed, 03 Feb 2021 07:01:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ciOSmF9Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233374AbhBCO5K (ORCPT + 99 others); Wed, 3 Feb 2021 09:57:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233319AbhBCO5G (ORCPT ); Wed, 3 Feb 2021 09:57:06 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CFACC061573; Wed, 3 Feb 2021 06:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jHqPAIZKxcFxf2pPTznII237kT1yeHQ+2XeU1SzqGnM=; b=ciOSmF9ZZGGhdHmfMPhVKouve8 lzqP+86x3R6u/INbMdIRkDp2xg1YTnJGUoVefwmZSY4qc4ri6fxz2QvNBNfSzrrRPAuSIJ/k+sXvE WxkwDJ+kaKMslgS3Xq08s0i6t6nR59ZG/8EQRMNWHkJkStlWQmPCP+tZH/9dAvFI5hMKnh6Yp2TRI A8fhym3ddh5QDu75cC4GvPuvccm2Bpt455YOo+v6N2Qf19VA3YAjEsvWccrklOLT5HsoSDG/NBjYy /j57yT6qAH7FiAa4HMBMjN6UmKnzVsgjD70hp+9dLVLnrndyOD4+NMHuf6Yx4wllfXRlGqvs+c1Bw 5HmJQR1g==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l7JZs-00H3eo-Bf; Wed, 03 Feb 2021 14:56:21 +0000 Date: Wed, 3 Feb 2021 14:56:20 +0000 From: Matthew Wilcox To: Miklos Szeredi Cc: Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Andreas Dilger , Andreas Gruenbacher , Christoph Hellwig , "Darrick J . Wong" , Dave Kleikamp , David Sterba , Jaegeuk Kim , Jan Kara , Joel Becker , Matthew Garrett , Mike Marshall , Richard Weinberger , Ryusuke Konishi , Theodore Ts'o , Tyler Hicks Subject: Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR Message-ID: <20210203145620.GB308988@casper.infradead.org> References: <20210203124112.1182614-1-mszeredi@redhat.com> <20210203130501.GY308988@casper.infradead.org> <20210203135827.GZ308988@casper.infradead.org> <20210203142802.GA308988@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 03:38:54PM +0100, Miklos Szeredi wrote: > On Wed, Feb 3, 2021 at 3:28 PM Matthew Wilcox wrote: > > > > On Wed, Feb 03, 2021 at 03:13:29PM +0100, Miklos Szeredi wrote: > > > On Wed, Feb 3, 2021 at 2:58 PM Matthew Wilcox wrote: > > > > > > > Network filesystems frequently need to use the credentials attached to > > > > a struct file in order to communicate with the server. There's no point > > > > fighting this reality. > > > > > > IDGI. Credentials can be taken from the file and from the task. In > > > this case every filesystem except cifs looks at task creds. Why are > > > network filesystem special in this respect? > > > > I don't necessarily mean 'struct cred'. I mean "the authentication > > that the client has performed to the server". Which is not a per-task > > thing, it's stored in the struct file, which is why we have things like > > > > int (*write_begin)(struct file *, struct address_space *mapping, > > loff_t pos, unsigned len, unsigned flags, > > struct page **pagep, void **fsdata); > > > > disk filesystems ignore the struct file argument, but network filesystems > > very much use it. > > Fine for file I/O. That's authorized at open time for all > filesystems, not just network ones. > > Not fine for metadata operations (IMO). I.e. ->[gs]etattr() don't > take a file argument either, even though on the uAPI there are plenty > of open file based variants. That's a fine statement of principle, but if the filesystem needs to contact the server, then your principle must accede to reality. But let's talk specifics. What does CIFS need to contact the server for? Could it be cached earlier?