Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756988AbbLAVah (ORCPT ); Tue, 1 Dec 2015 16:30:37 -0500 Received: from mail-bn1bon0088.outbound.protection.outlook.com ([157.56.111.88]:52163 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753984AbbLAVaf (ORCPT ); Tue, 1 Dec 2015 16:30:35 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Wed, 2 Dec 2015 00:29:04 +0300 From: Yury Norov To: Arnd Bergmann CC: , , , , , , , , , , , , , , , , Subject: Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Message-ID: <20151201212904.GA14442@yury-N73SV> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> <1447795019-30176-15-git-send-email-ynorov@caviumnetworks.com> <3754277.KmO9Nk3XLD@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <3754277.KmO9Nk3XLD@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: DB4PR07CA008.eurprd07.prod.outlook.com (10.242.229.18) To CO2PR07MB620.namprd07.prod.outlook.com (10.141.228.156) X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;2:xPI82JZUw+PpvunmBn7W3bPASFBa6Uazt89bCotlqePPNJDWRCNKee9TgNDTLsP/YZ/3bLEC6plIPVQZi5+NxfQ/LRJV8+2eNi/P0g6M+vA82MRg9OmUOeD9lfCFVzSYA7DHzL4itXH9IC0swx8fEQ==;3:gCJqVjvMqIAS3Rxell/u/HT1P88GEZJMP+bNYsneu+lnyl9bxqxM50zB+mxHfRQsLSiVzYwPWmIy1zQVFNtS3dawvMTQuO6ETZejxSr0ZQepLW2AgHz9y79NI7E3dHcW;25:vtwsT3jG5a+VLxIKuT/E1kXOGVVD53DsDUWVhlWnIqSjwHu524oH2xLdcZaJH0TR7xPAeXXoXl8/sdobWGw+qoC15tchIOdqEnv58u9fQN4nzJMTE9FwiVhl2RTMqBnlym5VmvCxGYYc0jSuq9N1861xGjm8zsiA36w7PpFOwLNLPA3Dju/nka3xfn38fuTKz54BS6SmDrqdcxvMKFKCKpL9EuZrYT4xwzg8qghlMfjc+YDmrHnQeAK6Z0WZljQeH2xYDBSc3QeitCKhbh4vdw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB620; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;20:hzBD71HyYQksNnVypPDx0SjmYpTmcTQijJuVGML7UY0RbJsIfVnjxJck1BTknBoscQPbz/B241VGd6ibAG93Sk9rKmlf2SSGfpt+JF2aMtqfCAi08KmtPHJ7Xiac7+iZNlvwjSuxPvQO5iIe5PTnfP3YlVMbhyxsDNnHoGV0N42AZH0OXvSlsUYNYd/8vjUZqMlTfoR1zhydXW3OLEuD6LnWTcEnXlruQyhQPRKWJ6y8v4dy3acDtUriX1rvA+1CQ23UnwzIofQJKJnITOWoc99O2/HJr25Vz47CkLp01U6+RIIaPrMTTEz7wY66dtebkMjxz6eHzv/tlgw2IMDMcF+P3q9pJLCuTD3Bde8wIeZO/Lqr38CD69j4OZIkJK7FWD6Z4fHPPPn2zW1ZjQubQl5xr0xVdlG6DXlieu28uAngKHiJgJLd6AiOeXgXLRgoJM8GC+FUbwTl3rHC5x8LoHyleongtvWYgmShNab691H+ly2chszQj4JSFoM7dpjf3MXV30l4FiQOlWXa8N8mwBQ/lDqiFEOrr5BpYRPi+9ewFYc2JpNzc8oWmKPx3br5kHIpoVYoSfzxI2xGKBpQQvVpnt0j9ToPv699zRbxRX8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046);SRVR:CO2PR07MB620;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB620; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;4:WfprJOHsKJEuTAzbiCzxAAzkqu7JJiSOZulJCisy/YQeqlTikD17hIuE5Bg+yQ5ogMarB//jjpZx7Tl6AFXg3TY3xe5St2hf0zYVNMxpSmIzm7y3s7rBhP76jJyZlidbXPOpbeWi/Xw14X77+3nKkkOgx40YemPInrZ/TJWSOTkST/6r+9LKsKOvdm/u5F16EADGCkStgiCU2fWrM9YN4df2g15HwLRtu/zLmXbDe6Q/WPxSvtMvozTr3CmMyacJpK6gjulrX/4ezvWM5EobUd/ClC80EAGnfkFSN+9yh7pPSmRyliGntFWbUND+kByVMFhZpGWdbaFT1jO1eFiBEL6kvFUKwbMWDHwQVquT0IqBb0TU1SeqGZhNxi+ncRNt X-Forefront-PRVS: 07778E4001 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(199003)(189002)(40100003)(23726003)(122386002)(2950100001)(92566002)(47776003)(5004730100002)(50986999)(586003)(77096005)(42186005)(76176999)(54356999)(101416001)(33656002)(105586002)(97736004)(189998001)(4001350100001)(33716001)(1096002)(76506005)(3846002)(97756001)(1076002)(87976001)(5001960100002)(5890100001)(81156007)(66066001)(50466002)(110136002)(106356001)(83506001)(46406003)(5008740100001)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB620;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR07MB620;23:m55r08tNXS50MXLY4CZ+38XArfyoZp0bQ6mXSM0ifC?= =?us-ascii?Q?cs4S+EcltpJgyj+EOwfNe8JWyRKwLx1bjY+yPH0+MLkjI0CI+YphqpczMEAD?= =?us-ascii?Q?B38mocf11RCw+UqX7kgi03vo2UezEzwnjrCxEtKfbvgz6EIz2fwuvY7r0uL3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ab0WSOzlLhn+ltJ2p5HLdmFSL2p47y76B7Pka6Qzp?= =?us-ascii?Q?uEG6ezxB3ywhD/qpnY6dmA5osC?= X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;5:P8sa8R88daRik5rXdkbjZYu8xikIXz5QN+ggKzg9jgNXrt9RyNzLLL47pv3BK2QF+yCnwcK4l/ITpYVlr32A/6GNhVfqYGXXhrLegLVpqjH0qqap5FMpXuzK8LVUhI2lM6CIhSsDVi2QbDY8XvJjUw==;24:OSBJ8puCMHEJ9DMPEommkx0AZdc4spFo6DF5FYElgc1C9SU4mXzI5LLiSb3cazcTjqkro/INbzV8soj7of4O9JKjpuJCOY0rDI+5KDDLaD4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2015 21:30:31.7984 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB620 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1226 Lines: 30 > > +#define compat_sys_shmat sys_shmat > > What's special about compat_sys_shmat? > It's about SHMLBA definition. For aarch32 glibc defines it as (__getpagesize () << 2). For ILP32 there's no definition, and so generic one is used: (__getpagesize ()). In kernel, for ARM64, COMPAT_SHMLBA defined just as 0x4000. Both compat and non-compat shmat syscalls pass identical arguments to do_shmat, except shmlba. Effectively, library expects shmlba to be 0x1000, as sys_shmat does. And compat_sys_shmat expects 0x4000. I think, both kernel and library parts are to be fixed. In library we'd use definition identical to ARM. For kernel we'd use compat syscall. My question. Why aarch64 defines COMPAT_SHMLBA as 0x4000? If there's no specific reason for it, it looks like a bug, and we should define it like in arch/arm: #define SHMLBA (4 * PAGE_SIZE) /* attach addr a multiple of this */ Maybe that's why AARCH32 is limited to 4K pages in config. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/