Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757719AbcJXSEd (ORCPT ); Mon, 24 Oct 2016 14:04:33 -0400 Received: from mail-db5eur01on0051.outbound.protection.outlook.com ([104.47.2.51]:34944 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755676AbcJXSE1 (ORCPT ); Mon, 24 Oct 2016 14:04:27 -0400 X-Greylist: delayed 3289 seconds by postgrey-1.27 at vger.kernel.org; Mon, 24 Oct 2016 14:04:26 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@mellanox.com; Subject: Re: [PATCH 01/18] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option To: Yury Norov , , , , , , References: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> <1477081997-4770-2-git-send-email-ynorov@caviumnetworks.com> CC: , , , , , , , , , , , , , , , , , , , From: Chris Metcalf Message-ID: <7d5ef8e8-38f1-92fe-b584-242cc2924558@mellanox.com> Date: Mon, 24 Oct 2016 12:30:47 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1477081997-4770-2-git-send-email-ynorov@caviumnetworks.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: BN6PR12CA0006.namprd12.prod.outlook.com (10.168.222.16) To DB6PR0501MB2759.eurprd05.prod.outlook.com (10.172.226.11) X-MS-Office365-Filtering-Correlation-Id: a06921a7-e882-4b10-6232-08d3fc2b2484 X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;2:g3UhI4UlvDB6EynoUAlir9hNV7QrNzDJVbU4sD/AOCLjaPtGWu0PEgQHyKVBPfL5y47EepAHhb7j261AWFKLW0TWTVYl3k1KFOmeJjyX9Gw4/yCmxANJG/JlLAej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6gR7cKOTGMRu6ZgSJrYq5iSP2sfhz8yaeKwwO5W+1BIUtrdiE8GWabiO4dk6tTpCWmR1s0rV9gbsg1p3P/OLi9b8lWfzdEX+c X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;31:j7CPQXEpCh01/tfNjsoQuqLM5dtF5p+192/FeGNt/brrifDNf8tYhUi6xTvckAM4jUbeIWHE9FzV8r/jOOmntv02XFufNqR50iUyl7VtfEVa8GqsFNXkP6+F2ml/9o3jcJ5X1dRW8zZgrdDp8YBy9hsslqMmBL76UpHAhc+UlpsOvp9k2RAbHVAjwG2+cNsfpQOjZv0ZatWlcj6iFYtGs62HcJS/iOlrxN2clPcGwMER4zkgF1MRCoMyzhS4b8DNf//APoXEIcNHwLJC2CflzQ==;20:r57sdmpBdH010tTALOtmEnrslZsbRY/JXg0lqe+jh/NmiCAVDpvxcLJRlK8NgrskbcCnbMr0h5D4bdYwX4YjGQv5jjLIFkO541S5Tz1KzjBno7wRd45Tdb6TrvjLp+PCwD5NYu0ZyEdhVPNfwTwPAlYAVoSMGWGeemRXgrt22TTGJwk5U7SFB5DSLMzgxdvFPNIEWRtffpTqtY2YF8TA9LNx72Vwc/XTtSj8uTKKJHQBrh+eRbBLdaWkJx4jvjk40UsUc5XVg2AUT9TGHYHTLQs2iWtJ8MU24EhLNJAfrr8muMd5ferF+KIUMWCKOPlOWmxL9ALPgxPjI90vLv3t9wspXwxK6ERbLfmGg6+B1e7wI8LUITOSlUquc0ay645SCCP7jOjRfi2KM7VLBCDi9zQMfAfo6Lfo1jcwSq8ftWWlz9tfLJ6ljPBGg7p1VLQPHYSf8gLhQVa4M+L7Sp+6NPvZcYPEna8sRuQK7SZqN4lJG0xr1HFrv58UQeNZppzQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(171992500451332); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:DB6PR0501MB2759;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0501MB2759; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;4:HKMpnzMWgj1ej+m72+xNugNoTdZSjEsogoKyN1M8Knnsju7wamGtakIWQKZRVrm7S+RV6zL5ofwni3jGfEhEoK1n6blukSYJMM9CptkRlSkhV0rtA5NDQJEnoZgR66/YmDpbqzyYcNzQMHZEysCpPd3itGDq1R+pDlCO9ECvTyUIG1nWfB1nWUM4mW3JNyxxWkNXhdglNKEKm/RPsGWod0yvKJQUbqRDdD+MXHdN8tND+5i1UWH9yWD3hPw00Wu1Wl0fkYLJcmI3L8myV77PpjKDU9s3ftnHEvShC0UmNWx40wIWID8fREU2arXu9H5l0tnoPF6rSaAd2fa0AhaosRl9DRIoKlebc82JCc5eSXd59aTngm873NnyhaMePeSKO3DP83YwcBRCd5Ejak+bIeBiCU0CNwIwcmVQVuWMrxgZfszEphYu3R8Ty4A+x2kdCLoJZU76GobXMVj0SFsLMg== X-Forefront-PRVS: 0105DAA385 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(377454003)(189002)(24454002)(199003)(50986999)(54356999)(101416001)(65826007)(7846002)(76176999)(65956001)(65806001)(31686004)(36756003)(77096005)(5660300001)(66066001)(23746002)(189998001)(81166006)(106356001)(7736002)(81156014)(2201001)(305945005)(42186005)(47776003)(31696002)(15975445007)(86362001)(2950100002)(105586002)(3846002)(83506001)(230700001)(33646002)(19580395003)(6666003)(2906002)(8676002)(97736004)(7416002)(4001350100001)(68736007)(4326007)(5001770100001)(64126003)(6116002)(50466002)(586003)(92566002)(15760500001)(2101003)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0501MB2759;H:[10.15.7.181];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB6PR0501MB2759;23:7AZKEKOlovQKZHbnHpQlF4nT3OoYnpnSzZa?= =?Windows-1252?Q?mJ7xA6Ajajt8+pYdE7Mh1DEiYGDjL9JeXwNqNWCInIlPCDIT0VV4BqlT?= =?Windows-1252?Q?rQoJMQQW5pEgY6e2LLd9rlVmLGzXw0XM1QMeyCud10AcfJE9wN6IIy/K?= =?Windows-1252?Q?IabovaDxWMXo0BvCaoM4QnYaJSyw+G1S8F6aNVxpwRQNir6Wr/Qa+Ctn?= =?Windows-1252?Q?QeGQTEaQ8/IDukjGzcuUlkROaW/1Iz7bTkvkPP3sw+1XAp7fYrFR6ePq?= =?Windows-1252?Q?NTiaf/+ECufqWho7znPj8ts7CCS2G5Pnf0MebVDneR8Z1axCmbSNn+7V?= =?Windows-1252?Q?uwflx7pYYZBA2LlDgdziBZpn/Rgdle1RTjbo8d/9j1od0EHzFkgni8fA?= =?Windows-1252?Q?OC8gfxzNJxWZiCe8ewvg98i8Ndv9O0sv01kBGjPd8APtyy8NB+MT4sOa?= =?Windows-1252?Q?yKmmtC2rmDcvjyPbI7nsxGezNf+Gba04E8gkdhKYsBkf1/1uQnzQgDH9?= =?Windows-1252?Q?P40qTsKr6nmzbfPA4NW0rbKkmOWiULdrN5h8Vh3c+gN3XxnTi+HlCVyn?= =?Windows-1252?Q?8aEbKgGY/a55cTT2g9/MdbgsaOPnzLOZWID8loO7L7Qy9L4djZD2ggbI?= =?Windows-1252?Q?OKvBzJiVkrWioHZ4+C9qP9nngZ+8o1dY4c/ABpVS2Z+IcqwTZNALjg5Z?= =?Windows-1252?Q?NZdkAAjpE4wodOtODE9c0+FxfJJwK2PIiSzxBuE9pmdltnxDsoF26sFv?= =?Windows-1252?Q?8Z133RKrWbJ+9mhd0E3NOiJRDYRbE5JhJEP1ruj/4oOfQG3VUP5d67Ny?= =?Windows-1252?Q?v0OatWH636MgzXM6bm7vvTl7tfIFJNmEGo+AgAAOQW/E0xc3eFXwldPL?= =?Windows-1252?Q?0HbXNaTvjn+bbeyoQhwcMRTuaQpA42bmUNxxmQGRI2Ppf9/bxeUWUhuU?= =?Windows-1252?Q?HV3FWVJ5P9hG9SFnW9k2/PO8e/V27YbNztaki4r1El4XdfIsB7Ysicy8?= =?Windows-1252?Q?ca7JAzpH/Tq4isukGc8BGbmNYOlialeEcWj5NA3btFZs80rzKT/sEwpB?= =?Windows-1252?Q?7spKsoQI2aXGeywXhdwu3KBgj2Eq+L56M/umBfTktT7IGawbHZL4ix9Y?= =?Windows-1252?Q?yt6J7enCdxsVKZgG40Sv8L3Ikb5X5ZfRwRQ4XDxYzRlXXBjc+Bguv5ag?= =?Windows-1252?Q?kgbukykJkMcayPmZmB2qK0B6BZPXjOErENsDPy0AAg+6wxU0QpUTqwZI?= =?Windows-1252?Q?RpN7TQvq+l2Lc8MOiumyLuxfzgHy5MQQSXn1iJX89uAqvM/zSKRiza+Z?= =?Windows-1252?Q?76sl1lw5NChLnPo1prA6ynYsZtCpZLV2V8vwnDvOVVKFJ7DCag8sHolY?= =?Windows-1252?Q?/AVozoTB5XrBloo3Q2+0LSNrB2YmxoX2BYf/mtMI568YYLVqU9dXK94l?= =?Windows-1252?Q?dWRqD1YcMZ6FAdtZPIzrSoF7rXpLEUvWWhs3/F+zY3pkxYqt/eY/Oykk?= =?Windows-1252?Q?k6FtK+iV8A4A0DdvuO6hAdjh4BQa8bHTnjt7W1LSTsasWp3kt8A=3D?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;6:nvr59kSR1DwBKe2BV9/78rnM7BHmFt/aQXAbKN+ZOJqM1K9xG1m/hhzXyr3R2O1OqTEVe7Q47+eSaACr7/XxBFCHZGoL1hywfo3QHkZAvSotRjnl9wSot8IW64X50jg4HupvYcgkkV33e64ecxjBhzg3uKPL87cmhYSGKyiWxQTgReebkSEckY2lljmOeKqcigeuHr8j/GOPRK7iSIptbPUqe4X2+1v1ZImflKo/4EYv72a23Yd6WEiCDg/ZnNqGgUnDVZBauIuczlUQf+esHcG7eg2XZycgBvBdhSCAEn08No/22cPx+ifaX4cdNVpXvEbGi+Ty2a41jSZI5+X0/iwewQhRJytbbTzdtX2Z68Y=;5:5EHu9TtZfnpNZTbX5CMBuKUak7BQquuPYfaNfY6y+yyFxv6L3HVNZO/+odzgEXJwjPITrsLpJB7Z+B1Y+ddcY9IYw6EcxflEna6h2Yx1xJfJQD06udtuLCDKGs3Js692XVz2HhW7tenOrqtIih0UYg==;24:OpevzfPwbw5OF/Kk4DHvzxxUiLobcuZ2U+yafkqYafROb4QqNWXwIGjVJxl4WXcILUD0/YptdibUcB5436WZorVOxxlZj7j77mK+K3RcIyQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;7:5D2rpTi2Cqzw2L3Eplxpnxn2rBB6O1/IqytoOsDQMPqWqHj7QBL8O6Mv/SCFEEvW2QvJtat9AHf2KqkuTTzcreLgrzHa6YVkBUWtGsyoAIZ1xlyOnkPjrFRxbYvhprmAiMKUtQReCzaFZ6EcaOiU1mWbVE6FJpRrhHcJjkRniX4khWuUI9uURDnO0OmypIZLwESBfju+6dk86gJCUjnCXDCbC6bjAO/70gFsi0zKPBAJjFjl3vCfoNDB5unuMpn4wXShzs0E+VuyTVHjhTZ6DjHZxglojmGaxAMb56rKPY37Y5umvZcq1gtK4ztn5i/YSF4C1Hb/qxoSRPamXV7lbx8AgAGfAU8YzjFRnXe94dI= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2016 16:30:57.1874 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2759 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3209 Lines: 66 On 10/21/2016 4:33 PM, Yury Norov wrote: > All new 32-bit architectures should have 64-bit off_t type, but existing > architectures has 32-bit ones. > > [...] > For syscalls sys_openat() and sys_open_by_handle_at() force_o_largefile() > is called, to set O_LARGEFILE flag, and this is the only difference > comparing to compat versions. All compat ABIs are already turned to use > 64-bit off_t, except tile. So, compat versions for this syscalls are not > needed anymore. Tile is handled explicitly. > > [...] > --- a/arch/tile/kernel/compat.c > +++ b/arch/tile/kernel/compat.c > @@ -103,6 +103,9 @@ COMPAT_SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned int, offset_high, > #define compat_sys_readahead sys32_readahead > #define sys_llseek compat_sys_llseek > > +#define sys_openat compat_sys_openat > +#define sys_open_by_handle_at compat_sys_open_by_handle_at > + > /* Call the assembly trampolines where necessary. */ > #define compat_sys_rt_sigreturn _compat_sys_rt_sigreturn > #define sys_clone _sys_clone This patch accomplishes two goals that could be completely separated. It's confusing to have them mixed in the same patch without any discussion of why they are in the same patch. First, you want to modify the default behavior for compat syscalls so that the default is sys_openat (etc) rather than the existing compat_sys_openat, and then use that new behavior for arm64 ILP32. This lets you force O_LARGEFILE for arm64 ILP32 to support having a 64-bit off_t at all times. To do that, you fix the asm-generic header, and then make tile have a special override. This seems reasonable enough. Second, you introduce ARCH_32BIT_OFF_T basically as a synonym for "BITS_PER_WORD == 32", so that new 32-bit architectures can choose not to enable it. This is fine in the abstract, but I'm a bit troubled by the fact that you are not actually introducing a new 32-bit architecture here (just a new 32-bit mode for the arm 64-bit kernel). Shouldn't this part of the change wait until someone actually has a new 32-bit kernel to drive this forward? If you want to push forward the ARCH_32BIT_OFF_T change in the absence of an architecture that supports it, I would think it would be a lot less confusing to have these two in separate patches, and make it clear that the ARCH_32BIT_OFF_T change is just laying groundwork for some hypothetical future architecture. The existing commit language itself is also confusing. You write "All compat ABIs are already turned to use 64-bit off_t, except tile." First, I'm not sure what you mean by "turned" here. And, tile is just one of many compat ABIs that allow O_LARGEFILE not to be part of the open call: see arm64's AArch32 ABI, MIPS o32, s390 31-bit emulation, sparc64's 32-bit mode, and of course x86's 32-bit compat mode. Presumably your point here is that tile is the only pre-existing architecture that #includes to create its compat syscall table, and so I think "all except tile" here is particularly confusing, since there are no architectures except tile that use the __SYSCALL_COMPAT functionality in the current tree. -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com