Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932669AbbLWEYU (ORCPT ); Tue, 22 Dec 2015 23:24:20 -0500 Received: from mail-by2on0081.outbound.protection.outlook.com ([207.46.100.81]:20814 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932557AbbLWEYM (ORCPT ); Tue, 22 Dec 2015 23:24:12 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Wed, 23 Dec 2015 07:21:33 +0300 From: Yury Norov To: Catalin Marinas CC: , , , , , , , , , , , , , , , Subject: Re: [PATCH v6 13/20] arm64: ilp32: share aarch32 syscall wrappers to ilp32 Message-ID: <20151223042133.GA18231@yury-N73SV> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> <1450215766-14765-14-git-send-email-ynorov@caviumnetworks.com> <20151222122514.GA1302@e104818-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20151222122514.GA1302@e104818-lin.cambridge.arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR03CA0033.eurprd03.prod.outlook.com (25.163.170.171) To BY2PR07MB616.namprd07.prod.outlook.com (10.141.222.156) X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;2:Zj0vgrnt057/sYyGC6JHHt5MZZlAhnBdxJy0PVdPOpH0StKor9E9Gy/Nu3E5Pk7lzGoGdAhhndrg635sPg3NBRMbhWHogJWLSdmZyQwKKlX+SQic2xr10iPL1xWe5TnYpb+zczZgNKtFIYbFW32/hg==;3:9vLmciPsd4cgoaIELMavFPHMtvcObulTX15vazIleLzQmrrzcphjlAYUA98qZRgAnTJ5p236HDeREtijVZ0FYUyWduM/9vNZ3CHE1BmxVYPJgyqIE40/mBO7a8UHuryk;25:wkC9qGd64LBULTychrcb46MaZo36t3vSAwdyR4vg4ggIabEDX4NHFa5nlEhngHHPoFnvG8GaT3qYniFTmJOzrni+c4jANZsnu7LD6KxsBapc0OX4mwfNY5zNRL6HUpGcLmiXWSTRsEuBOEBq79e1sONlXypWi3c7UKJfiONASpoPygWX3QHJ7JJYuNR0UoxLWyqszHld0kGtzekb2MdLRh1gg/7BerNUi0pVehfGd8MIRWRh+80HeqNA7wAHlcvT X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB616; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;20:9FBVABOKKTWWIdPyM5USSAZ2vgw/Wy4TufhyXcqBma49iltr4NHI18DwT4AbwmA0qOs0JlFaA5yIZsRhVCmdxTbDZEV1Z2YHwCJ8ZkhzVkn2qAS9ZU2j1frZlp+up3SelZGUUOW5iwtthnSxXdhtDSlbx5Zlv6a1IFzjPd2RNTOG8SMLhAfNbJnn/ePS4oviqvse+bnH5rkjEy67xbmAlTUF5WD0dnQpUkWG8HtHb2FoHvzLcnUyEnuUZJsK38YbfRBqA7kkiBxxno/58P3OL4fBuSqZLMMxySS6vzg/ARxPhqTV6AW8pPwqySNp2nKvS1OcHCQyy6S3em9NvlkcbI9WoX5VBtgpU68WxEqiqZZpe48sXwc0/PdjyrTRlH0F3WpADP3ofmlGRyEfenEHRzspVlFa3hNGAVeHLXlCIN7ysViw/FFGSLjj3LA0dq3nhzWFLAabKcd4Ah/Efr/4HmZogSuc1SVirsB0AmUsWAG7wvHCDVtgLuG44va3/nr+gPGE6ADzqJvmHRIe96EzYcdp9mGJATIjTJV39pR8htPrkDhhyBcm0KM08lbAfqyc5ywIWCRL9ux2DF2v+eyBV4VW3m3LjNeMt5ac3lhKWc4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046);SRVR:BY2PR07MB616;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB616; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;4:PkS8bGa1LDo6GDfPw7k/2aTz2nh3+IDZY5jaUNXzpUkbSpg/W2xs9TLUWxJowCDNQxKurTGXBmXatdyJfcGMgZweUQGyCNDEdR6e38hGo3SFgxrYSe2HjCIe2ReZR4c6KG7zvvzFQyBxhlHR1xw7zjQBchw8IQbSJzlSqAQbO1hi0yhRJ3vYFIpXyPHJPiMeblxpHGpDoTxOa0rs1eB3otMoO5EfW8fwv1qPkR8th9I+C9a8zFTMe+lPOhW1Dcr2MAgwWXEfi4Yr9iVG6mb85zK17rckep4TN3f9Gx5IwahrVHMN6ACLaUdwA0q+zNfy80K6xTm12IyB/IvH4VmSM+kxH+OIivzawiUR6WpJ7u/TVZ0ey03SP7ViiadjOBun X-Forefront-PRVS: 0799B1B2D7 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(189002)(24454002)(199003)(110136002)(3846002)(6116002)(77096005)(2950100001)(92566002)(33656002)(47776003)(586003)(42186005)(1076002)(23726003)(76176999)(54356999)(105586002)(5004730100002)(76506005)(106356001)(1096002)(50986999)(97736004)(50466002)(81156007)(189998001)(46406003)(83506001)(5001960100002)(5008740100001)(4001350100001)(101416001)(66066001)(87976001)(33716001)(97756001)(122386002)(40100003);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR07MB616;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR07MB616;23:DY+9nBFwrPW8jKrGpmfhZ6EQn0PYxg9JrBGX9PSrIV?= =?us-ascii?Q?A/g7xCT2KhK8H6/MlknjqwW8s49hhwCs3Vdkz6kb3ng/pCqr/dQ8xUafn1FW?= =?us-ascii?Q?IVmRz2yIj6vq4Sv2Jpp3+Nq/WfPx09ZriR7SEZF6JTy7oChMT8F8ghj3nsub?= =?us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SDwfrxLKiAN0INonhg?= =?us-ascii?Q?CmrOjIbwTK7COa4mA8f+80wvMM?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;5:kQeyDi9k7ZtyqBwK9ERGaiANoBCq//LUdFlDT5h/9qB/rXpQ5pDEzTTU2DhyFGQOTL/fdVpUtUeP0dO6sU2Z+S9wwoMM4M/r7sXz/xL6/NNXuBzTKmr55ojClnRQJzLIF5D+shzpzbyO7O4MVwE8WQ==;24:GiTUph6/7YCY6mjEI9jVa0xD7+yK3Gyvz4EIwKRhIaLIDkqgUqYOjp/cfvfkr64uj9SuVCKBitcJ64i537RATVTZtJTlWMIPGTSP0w7Eiz4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2015 04:24:09.8067 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB616 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2076 Lines: 54 On Tue, Dec 22, 2015 at 12:25:15PM +0000, Catalin Marinas wrote: > On Wed, Dec 16, 2015 at 12:42:39AM +0300, Yury Norov wrote: > > statfs64, fstat64 and mmap_pgoff has wrappers that needed both by aarch32 and > > ilp32 to workaround some issues. Here we create common file to share aarch32 > > workarounds to with ilp32 code. > [...] > > --- /dev/null > > +++ b/arch/arm64/kernel/entry32-common.S > > @@ -0,0 +1,37 @@ > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > + > > +ENTRY(compat_sys_statfs64_wrapper) > > + mov w3, #84 > > + cmp w1, #88 > > + csel w1, w3, w1, eq > > + b compat_sys_statfs64 > > +ENDPROC(compat_sys_statfs64_wrapper) > > + > > +ENTRY(compat_sys_fstatfs64_wrapper) > > + mov w3, #84 > > + cmp w1, #88 > > + csel w1, w3, w1, eq > > + b compat_sys_fstatfs64 > > +ENDPROC(compat_sys_fstatfs64_wrapper) > > I'm not convinced we need these wrappers for ILP32. They've been > introduced on arch/arm many years ago by commit Fixes: 713c481519f1 > ([ARM] 3108/2: old ABI compat: statfs64 and fstatfs64) to deal with user > space passing a size of 88 (the EABI size of struct compat_statfs64 > without the packing and alignment attribute). Since that commit, the > sizeof(struct compat_statfs64) is 84 already. This should be the case > with the new ILP32 exported headers (no backwards compatibility), so > user space should never pass 88 as size. Therefore we could call > compat_sys_(f)statfs64 directly without wrappers. > With current glibc, sizeof(struct compat_statfs64) is 88, so I added wrappers just to make this couple of syscalls work. AFAIR, glibc doesn't use exported headers here, so we'd change it. Maybe Andrew will share more details. > -- > Catalin -- 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/