Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbdINJYu (ORCPT ); Thu, 14 Sep 2017 05:24:50 -0400 Received: from mail-db5eur01on0093.outbound.protection.outlook.com ([104.47.2.93]:45236 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751193AbdINJYr (ORCPT ); Thu, 14 Sep 2017 05:24:47 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=skinsbursky@virtuozzo.com; Reply-To: skinsbursky@virtuozzo.com Subject: Re: [RFC PATCH 1/2] autofs: set compat flag on sbi when daemon uses 32bit addressation To: Ian Kent Cc: autofs@vger.kernel.org, linux-kernel@vger.kernel.org, devel@openvz.org, ldv@altlinux.org References: <20170901110906.2669.1577.stgit@localhost.localdomain> <20170901112144.2669.1453.stgit@localhost.localdomain> From: Stanislav Kinsburskiy Message-ID: Date: Thu, 14 Sep 2017 11:24:41 +0200 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [178.19.210.162] X-ClientProxiedBy: HE1P195CA0005.EURP195.PROD.OUTLOOK.COM (2603:10a6:3:fd::15) To HE1PR0802MB2249.eurprd08.prod.outlook.com (2603:10a6:3:c3::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c4d74d29-afec-48aa-50d6-08d4fb526ff1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:HE1PR0802MB2249; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0802MB2249;3:3dlpK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qHEvQoNvmF3mTp7cmvrHdPoJlzV0JsOpTHq4bX8Os9CPtmd8k7P9n5hedNkI6fIPwV8Bqbpts9tv4GWBs02UMRofhDG6kJ9b/HYiNzqwjgl+ld1j7TUUAfn5zIRZtK9CDmEDqwSsSt2HSJmrwZ+/hoVx/rE3k3GJTNbs0gEyrXKjULZiP8YMqwemSW2P0S9doFAgnAr6/gxTVJKBuL5GXOUcojk3eHk49wdTAQT2iB72nPnVsUWbPJJGZJL1mDmtGZKfofACUs=;4:zTwXY0tehdwdqPcFMSd9LJKY0+ftmeXnA2Lobufn6clUm8xpggyKSzxB5ApB+CNNmZNLddgHCGQEqPyryx4FsTzG9ZcM4xNYaRcWyx3crJWQsZDT4oFJIi1D/qSmbWSfvgJrjb/SJUCseXYRqSu2SRUZ1Owvd8vN+F+htUhbOdeJAuUgRwiJURjzm3cZ6qmb9EWbcAR10xG6SdTi4bW9sJWytvl43cMVLoPOFAxcBJTgffLc2WDVBZn72jyGYTFd X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:HE1PR0802MB2249;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:HE1PR0802MB2249; X-Forefront-PRVS: 0430FA5CB7 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(7370300001)(6009001)(6049001)(39830400002)(376002)(346002)(76104003)(24454002)(189002)(199003)(575784001)(305945005)(4001350100001)(50466002)(31686004)(65956001)(2906002)(110136004)(86362001)(33646002)(77096006)(47776003)(478600001)(53936002)(7736002)(4326008)(65806001)(6486002)(83506001)(16526017)(68736007)(97736004)(16576012)(316002)(64126003)(2870700001)(229853002)(31696002)(3450700001)(2950100002)(54356999)(50986999)(3846002)(6116002)(16300500001)(76176999)(7350300001)(6916009)(66066001)(43066003)(53546010)(8676002)(23676002)(65826007)(105586002)(81166006)(6246003)(81156014)(25786009)(36756003)(189998001)(6666003)(106356001)(101416001)(5660300001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0802MB2249;H:[10.134.193.232];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4MDJNQjIyNDk7MjM6b3Nucm0xT3NEOW0xVk1iTW9MeCtlR0VF?= =?utf-8?B?VFE1L0dCYnZtNUI4SWdFQTNXa3QwMnNockovdWxHWWljcFRaaFZodjhHVjkr?= =?utf-8?B?TUVaRExaQVN2ZFg0cy9tZytrdVF4YjEvb0pHS2xUc1MzbUdzM0lPN0ZWOGN5?= =?utf-8?B?cCtJeko3dElZcDBWLzZ5Q1RjZ3dDT1dMMVF2czcxZ0RxMDliV0E2UzZsVy9C?= =?utf-8?B?WXlRV3VySzhVczFOaysweXZxdnl5RHdmbFJyaU9PVDhmdXdVRFRlZTR4cStt?= =?utf-8?B?SXFZUTY0WDZUYVBvYStJM0VSaWZMT1pJb1ZSTGxFblBscEhFUjlOb1NJakpH?= =?utf-8?B?TWpHV1VhNk5ueDJLTG1wcWhSVExaR2hOOEU2elZNRmFBd011bElGUXo5NCtG?= =?utf-8?B?TzRkQ3pDVUtlWnlPbXdFTVlzVjBCa0R2R3BwZGRCcEZreDQyUmVDYzU1cGxZ?= =?utf-8?B?RFJsT3dsUVVrM1MwK2Q0c0xEMFZRaDA0WHYzTVlyTzBaUnkyclJMQm5TNGUx?= =?utf-8?B?RVZzQmltL0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qydiInpDlaEt8jWZ/UBi1/6vs4zYj8y3pHsGDCEVxeIhsIE6QyLzj5yhBbnNOCWHFj5Z7sY2tiAddaFYxi7BTEunxcF6jaz0SFmy5Qofa/hw6sL3nc2OrK8su+vq893bNGIY5DSjYfktdizM4sRL3+w==;5:w7jLvwuq3MYk18d2oKWmlu2wbF46ge+0UOM/BuAa496RCI8/HGbdL7PWGCxMvvbfvPxaDYvNYBQ+SgFC3ZzwFW7Te/dfTAmOvAC8eEaN1wBNg/JmBH2AKhYRDsJ8XMUqMGYFOnZp1iovuJc5yRNNyA==;24:PCt0gOZtvF0LI5uCRplRJLCD89cbg4KyWm4hhSKoHA9LyVb5Ja6RkQg4NYIP0tQCJh3pMH+/s5x23Xe8Vmlq6YRXvDrK/smHlAoEejfA3BY=;7:06DyuMGwAVxqQZS22OYyzlaZ24C9lGU8HnasjzRZIJ/sWcVAco2bAuV/gChKDg5yIzoMghAH276B67nw2lsfbPgWkIRSw7b5LMvvwhuOXyu4c9UxrXrj/Vo3um4Um62S24gNlUy1K3roBMc4Ywxbn3IvyCgatpJb6QC2iV3yCAJzWUwup+rDp17hNVn9VrvebnhAeJvXuHojDZhgVLuWSQ5lnopt+OiKd2cvYrKMXlc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR0802MB2249;20:lS+rLqq5/K6MCGvzrSroCliBGAh8dD8XXveVB089rviK3URDTeCRXa89ruw4adRxhU4AYxvZTqG752UoqL1ZMDeOCp4L3fiJUUmvqvpPmPEw7qblApVokzoClSVJ4bdEuEjU0G5FSuMTTXEecloLAnX9P+kH9WrwI4uZKCUVAK0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 09:24:44.6933 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2249 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2421 Lines: 80 14.09.2017 02:38, Ian Kent пишет: > On 01/09/17 19:21, Stanislav Kinsburskiy wrote: >> Signed-off-by: Stanislav Kinsburskiy >> --- >> fs/autofs4/autofs_i.h | 3 +++ >> fs/autofs4/dev-ioctl.c | 3 +++ >> fs/autofs4/inode.c | 4 +++- >> 3 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h >> index 4737615..3da105f 100644 >> --- a/fs/autofs4/autofs_i.h >> +++ b/fs/autofs4/autofs_i.h >> @@ -120,6 +120,9 @@ struct autofs_sb_info { >> struct list_head active_list; >> struct list_head expiring_list; >> struct rcu_head rcu; >> +#ifdef CONFIG_COMPAT >> + unsigned is32bit:1; >> +#endif >> }; >> >> static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb) >> diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c >> index b7c816f..467d6c4 100644 >> --- a/fs/autofs4/dev-ioctl.c >> +++ b/fs/autofs4/dev-ioctl.c >> @@ -397,6 +397,9 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, >> sbi->pipefd = pipefd; >> sbi->pipe = pipe; >> sbi->catatonic = 0; >> +#ifdef CONFIG_COMPAT >> + sbi->is32bit = is_compat_task(); >> +#endif >> } >> out: >> put_pid(new_pid); >> diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c >> index 09e7d68..21d3c0b 100644 >> --- a/fs/autofs4/inode.c >> +++ b/fs/autofs4/inode.c >> @@ -301,7 +301,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) >> } else { >> sbi->oz_pgrp = get_task_pid(current, PIDTYPE_PGID); >> } >> - >> +#ifdef CONFIG_COMPAT >> + sbi->is32bit = is_compat_task(); >> +#endif >> if (autofs_type_trigger(sbi->type)) >> __managed_dentry_set_managed(root); >> >> > > Not sure about this. > > Don't you think it would be better to avoid the in code #ifdefs by doing some > checks and defines in the header file and defining what's need to just use > is_compat_task(). > Yes, might be... > Not sure 2 patches are needed for this either ...... > Well, I found this issue occasionally. And, frankly speaking, it's not clear to me, whether this issue is important at all, so I wanted to clarify this first. Thanks to O_DIRECT, the only way to catch the issue is to try to read more, than expected, in compat task (that's how I found it). I don't see any other flaw so far. And if so, that, probably, we shouldn't care about the issue at all. What do you think? > Ian >