Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp322962pxb; Wed, 3 Feb 2021 06:31:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwP+Kdlsqbm02Sahq2QC8mea1b/GRyIi2Ob7W9cnP1Qv8IhtCjA0seD7k77I/qPJW43edZ7 X-Received: by 2002:a17:906:7c43:: with SMTP id g3mr3444425ejp.210.1612362719189; Wed, 03 Feb 2021 06:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612362719; cv=none; d=google.com; s=arc-20160816; b=KJuzMfuvjCcoux8QDh+tGEC1Tt3y1mqeKw8pzylp+6uCMKCxDm6wHIkLb9uJF6g59r SZzbmC1vDlhZmLH5hZyuBo98DuE8SV65E6DPaUo4s2B9hmj5qazcefviiX+JwKrutkub mtf7Ckx7+SsRYxs7mdiLKtgosoWp6/4TFx1rvUKg1x1AJO7TCd+biakhxx0t3vmG0yTG 9NwJ+zfo9rDhgDq/VZvzk/UsF2jxZNLLeGTL5PqVBneoI9Cnk8mYHtvxnjvkI/GJ3JXC u0mc+7S51SlONp2iii61OVWbrKDYbQb7SkymHk5KyYu/RhOxD80fgrQ2sdE5NH7mjgIV fCtg== 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=2Ge18xC9FLXty9oYdiqbqe+rDGvC8RbA/BrkeMW4ybk=; b=a0hSM7j4zhYLdtTlSlT9dDSdZ9zvwha94ICzMWHl8h7X09DaxcFzyYkC+oZxGvGUqB 7/8YGuS22gNNAVTIGE//UXcpwSi8fZKfVQKDhWavxwcTbI/zWanZ2Ns2iikAmLJVVZDo WQp39sWG7gzBUoWHCLdMus8EGaEdSsHktGykH4vp9jS8jY7itPdM0jDLG5XgWeBAkf+d /VL87U0Y5SnrK87mKpJTnEqYQHETkTL8cxLQxadtPBAeE/bNi4KzwdExnelTdYbNCSvG kjrdUIs/CVcS8+fPLdo6T3mSxPXYh4Wx8jJjtmOX6wekyzmSuOw6OJ5/Sew8v/iAUqkC w48g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WeekyKty; 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 i23si1300067ejj.317.2021.02.03.06.31.22; Wed, 03 Feb 2021 06:31:59 -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=WeekyKty; 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 S232942AbhBCO2y (ORCPT + 99 others); Wed, 3 Feb 2021 09:28:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232931AbhBCO2t (ORCPT ); Wed, 3 Feb 2021 09:28:49 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 316C3C061573; Wed, 3 Feb 2021 06:28:09 -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=2Ge18xC9FLXty9oYdiqbqe+rDGvC8RbA/BrkeMW4ybk=; b=WeekyKtyxO/B1D02xzTYO8MP4G t+Ii2u3OoQ5Ke0xDP+/mVbosBl/fg0nDLi/1jhnocaGsO+7OpjplSu2W8Z/Qb8nqf8HERZ+08h9IH gHFpEfAcXm3ecPMBRSVEBVlEhjrbflhRjxZiVPF2Om2Tsy2Fy/yo8rU5CPuRdkIUi1qvGSXnOYZse PNqYT2s0bCgeA4i7ffSxhUsoK7zzryYoGUY8k53pLZ6dud3563tfuu9AL+db8Bb3ozo3SOL9Rfeiy 09qX5U/OC5Zmmg6BYo4pnQGVOqzwPrzWINQ6o51ldBgGwb4wPm5CfVQhrnPgZTFWFyhXCkWmOqTkd bPRjCuoQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l7J8U-00H1Wg-F5; Wed, 03 Feb 2021 14:28:03 +0000 Date: Wed, 3 Feb 2021 14:28:02 +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: <20210203142802.GA308988@casper.infradead.org> References: <20210203124112.1182614-1-mszeredi@redhat.com> <20210203130501.GY308988@casper.infradead.org> <20210203135827.GZ308988@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: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.