Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241AbdGaNCi (ORCPT ); Mon, 31 Jul 2017 09:02:38 -0400 Received: from mx141.netapp.com ([216.240.21.12]:10538 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbdGaNCe (ORCPT ); Mon, 31 Jul 2017 09:02:34 -0400 X-IronPort-AV: E=Sophos;i="5.40,442,1496127600"; d="scan'208";a="218976387" Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Subject: Re: [RFC PATCH] NFS: Fix the access mask checks in NFSv4 To: Catalin Marinas , CC: , Trond Myklebust References: <20170728175452.49057-1-catalin.marinas@arm.com> <20170731111928.g6rlpmwnn57hcexb@armageddon.cambridge.arm.com> From: Anna Schumaker Message-ID: Date: Mon, 31 Jul 2017 09:02:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170731111928.g6rlpmwnn57hcexb@armageddon.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [99.9.112.69] X-ClientProxiedBy: CY4PR18CA0034.namprd18.prod.outlook.com (10.173.177.20) To CY4PR06MB2469.namprd06.prod.outlook.com (10.169.186.137) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ec722b2-471d-46fb-05ef-08d4d8146823 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:CY4PR06MB2469; X-Microsoft-Exchange-Diagnostics: 1;CY4PR06MB2469;3:dM4WhgcMvK6tzomHJXr/iL/9as+5yGPRhuMOrCGyo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3b7KV8yl/VG1S26XIp1CUHXNJCUSuiwOQBtHCgVEPQ6hxoCTDN3Tve1TpTuyoJxbsoEctvKnUzVBFcB4qi/NwFKlivDcGeDVSySn2gQ1i3DHzwVh1AMivMRCj0uMmVfVrPwAcDeoGYQfJTXohEemLm+ZGMeomxE9n7BCHIsFu3lT4GzJpQ6mNaZ+85lHELvLaMNy2OS5NEW9CDcLcQwS1EWnPT/jRL0EsB86eKV5lxfMAHBplX/nk1pC8KKjNRCc+8vm4BRRnawV4ATaRS89IzppFJG6vCyimn7c+4vLPmQQkCTOkBFfjl4YfutkZHykOTJOVBO9vu8VIZOK1iqwqAanrC/md2xilIuF93KVjRmgXq82GmFT28G1gdOCFXULcknsg== X-Microsoft-Exchange-Diagnostics: 1;CY4PR06MB2469;20:lcFNkUMTVPyN4ZlvPjHGFsNbxltzCWp3rACmjkEnn9dGGx+pWjKQahuJ8gEwPkO4G5pH8ekoXSQQ04aLJV9n9Ob2jco2u9qTwu/q8/KBgseGoQjSo2nwTG2bDlW6kg8HKZGAp+ehKQv3qZ5PUC1ZA1X5Bm1pI9vD2yR6Cd8q+5wEth7GccnnOSUCGWDm4xSrpqLaWZqkMkJDvOkLvuSY5G5TsfyB+kiqIBwwyqIF9IcCBKj4WiObabuTRerhEDlss1LPIkusTUAqRVmM/E7L6NwhDrG7fgZizy9fkvb5aBeFqrNISZ5KDqPGUXCNp28xxCtK6hAYcv9HxRTdIfzj/cZATxRD/J/5rCiNHGYdP4w99hGiP8QZ1CrXtMllafhnMf5PvmnJ0DCWiAxfbInJcho0frczkwwh/6uKiCafYAMrIgKmJqx7B1vrk4q6X7WtgIMs7rUsIlzDNNQ7EhB2BHTkcPHph/0XxrB3H0eptpubQlcBjqOE8PQc7QLr6fu7 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)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR06MB2469;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR06MB2469; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjA2TUIyNDY5OzQ6SUZ2YjVvOFczNW8xOFBRV21LckR6Szhla2lF?= =?utf-8?B?U3kxMEhjWFBJaDVyRzZ3T0JIRmFQaGpqQ3pUT2prOWJFMW9GVVB0WlJEMVpy?= =?utf-8?B?Y3NUanJreTd6WW9hUUlKcmQyVmFVQzNUM1pPdi9HbzZJdGlyOFcweGtBWlg0?= =?utf-8?B?ZVdjZTBZRXpoc1ozc1lPVVFSM25HZm1FWHp6MU9OZ2E5bnpLdkovd3JwMVM4?= =?utf-8?B?UTM0U2dPOEVwanNSUGxlK25zc25xenJMTEU5Uno2U3dRSXpIbnp5aHNKR1Bt?= =?utf-8?B?a0hoV2JMaFZRbmM4ZUVCUkhSVk5SQlEyOEZsaVRwbjUrRTBNU0JaOW55QnFT?= =?utf-8?B?Tm94djlnY1J0KzM0ZGVjd2VLMmZVSUZhY1NmVG5uZ0dKL0MyYmVCczF0a1Yx?= =?utf-8?B?TCtlTVdjWml2ZXNsQjdwUVBoMWF3N0toaEx4Tm1BUnUrKzU1RnVlYTJEVW9m?= =?utf-8?B?dzlLQlhpdjhodUJ6ZFA3YytsVjYzK0hHMlZ5V2NscThodmdqREZFR1IxZUZz?= =?utf-8?B?V1lHb1JmRURKUjIzU0hFTDFIUlBsN21NNnVTSzNrc25FbnBPVVA3dG16MnB1?= =?utf-8?B?ZSs1czM0Y1IyazQ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YXcrS1BhMGdCM2o3V1V6VW40TUVWakFZbER1RldMRGR5VTdTVDMwTXBq?= =?utf-8?B?a3N2cG5DaGVYdUx6WE9HT2dhUy92LzhNYUl5VXRZMkxHZWM5aS9PQmNvT25K?= =?utf-8?Q?74rVRVtEUUmtpUUbLb2?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39400400002)(39850400002)(39410400002)(39450400003)(199003)(377454003)(189002)(24454002)(97736004)(50466002)(23676002)(6116002)(7736002)(3846002)(7350300001)(305945005)(110136004)(38730400002)(6246003)(4001350100001)(81166006)(81156014)(8676002)(189998001)(69596002)(4326008)(86362001)(31696002)(478600001)(101416001)(64126003)(53546010)(72206003)(230700001)(5660300001)(53936002)(6512007)(66066001)(65956001)(31686004)(65806001)(47776003)(76176999)(65826007)(54356999)(50986999)(6486002)(229853002)(6506006)(106356001)(105586002)(25786009)(68736007)(83506001)(6666003)(2950100002)(53416004)(33646002)(36756003)(42186005)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR06MB2469;H:gouda.nowheycreamery.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjA2TUIyNDY5OzIzOkpRZVpDZ25GRzZ4dW1ZNWZoaHZZeUhjNmNV?= =?utf-8?B?NDBMWm1HRzduR3R6bE45ZkRKYjNjTytaNWdobnZiVEpaMWpLRWxSd3lCUk1W?= =?utf-8?B?YWoreTFiZzBTNUFCeDV1TVhSNmRsTFdYRSs2aGNockpBWVlsQy9HcXU1aTU1?= =?utf-8?B?ZjNQWkY0b3lhMUkzUGxrZnhnb0tSRC8rNlBrVVgzbWEzMlZmQ01Nc2RkNlJw?= =?utf-8?B?b1FDMUxGSk5tQzlvNmdWN0p3TWtGUjltSmNSb2U1cjJYT3BqbkplMGx3T0pU?= =?utf-8?B?OFFCbnRJSzlp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X9nRcAFTghc2BeSnst/31td3XY6T6h13o= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 13:02:31.8997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR06MB2469 X-OriginatorOrg: netapp.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2426 Lines: 66 Hi Catalin, On 07/31/2017 07:19 AM, Catalin Marinas wrote: > Anna, Trond, > > On Fri, Jul 28, 2017 at 06:54:52PM +0100, Catalin Marinas wrote: >> --- a/fs/nfs/nfs4proc.c >> +++ b/fs/nfs/nfs4proc.c >> @@ -2236,7 +2236,7 @@ static int nfs4_opendata_access(struct rpc_cred *cred, >> int openflags) >> { >> struct nfs_access_entry cache; >> - u32 mask; >> + int mask, cache_mask; >> >> /* access call failed or for some reason the server doesn't >> * support any access modes -- defer access call until later */ >> @@ -2259,7 +2259,8 @@ static int nfs4_opendata_access(struct rpc_cred *cred, >> nfs_access_set_mask(&cache, opendata->o_res.access_result); >> nfs_access_add_cache(state->inode, &cache); >> >> - if ((mask & ~cache.mask & (MAY_READ | MAY_EXEC)) == 0) >> + cache_mask = nfs_access_calc_mask(cache.mask, state->inode->i_mode); >> + if ((mask & ~cache_mask & (MAY_READ | MAY_EXEC)) == 0) >> return 0; >> >> return -EACCES; > > I noticed -rc3 already has a fix here, commit 1e6f209515a0 ("NFS: Use > raw NFS access mask in nfs4_opendata_access()"), without having to > export nfs_access_calc_mask(). > >> @@ -3870,25 +3871,9 @@ 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; >> - } >> + args.access = entry->mask; > > However, AFAICT, 'entry->mask' already uses the NFS4_* bits, so checking > 'mode' against MAY_READ etc. to build up args.access is incorrect. Is > this hunk still needed? > I think the code is okay short term, because all the bits it's checking against are set in entry->mask whenever we enter this function. Long term, yes it should be updated. I have patches to do this in a generic way that can be used for both NFS v3 and NFS v4, but they'll probably go into 4.14 Thanks, Anna