From patchwork Wed Aug 2 20:51:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9877741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2938D602BC for ; Wed, 2 Aug 2017 20:51:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B70828825 for ; Wed, 2 Aug 2017 20:51:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F6E928830; Wed, 2 Aug 2017 20:51:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E3D728827 for ; Wed, 2 Aug 2017 20:51:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbdHBUvx (ORCPT ); Wed, 2 Aug 2017 16:51:53 -0400 Received: from mx144.netapp.com ([216.240.21.25]:9888 "EHLO mx144.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752477AbdHBUvu (ORCPT ); Wed, 2 Aug 2017 16:51:50 -0400 X-IronPort-AV: E=Sophos;i="5.41,313,1498546800"; d="scan'208";a="208719724" Received: from vmwexchts03-prd.hq.netapp.com ([10.122.105.31]) by mx144-out.netapp.com with ESMTP; 02 Aug 2017 13:27:41 -0700 Received: from VMWEXCCAS07-PRD.hq.netapp.com (10.122.105.25) by VMWEXCHTS03-PRD.hq.netapp.com (10.122.105.31) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 2 Aug 2017 13:51:47 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS07-PRD.hq.netapp.com (10.122.105.25) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 2 Aug 2017 13:51:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=464OpO1SL8eWlfbfZcOwhy00k+7gQxNArCRpcC3FXHk=; b=cZ+nNGk66Rf/Q4GrMQItPRH6ETfmPIVANayWiZICu0Q5J1slxrHpMZxduvto3u3pq8/GIi2ZWE97txjix9lS8vX96TompsvmU77hNibrrlF7+9fqJ/2P0i8yjWVVFvluRBzWK+T7/wadpTyGbbaypuu4yBpN6OEWQZ9aaDNJnIY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (68.40.188.1) by CY4PR06MB2472.namprd06.prod.outlook.com (10.169.186.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Wed, 2 Aug 2017 20:51:47 +0000 From: Anna.Schumaker@Netapp.com To: , Subject: [PATCH 2/2] NFS: Don't compare apples to elephants to determine access bits Date: Wed, 2 Aug 2017 16:51:26 -0400 Message-ID: <20170802205126.23239-2-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170802205126.23239-1-Anna.Schumaker@Netapp.com> References: <20170802205126.23239-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 X-Originating-IP: [68.40.188.1] X-ClientProxiedBy: MWHPR08CA0060.namprd08.prod.outlook.com (10.173.236.34) To CY4PR06MB2472.namprd06.prod.outlook.com (10.169.186.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54fbb883-5a5c-485e-4fa3-08d4d9e84ad8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:Kle0oBENzwJxJVOTTo8/1VMRFb5GoJPPerVxrjM+gmdnMPM6zrkY+SRqocRL+AWrNrKi1gWCh1S06+V2Wsm8R7V+wbhUpbuDI6moeTSYIqMmafNvVPeB4W6h8Xd54OsVOSqR/CoiwOsW8Zalf4V7n6SSpoCZtybYWSVOoEIEUTt7k9fkffP5SEWhpE5546zHb91LyMU+c1L+JW5d8QK55gE95AeTtoco/ZlqTWBNcndWqk8ZDs21P9hHZCjIhWisRO3B4+8sBin2fJbA6WaQqWK5VfL+eAR4o9UtIXR+VyTsFCW6kEP/7N3J3TehAv+yQr+kjFddxlgccKzH10iykbso0eVLz/uFrxB5ELEZDUdSPNiayHAMnL5m5YaaHE+ux7kI2AXt72jFwe/n/zWnko8f0KEi6RC9bKL1Zs8NbCGeLTFrU42cAueRSGp7KJ61a7zn5l9p8y59BpiU85wrhM8NvR7AG+nt6OUfAcGMT4vDCjO6ajB1iPy7I+fCWunErCkzbnyojc9L2JoBxxCqDxFhngfrp2NUAwMVDpJSlYeaFytRPsdnBDZQqzfq1Wx8XVpekJTO+TlPdPJ2/2Daz0LgadmvnNC3zmLr0SWIQukPXQz/JUT97cBGBUGkucmTswZor9c6m8nut3AnMh1i5FZMZykxnjw9ESwQD7g6/1hrNnVQvhbOfpG0wuE6DicNtCBqfLxpPXSjJcLRUo4+H52XIP6MOspBfJG36wqcs4blL7/w825anbpBBX7OSfIncWNQBIIsYhY1quPMWCqXmqn/M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GuzJzB0ON96OJ9IMxnJDMoFrpQPOzzO/TQTQ1QwGbS2HqEE+Q2htLOeDIKU8H6O0Jm2z9JJaYoENUhlrtlcockKonooq0BxYp/0vP71oxO0Tb8pmQd3/JDTZD831SvA+qP9yEL0w/XzCvE1efZRfkSjQE1C4uVXhrm7rX7OPEa6lgufaueCio8zZz3XyyTy4NhWf6qp/XogAiEX7pSMiaUWtdMjMQ1cSiEJ X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR06MB2472; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR06MB2472; 4:Nt2FU+stAip/udi5BpTWA8HWIAaMJoWljTnPlBgcc3?= =?us-ascii?Q?H0SZZi7Ia8UCaPqORCDqOYmwQVf+BH3b/fGyPgxN/Y6wD6xsdcNjOPCqbk2q?= =?us-ascii?Q?g9HBEzO34n8wEn7x2HkESFpP0ZfcxcHnQg5qN9l15y1Yi1iwzBsNG5cwQq66?= =?us-ascii?Q?jm4Amv0iuEmkvGxWyqTZ4Il45E4aEgaSm893PyayEqmHA+VGQJ0jx9dRjT2z?= =?us-ascii?Q?8mUVA070hv/UDTP9HeCIV+HjOynXyLMa4lQuABLeqTE1VLNVVfAkdEv7Rn9I?= =?us-ascii?Q?NMbQ84zXRp1X15Z4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?us-ascii?Q?Zg2CQ6SzAvFMOrB2pepopxIUokElSSRlc3?= X-Forefront-PRVS: 0387D64A71 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39840400002)(39410400002)(39450400003)(39850400002)(39400400002)(189002)(199003)(48376002)(478600001)(50466002)(8676002)(2906002)(5660300001)(68736007)(47776003)(25786009)(66066001)(50986999)(6486002)(81156014)(81166006)(1076002)(101416001)(5003940100001)(50226002)(3846002)(76176999)(72206003)(42186005)(6512007)(9686003)(6116002)(110136004)(38730400002)(105586002)(106356001)(7736002)(7350300001)(97736004)(2950100002)(86362001)(575784001)(6666003)(305945005)(85782001)(189998001)(53936002)(36756003)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR06MB2472; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR06MB2472; 23:1W/Msfm+dz+MHrr616/JcdhcKw42A0zuJkemDBwFR?= =?us-ascii?Q?+jcPlxRVnyriTC2nTr9LUEyuzvH2LqKWLpYHPxpSyB2orkTCRkiRsuEnCmWU?= =?us-ascii?Q?fIwAK6TiR7WyYIrx74TvxYZ02nZf2jfWwo0us+vJaaOgmcrsqoaMhnUiIh22?= =?us-ascii?Q?prS08AFY18zC21YpuWvCAj8vivST0fC2zfmJwN/Lds2zC4VdYKIOFycc+GMc?= =?us-ascii?Q?wVG+JB1Op9M87WB2eoz9VRpaoN21ATekeahPE/cH8ccgwK3TjiRWZwO5gIyH?= =?us-ascii?Q?rK6KpgfKptNS13f6ZuGgp6h+2Nq6R0DZkcWmvVOlTn7WX+Tn6FzBZsfHfiyW?= =?us-ascii?Q?kdFAXLNdQYRDSmWke9CeqadXiFzqIcneQYHwxIrYqCp/NRYpXZIiug4jMpyP?= =?us-ascii?Q?yej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V6B7KoDG?= =?us-ascii?B?QT09?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR06MB2472; 6:xMUZZ5pg3QwfoxSKfuic12ynrfDSkvInoSEtmjTN/v?= =?us-ascii?Q?cqry5e7CsV//lUanPRVLurtzv+uZmWwMdAWTtrTzW98ppfWjXYy1WRO9xoKJ?= =?us-ascii?Q?jE2xksWaW2lK5A6pjN1Yq8wnGpFJboVF+p5/aiYleNEAL1h1YHSKVPACpUY2?= =?us-ascii?Q?gebXaA9w3Yilq9FQdPVm7NtSX7OVYmtkJuXVv3ix6XvwnHJGIx5zIHcKQrRH?= =?us-ascii?Q?hJ5Hj4ktCnBlCSlX5WvQdfpzqge2jH6JUpw/eu1pqHcule6r5Z2JVdISvi9u?= =?us-ascii?Q?5BbnhWzkN0vxxae93mWC1ukyKzfn4bVuZyZJpf966LXEyOM/blMQmYcF1jAT?= =?us-ascii?Q?qny/MXKp7ZId/mKbjLMxx9D1h3j77xKpjazZtiOPA4CS2yH95jWi3j4GLLqp?= =?us-ascii?Q?r528RZbHF+zVdSXAo/GGGvgc2AgSZHyWwlo/5sspC+MyW6awjbWFhKS8iVRt?= =?us-ascii?Q?EmzKvVf83XN0x0Rw7NX06TI/N6xAYpUPw2RmumQz50Dru4d4Wyxxs4Hgy4YK?= =?us-ascii?Q?W0NOQdfaMTLwt97FE6xlRzFpp2qezOmHEGXdWh73Q0y3OxLi/xR+reql1q+d?= =?us-ascii?Q?YmNTcpMpIswoSEm+WNTD5/GDnHYZUN3PZIqmihYe2OR4BcnF8F1ileRcgPsx?= =?us-ascii?Q?hBbYo9Jzhp1F6wMqns2IYELNP74x3SsHC/8fGArJuGYGQYSv7ZVsFj6VeD6r?= =?us-ascii?Q?iQ+8fWPPQGYKWXu2Xm7lmHMNskEaT73v6G8aWCQvF3fg+ELQfdIvht+th6ik?= =?us-ascii?Q?wAv6LeGgihp1X2fgCJdM80RfQUrV/UD5+ToZ1dqBTXGnWPnPd4FRX/gdS48v?= =?us-ascii?Q?iG8ur2A/Cz1HlDqgE6IZR4cDZZSmd0KNOOD02lvMQavJhV7kerrmO5atW9Ea?= =?us-ascii?Q?wzn4hciN56xk/s8csSQc40IaPV7VegqudWmDJgIxS8Si+zWyPhU7y/CGWmq/?= =?us-ascii?Q?AAr6yzsf64qNwYF0HpcXe/AzjDmUIeETYxFI+O9IHp37pFY39ju2vcBr7znE?= =?us-ascii?Q?4=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 5:Rw1Ze2DJ5SFYrbeNA2ilupIXBcVKXhlEdjINUij3mPpwQemUlslRwWPf8hVRWAABeVZQf3s9lZc0OCHjCmXKFGOps9xX7wz2TzyBZ5dEzdwrybqYPJ4UZ5U7AkUDFAMkRVV0Ii257U4WFCB+A5pjZwVki/J/AM7lNyWntzym4ye0Jf9+ub9SvQXJClPMtjy+/Z38R9ecO47BXBRCEL39uQorSBDliD1BH6ioGN90x8Mwb0NOFR4AOXLd4+rCGQuzhy4epCZdWn9aPQlcVIV+PjyJbOCzUJOh5WH5GxGzYfCrxRM43FF8HrzJoELWf1yMSV9/3NksuzQ77isBOuBrXNP1iqNfHFl3BOJ4P5lSICyWkVJxRDgEmb1U1wimQo4AYZ4d7HXRMKB1uieJGfdomxeWfP0Lsu/CgqR+hU1/g5R1hQ8LBwDfXrWVSctW3sMYUwl14IEacofsWcd5aPMrcitypj7Yc4lNYahYdZKj7GveeFWAOcn/HYzPdzCE8Oz6; 24:rU38T022kAoSZ0JSfQIcU/uH3FtrvXzraYMdlSIVoOq4uaH/jHqKro119iGmmH3L09dL0fr1XnoVSMKhnaPoXEu9659uPc0xZfjfF5i7yko= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:gbEpAalj0u/BiyGDjm5meVgk6sJTvi9VLEFXmlL6Ciy2MNQPuzHmlB89Se0MrnjkBS1gCYsSOYxGYwH3MNsFET573hG415rITj3HnlmzT5HKQRzJcmziJrJ6pjiJO9oCSdbYoO7ejpGBLr2V1i1Dcl4v1ZI3z6Q8CFKum0a00wy+DVCbW2fSZ9q4yp/ddnCI1wUkul2f6EvL2rL7yPUpE3jT/pyA3AIsr39ICQM4Wkfwhc42HQp81WNzUct+8oQ11UQEL0Kd699s8RoDImIcs/5e7jqbvJiqg+M0MiLOMhwzKgtEKUz/MQId4y12W1XZgvNJm3MMZJLydGvWXPefrOoeKO82agplrAeR14KhYvDmCDFX6ZFv7mGpeq2rh/FX2ZJ/cets8NTjn1WMTqdDWlHey6c53jTmFN0ZVU3PJqDseM+jO9d85mpCPXhmulAIuNwXrWP2uTDAnmmoCei6NUETmb7TLEOOdqpmdqsXjdZoaL3M1qsyGzdyiO3CQvG3HHi/J/vyGidIXyF/VM8alrMXZD4vEBW7eQZ37JaPpOfxeY9QCOxnnNBTYc3cgZypaCk6GEjAahVBOgpNf4En2ZLzKej7pU+RWI3aXIGNrEzWE6mwTnzP+eJND99gb9wGpB9loWdUl2EdcKDulqy3jEhXZQbkz/LmBrER4CoHi+ocMkzr7PLyrtBI+YX3/H8T9VFHRUaJvjqwFPJRxbf7M15juNGx9P9JA/T8NvG7e27lRt3KEbs2Z6ROYqLarMpdTc+n0WCVgWcHLVtQh1BWuN4f5Aga/CmVBnx6MxVB0Gw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2017 20:51:47.1475 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR06MB2472 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anna Schumaker The NFS_ACCESS_* flags aren't a 1:1 mapping to the MAY_* flags, so checking for MAY_WHATEVER might have surprising results in nfs*_proc_access(). Let's simplify this check when determining which bits to ask for, and do it in a generic place instead of copying code for each NFS version. Signed-off-by: Anna Schumaker --- fs/nfs/dir.c | 11 ++++++++--- fs/nfs/nfs3proc.c | 17 +---------------- fs/nfs/nfs4proc.c | 19 +------------------ 3 files changed, 10 insertions(+), 37 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 84de36be286d..1a62fde077fe 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2428,9 +2428,14 @@ static int nfs_do_access(struct inode *inode, struct rpc_cred *cred, int mask) if (!may_block) goto out; - /* Be clever: ask server to check for all possible rights */ - cache.mask = NFS_MAY_LOOKUP | NFS_MAY_EXECUTE - | NFS_MAY_WRITE | NFS_MAY_READ; + /* + * Determine which access bits we want to ask for... + */ + cache.mask = NFS_ACCESS_READ | NFS_ACCESS_MODIFY | NFS_ACCESS_EXTEND; + if (S_ISDIR(inode->i_mode)) + cache.mask |= NFS_ACCESS_DELETE | NFS_ACCESS_LOOKUP; + else + cache.mask |= NFS_ACCESS_EXECUTE; cache.cred = cred; cache.jiffies = jiffies; status = NFS_PROTO(inode)->access(inode, &cache); diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index d1e87ec0df84..44bf961d5812 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -187,6 +187,7 @@ static int nfs3_proc_access(struct inode *inode, struct nfs_access_entry *entry) { struct nfs3_accessargs arg = { .fh = NFS_FH(inode), + .access = entry->mask, }; struct nfs3_accessres res; struct rpc_message msg = { @@ -195,25 +196,9 @@ static int nfs3_proc_access(struct inode *inode, struct nfs_access_entry *entry) .rpc_resp = &res, .rpc_cred = entry->cred, }; - int mode = entry->mask; int status = -ENOMEM; dprintk("NFS call access\n"); - - if (mode & MAY_READ) - arg.access |= NFS3_ACCESS_READ; - if (S_ISDIR(inode->i_mode)) { - if (mode & MAY_WRITE) - arg.access |= NFS3_ACCESS_MODIFY | NFS3_ACCESS_EXTEND | NFS3_ACCESS_DELETE; - if (mode & MAY_EXEC) - arg.access |= NFS3_ACCESS_LOOKUP; - } else { - if (mode & MAY_WRITE) - arg.access |= NFS3_ACCESS_MODIFY | NFS3_ACCESS_EXTEND; - if (mode & MAY_EXEC) - arg.access |= NFS3_ACCESS_EXECUTE; - } - res.fattr = nfs_alloc_fattr(); if (res.fattr == NULL) goto out; diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 18ca6879d8de..c7544a9cbcbb 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3864,6 +3864,7 @@ static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry struct nfs4_accessargs args = { .fh = NFS_FH(inode), .bitmask = server->cache_consistency_bitmask, + .access = entry->mask, }; struct nfs4_accessres res = { .server = server, @@ -3874,26 +3875,8 @@ static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry .rpc_resp = &res, .rpc_cred = entry->cred, }; - int mode = entry->mask; int status = 0; - /* - * Determine which access bits we want to ask for... - */ - if (mode & MAY_READ) - args.access |= NFS4_ACCESS_READ; - if (S_ISDIR(inode->i_mode)) { - if (mode & MAY_WRITE) - args.access |= NFS4_ACCESS_MODIFY | NFS4_ACCESS_EXTEND | NFS4_ACCESS_DELETE; - if (mode & MAY_EXEC) - args.access |= NFS4_ACCESS_LOOKUP; - } else { - if (mode & MAY_WRITE) - args.access |= NFS4_ACCESS_MODIFY | NFS4_ACCESS_EXTEND; - if (mode & MAY_EXEC) - args.access |= NFS4_ACCESS_EXECUTE; - } - res.fattr = nfs_alloc_fattr(); if (res.fattr == NULL) return -ENOMEM;