Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757744AbbLBJQI (ORCPT ); Wed, 2 Dec 2015 04:16:08 -0500 Received: from mail-bn1on0054.outbound.protection.outlook.com ([157.56.110.54]:21105 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757674AbbLBJPd (ORCPT ); Wed, 2 Dec 2015 04:15:33 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Wed, 2 Dec 2015 12:15:03 +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: <20151202091503.GA15980@yury-N73SV> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> <12844690.Yr8y3jA010@wuerfel> <20151201233503.GA23156@yury-N73SV> <1712431.VUth4NvudT@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1712431.VUth4NvudT@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: VI1PR07CA0054.eurprd07.prod.outlook.com (25.164.94.150) To CO2PR07MB617.namprd07.prod.outlook.com (10.141.228.143) X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB617;2:RlRRe+U89ABg62xSaFHl39Jl5uUykHyKGD9FJCTsockudQG/DcD3Ei53SHP3DX2AgzpNtSS/3p70Izf5KLSIXWfTJ/QKmSQMvVvnKP3+q37IFD/ACmHI2tUDz1HGXIQk+L0lvSmz6fENFQUgCBGvhg==;3:PoOcRC3IaGWrHlx5mM/2IjlLMNcfNF+Qw8BqOS06QCLZWmtyxWWg8GawwZYu/TmI5R8nyygxCAectHBNCqhvxcHYlJssyjrzexp0hGLWncdVQ4XUwlmzzSdoZbVfxT+d;25:rRj0RNYHYXejIInXyk2Eqqr7rcxguyx5qbt/raNaSWPSyJNlZh9DTqtwG9LDrEE5O14AX9T47GMwBfN34kZk9WSmOwNndkH0Y/xbluRzaXWLIS+SGzFijQUxschdneSllhtaTAyZJtlBnf+IVWCXeb9+yYe7W7sKe+sdG/NjcIsdeznQeCoSjJvMx7nH3yWVrnugmu8G7xoO/tV+lToE28qxZSNVyIBKPQXOHux003r2wq891wlPpZfIreQFvHIIHQD9BAM9L4wsZo43NYIFLg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB617; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB617;20:xyPG0HkTo5BY08zSm1GKjbqOW+n/q2N0m7C3Hx7k8v9+Ke8HC2olQT3/AuVcZUZ8+Id2LXBILWSkfGU6FBh+sKQxwFqmoU6WLnlb/0dE/tZa5By+9dRacbJVtLmUKaORW2ZZhKtGth454mBWNvyq0TfhzUW6jix/un3Hx1FEue17nIRHPyEqlXPuVnbw+oE3hajlw+UBJKFle03rYjFG9yxM5Z3rglRHjk2THuk5kHoBZ1bJEsIozaJIRr01Uw0vXMOpBBVzEVZgS/k0h74KxY9hRPtnbRKgj+1VUNa45gBf1vtlYJeWh6T2hCeAjSlpUsZw6zqeMrg3d8IDPFlu/T4P30rMZN21uwr3OZvCxu/otkK51AmuSVF5HBQFpRIMci+j0Pq133Yc2mz3afU0IRcUcz9cVf/aibuED7k+n6fasYhde7b7WLp+65GA9UGFMnWq10lfXZCj6KDIRckN7Qh6tk4vQV6Gs4s3S2JgMhcW/JYucYf2q8OQjKaXFJvs7zEZfAgkqBntvsMpQqXFZUCfBi095a4jP2G8RUdmLaBd0XKgvJzD80iECSTXoGrEVWnJzH5veJvhS5cLpspI2JEcMDRit66UyQacZbZHFHU= 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)(10201501046)(3002001);SRVR:CO2PR07MB617;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB617; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB617;4:rVQzf3RynrGpUtluKke80MMnUBkpNxvf/cFB/Iu/DH50A4Z3rEVxyZ+0QR8ZjBCey6xVkqD9dDoWGetoo5Tfyq7XNWfEsx935HOpyIHNeqmHgVUBF0pVTUmm4FQaz2N7F2t3McNKM8PQoW7RD3YNJKd/vq1AdmvDWWFv/Aqh0DybKnQwVBvznt4COQ2aKGMkd+R7IHRc02OeksCuX0M89fhoSm8CGZZuS0X+Vsxz+X+v1TNnTkobWWYTPuPGKffhC/7qSs/hkAexjOBTIOxFO6ZXJeNptDTsmMs+rfjc6yVItmLt9oC/47xxAoNSlfRH3ZlqZHTWDqI9zCPmunpYzt59tCWMyojBTyoh8T20Og9YXygmvE2Lbll6oU+W+RZc X-Forefront-PRVS: 077884B8B5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(24454002)(57704003)(199003)(189002)(106356001)(1076002)(76506005)(81156007)(97756001)(47776003)(23726003)(5004730100002)(5008740100001)(3846002)(586003)(97736004)(2950100001)(42186005)(105586002)(83506001)(50986999)(1096002)(4001350100001)(110136002)(77096005)(5001960100002)(189998001)(76176999)(50466002)(33716001)(46406003)(33656002)(66066001)(6116002)(101416001)(87976001)(92566002)(93886004)(40100003)(122386002)(54356999);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB617;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR07MB617;23:P/53l8Gvg/EWrXzvu6Ub/pIO9nLApJk1liXZlmgfUu?= =?us-ascii?Q?SCMLPTYnctuMbf2/04PtpDBOcce054xG+PeQIvZ0CpRPUyDS1Xj8S/+ujL2V?= =?us-ascii?Q?QMqvsa4Os2jB19OOyGjvSmlZed8IH0APBoy7npZVe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aR15hk/9WvwjSAhJxoVGLqk3U/JDiMJwvPD7+Her3WGCU3j7Y/F3GH2eO49G?= =?us-ascii?Q?0HihFJd9S7Bf12B6AJ8K6xHqnp7W5zsLTxMb96zLXG90NRX6tnB+akw61DNo?= =?us-ascii?Q?bXz/cRyY0=3D?= X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB617;5:5i7tcRGqDH+NxJHPW6yxhFaQDOCoMNhEwmc8pTPrQS6X2mmb6NFW4tXDBW8ayua4Em/okfVB+KMP8uYg6TS0CrXIBG/m091u0hWCPa/EC86H/0oh6Nl+eYOGZvdzEX5ZD28AeR4p0UHbNchvWV4Lcw==;24:orBL7fd+4GG0WdlUYNMShnInwwa3NU+FfAKpC1qdR+l58wKpcEgFVkCfhom+rkg+MzHinIazLf6oS3vA28rZ//n3GboKuGa/gRnoHOaVzj8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2015 09:15:27.5878 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB617 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3409 Lines: 74 On Wed, Dec 02, 2015 at 09:37:05AM +0100, Arnd Bergmann wrote: > On Wednesday 02 December 2015 02:35:03 Yury Norov wrote: > > On Tue, Dec 01, 2015 at 11:39:42PM +0100, Arnd Bergmann wrote: > > > On Wednesday 02 December 2015 00:29:04 Yury Norov wrote: > > > I'm not sure I understand this part. What changes specifically do we need? > > > > > > > For kernel: > > > > diff --git a/arch/arm64/include/asm/shmparam.h b/arch/arm64/include/asm/shmparam.h > > index 4df608a..e368a55 100644 > > --- a/arch/arm64/include/asm/shmparam.h > > +++ b/arch/arm64/include/asm/shmparam.h > > @@ -21,7 +21,7 @@ > > * alignment value. Since we don't have aliasing D-caches, the rest of > > * the time we can safely use PAGE_SIZE. > > */ > > -#define COMPAT_SHMLBA 0x4000 > > +#define COMPAT_SHMLBA (4 * PAGE_SIZE) > > > > #include > > > > diff --git a/arch/arm64/kernel/sys_ilp32.c b/arch/arm64/kernel/sys_ilp32.c > > index c5bc712..877bedf 100644 > > --- a/arch/arm64/kernel/sys_ilp32.c > > +++ b/arch/arm64/kernel/sys_ilp32.c > > @@ -42,15 +42,12 @@ asmlinkage long sys_rt_sigreturn_wrapper(void); > > #define compat_sys_pwrite64 sys_pwrite64 > > #define compat_sys_readahead sys_readahead > > #define compat_sys_rt_sigaction sys_rt_sigaction > > -#define compat_sys_shmat sys_shmat > > #define compat_sys_sync_file_range sys_sync_file_range > > #define compat_sys_truncate64 sys_truncate > > #define compat_sys_sigaltstack sys_sigaltstack > > > > For library - just create a header in ilp32 directory that defines > > SHMLBA exactly as arm: __getpagesize () << 2 > > I think we both reversed our positions here ;-) > > The 4*PAGE_SIZE on ARM is an architecture specific oddity, I believe > to work around aliasing caches on ARMv6. As no other architecture does > this, we're probably better off not duplicating it for aarch64-ilp32 > and just use sys_shmat as your v6 patch does. > > > > It sounds like shmat is one of the cases we an override makes sense > > > and we should use sys_shmat with PAGE_SIZE for aarch64 ilp32 mode. > > > > > > > [...] > > > > > We normally assume that the page size on ARM is fixed to 4K, so > > > there might be user space that just hardcodes 16K SHMLBA > > > > It means that we should use compat_sys_shmat because hardcoded > > userspace may have a chance to work for 4K pages. If we'll use > > sys_shmat (and so 4K SHMLBA), we'll definitely make hardcoded > > userspace broken. Non-hardcoded userspace will work anyway. > > > > We can describe in documentation that 4k pages are prefferable. > > The hardcoded user space would only apply to old source code that > specifically tries to adapt to what ARM does, but gets it wrong, > If we have source code that is converted from x86 or mips and > hardcodes anything, it's more likely to be the normal __getpagesize(). > > Arnd Hmm... OK. Let's have non-compat shmat here... -- 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/