Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp29590imm; Thu, 4 Oct 2018 15:51:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV63DSE/bZ7p8kK7mc0MS+2HatqRttlWrTINi4QX8S4xlncGk8pex0jVSv1O5HLf/V84u02rn X-Received: by 2002:a17:902:124:: with SMTP id 33-v6mr8684326plb.205.1538693470531; Thu, 04 Oct 2018 15:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538693470; cv=none; d=google.com; s=arc-20160816; b=q4Nd7zDfpja/DghmnSAVjtze2TWNvHwaBqec2VjZZQH8N9H3LBuMQtRY5ImkPQe1PZ Wk/UH9vxdvPfg8zMq7EaiEJs65aLG8vzVmRCe8ihHJCLXn0P4hwalowhgyXqpvg84Wmf iixw3y6OHdA0ICml0CqLO1mV5m8lcTZFqiKTvHAPKO4bk5kFUONMgYecfzg51Yj9mNp/ JD3u42NMjQJ17kS1MR/znLlvgxEuRn/DxqWtCLIepS9NNd3Xd5JPTZRMw2sXjise7xAa 6tHZ7HKHZUu/ihIOIlVB8cfR6R+eAQXkAXZ1B29QUEfJAVOB61tJs8t+Pz0M3nGtOizk y/ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=70ZZmLd6L9TUqPBOePwf/nBuRJimNomZ3X5e/DNJCzg=; b=Y21T+aQqleJpbMlPbf4t2zgTPNrYuxhylnI5KJz1ZGGVBorZP/t2BDpzhBt1pg4nww bwD3PXxWaNBN99DKyoB6RqR+3I292ZjRJxO8LzbC4NoauYqopPSJoYIP+NNTbEhzreaE iUxTPF+aL/8eTJGp90gT1u+qgrhd0nI5nbUXavSkIsKFjA7R0PjMafyydS5zeg+BdXWW k9o978DDAM211x+upbTx3we8U1JmTPUKpxZBF84RVrQVrTpVmrQaeh0qr1IP7fOoOJ8S A5sOMO+NZ7mqHxumSOf5tsolcCLG8ZTpgMfZQG7XyGSLl4ujiWxh79xLZAiINWKlFVG5 8p+Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69-v6si6061241pgd.353.2018.10.04.15.50.55; Thu, 04 Oct 2018 15:51:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727989AbeJEFqQ (ORCPT + 99 others); Fri, 5 Oct 2018 01:46:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeJEFqQ (ORCPT ); Fri, 5 Oct 2018 01:46:16 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 95CF8C059B78; Thu, 4 Oct 2018 22:50:39 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-149.rdu2.redhat.com [10.10.120.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9ACE1700B; Thu, 4 Oct 2018 22:50:35 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <87a7nttm5o.fsf@notabene.neil.brown.name> References: <87a7nttm5o.fsf@notabene.neil.brown.name> <153861496327.30373.10501882399296347125.stgit@noble> <153861471803.30373.6184444014227748848.stgit@noble> <28763.1538662213@warthog.procyon.org.uk> To: NeilBrown Cc: dhowells@redhat.com, "J. Bruce Fields" , Anna Schumaker , Alexander Viro , Trond Myklebust , Jan Harkes , linux-nfs@vger.kernel.org, Miklos Szeredi , Jeff Layton , linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org, coda@cs.cmu.edu, linux-fsdevel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH 1/3] VFS: introduce MAY_ACT_AS_OWNER MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2792.1538693434.1@warthog.procyon.org.uk> Date: Thu, 04 Oct 2018 23:50:34 +0100 Message-ID: <2793.1538693434@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 Oct 2018 22:50:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NeilBrown wrote: > Thanks for the review. > As afs doesn't use the generic xattr code and doesn't call > setattr_prepare(), this is all largely irrelevant for afs. Yeah - there's no xattr support yet. > afs_permission() will probably only get MAY_ACT_AS_OWNER passed when > someone uses fcntl(F_SETFL) to set the O_NOATIME flag. There's no atime in AFS. > Currently a permission test based on UID is performed which, as you say, > is wrong. My patch simply preserved this current (wrong) behaviour. > Shall I change it to always allow access, like with NFS? You have to have an appropriate key to be able to do anything not granted to anonymous with the server. If the server says your key (or lack thereof) is allowed to do something, you can do it; if it does not, you can't. > Probably O_NOATIME is ignored, in which case f_op->check_flags should > probably report -EINVAL (???) ... or might that cause a regression? No atime. I just ignore things like O_NOATIME. You will be able to query the filesystem with fsinfo() hopefully soon to find out if there is an atime and if you can disable it. Davod