Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757134AbcC2MCI (ORCPT ); Tue, 29 Mar 2016 08:02:08 -0400 Received: from mail-bl2on0058.outbound.protection.outlook.com ([65.55.169.58]:56497 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753047AbcC2MCF (ORCPT ); Tue, 29 Mar 2016 08:02:05 -0400 Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Date: Tue, 29 Mar 2016 15:01:47 +0300 From: Yury Norov To: Arnd Bergmann CC: , "Zhangjian (Bamvor)" , Andreas Schwab , , , , , , "jijun (D)" , , , , , , , , , , Bamvor Zhang Jian , Subject: Re: [RFC5 PATCH v6 00/21] ILP32 for ARM64 Message-ID: <20160329120147.GA3551@yury-N73SV> References: <1452792198-10718-1-git-send-email-ynorov@caviumnetworks.com> <6653982.FK62mVSCZO@wuerfel> <56F6825B.7000906@huawei.com> <4405408.txAtlZbTDH@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <4405408.txAtlZbTDH@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM2PR09CA0038.eurprd09.prod.outlook.com (25.161.22.176) To DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) X-MS-Office365-Filtering-Correlation-Id: b29df9a3-6c95-4dd4-ae7a-08d357c9f004 X-Microsoft-Exchange-Diagnostics: 1;DM2PR07MB624;2:wrJI1XlxvNo+MF3pDVnvU6vHkBRYtb+Mt7Rwy36kWfM3feYQyLA29UyTNXZ5VIhEPs44kWnbHwytJo72vN4rIwYppUEZznjrywvnCe7f389ss9bSpS0ykOrZ86ynQRRQ1l9NLn4oM5t/cpvE4hpiZ5wUvuESI1e3SBTFWNUltXPHaiW1oSSv4VlRESxr1/Ml;3:c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7KoHNiI8tH5VUfT+Ps2sYkMZADzFM5GkF1FcyoVOm7Fv0Z8tBpJyOG/L7gdg0rNprIgYdiuaniDvLQOqegBESCjrdgSoZTGAq67WImtSPtud00tcIxmBczkJPAXqXvB7khYVuEDBSf94NHRcgfECntKtI3bFNnylXhnN2PguRB6nJlaTL3PWmyZS8bldc1yIphEBzZ3Um8TDHuMEy/8I/J9yRzsanteh8Ovd8ALckpXR0XSWBkvPk780gtbeW3KYiQCzVQAOVzXYTNi7upPt6a9jEdq6aYfOUSYwyoOWldOpQLnNzreDsEG3391mTRDBv60HfU2TT9MZYC/lIUShL429JNa1TQ+qxdBNfaCpxM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:DM2PR07MB624;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB624; X-Microsoft-Exchange-Diagnostics: 1;DM2PR07MB624;4:DgdFsLydmkb1hhklnINjm2fykp+w+IwZF8ltAVqiZl316AXU4Wr13oYdQPn7Pv/VdAvowV4HBucPdb1uxIBSbW6qHUZgqw9QWVm3tBYnNUbEShQovi8TCBVglfJeZ4Hk82cP2UgYNntGcY78IxXJZGw72TluGIPjzg5UUn1ndcToHl41rOqzBiMTtIWI6rnnoFyHK8sgeIypXoFHGgOq5m15xH4mxlBASz2kZf2ldgfnnyXkDXnoiWINqzhjHpD1FiPFZr3+N77zEXhwu9LS10WBabqlNZMg+UhRU2CPTCboJm0W6SROapUibGjaFqG3g+grBa+fEn/1P9EbFZ3UcfFYxVmijvKr+8Wo/nBiSlNVHVJ4GJZf1V3oskrFfSPI X-Forefront-PRVS: 0896BFCE6C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(40224003)(52604005)(24454002)(81166005)(47776003)(92566002)(46406003)(76176999)(93886004)(50986999)(54356999)(4326007)(42186005)(33716001)(2906002)(66066001)(5008740100001)(77096005)(83506001)(97756001)(110136002)(76506005)(4001350100001)(1076002)(1096002)(23726003)(5004730100002)(33656002)(50466002)(2950100001)(189998001)(586003)(3846002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR07MB624;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR07MB624;23:mnaviNC0f+zwtWUkFMbKzB/5jSia41pJy8YnIVb2QW?= =?us-ascii?Q?E0Ge7g/VsMLwYr5fUVv+DF7poHKnTkr6iLq18bgovXvW1QJkMg9IPYBTQRSE?= =?us-ascii?Q?MLpHWmMZuylJ66lTlABoilAIgzx7dP3fqbM4oHqur6d9dVcvGJ/pA5pQAAB/?= =?us-ascii?Q?YNWATdSQeFFf59eOBHhuqcqdeK3Ktw/yHXEpD3Q1+XbMe/z3TL6pCjojuNL+?= =?us-ascii?Q?0cw/yPficgICoocmrLN9qgO03ufpIBm6x2dYqN2IdU/l9CXvcByvntL81O3z?= =?us-ascii?Q?Ymw5NIghmEUEuP7KlopwUwyJ3F9X08hEOoj8G1Mk3D7GZSdZA1e8qmeFyB6q?= =?us-ascii?Q?eeQgfFsPSOgvsGpvQZQgVp1SLYjf3IvRs718UF5O1tDRHA9OxJmYBJvqrdvP?= =?us-ascii?Q?o62aSDPC27zrCgrLq1KWPKH33hHLHeZKJGfHju3+/UMuIY5YDBWfLpQSeY2F?= =?us-ascii?Q?rnM01bHnZHsl4C/zdbr9aDglUD/7EObcv3xUR32wG+8izk6BMARsAPZar0cE?= =?us-ascii?Q?+PXD/OIIJd/blBdJ3c1C1triMc0K/o4ZtrMRMSP1jewt8wRo4V0zjHOg3+zp?= =?us-ascii?Q?TJaqCqpve+35i9ygbD3I7yoli52xc3LONRDtIPpRH+S7NgWqUOacm1tUdh/m?= =?us-ascii?Q?Bgb7pdoKoEaUsfIAbL6fRDPceNc6wWqeEW/relMoWbznAaLP8SengUztE1Nw?= =?us-ascii?Q?AfvOHyBBTG0xeSjHhJsuSorEcOThUDIIB2k50UBymnx6d4X5FmlUXiNcWOP5?= =?us-ascii?Q?asT0fJKt3PeeFAxl8YwkXrgmXmPTVTwCOs7GkOk/gP1z6imwAuH0TmWVHbLb?= =?us-ascii?Q?9PKpOKYAfi19BtRKU2BHtI2RAn3NnNyr/RQ4lJPZzdXQNHkDdaGmGpEFGw6B?= =?us-ascii?Q?89ABtXgBycwiSgVEqaWHZO4DpLMyrcUXN4X01IZV8HNilmV2+A9bgGqlgJoz?= =?us-ascii?Q?ZScbNe2077rXuMxFnWSowkmAZfpn2WF0477X4Y6xIfJWDtNWqTLfkiD1gdIP?= =?us-ascii?Q?4=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR07MB624;5:oOBORq2fT2ffGjkCyO+dGMRBpEc84moqthK5cAoRTr720VIX9OFtAtuhjY1YdAG0LskQQn22++YFiCe3nD2C2wXhdztP2D8PJoti49yF7yqjvw84TKqJ3IYn74QPTzk69N+f4TicHSAZqzVUAQ6HHw==;24:mbJclXEUdi8eTxM/BXV8UBNuibyRATPLXsNTpP1fnPW6PgQjsSOQpjEgr7AnLtKeFY0HYOHdHXVEsIqV78vBdrRx2M8oMDqeUhdG7NahgP4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2016 12:02:01.1878 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB624 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3808 Lines: 109 On Tue, Mar 29, 2016 at 12:58:25PM +0200, Arnd Bergmann wrote: > On Saturday 26 March 2016 20:36:43 Zhangjian wrote: > > Hi, Arnd > > > > On 2016/3/21 17:43, Arnd Bergmann wrote: > > > On Monday 21 March 2016 10:07:49 Andreas Schwab wrote: > > >> This patch may fix a few LTP tests. > > >> > > > > > > Thanks for analyzing. > > > > > >> diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h b/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h > > >> index 3631903..d1010db 100644 > > >> --- a/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h > > >> +++ b/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h > > >> @@ -25,18 +25,29 @@ > > >> #define __O_NOFOLLOW 0100000 > > >> #define __O_DIRECT 0200000 > > >> > > >> -#define __O_LARGEFILE 0 > > >> +#ifdef __ILP32__ > > >> +# define __O_LARGEFILE 0400000 > > >> +#else > > >> +# define __O_LARGEFILE 0 > > >> +#endif > > >> > > > > > > I guess this means I screwed up when I said I'd merged the kernel patch > > > that Yury did to fix it, sorry about that. > > > > > > We need the patch to make all new architecture in the kernel default to > > > O_LARGEFILE, and not do this in user space. I'd suggest now to keep the > > > patches as part of the ILP32 series after all, to make sure they are > > > merged at the point when they are needed. > > > > I am a little bit confuse about off_t. In "[PATCH 08/33] 32-bit > > ABI: introduce ARCH_32BIT_OFF_T config option", it mentioned that all > > the new 32bit architecture should use 64bit off_t. > > Ah, so it is part of the series. I had not checked that here. > I'm preparing new submission now. I can join off_t, s390 and ilp32 patchsets. It seems, they will not be grabbed separately anyway, so this may decrease confusions like this. Arnd? > > Should we define off_t in aarch64(for both ilp32 and lp64) in > > typesize.h as following? > > > > diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h b/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h > > index 7073493..13b77c5 100644 > > --- a/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h > > +++ b/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h > > @@ -33,7 +33,7 @@ > > #define __INO64_T_TYPE __UQUAD_TYPE > > #define __MODE_T_TYPE __U32_TYPE > > #define __NLINK_T_TYPE __U32_TYPE > > -#define __OFF_T_TYPE __SLONGWORD_TYPE > > +#define __OFF_T_TYPE __SQUAD_TYPE > > #define __OFF64_T_TYPE __SQUAD_TYPE > > #define __PID_T_TYPE __S32_TYPE > > #define __RLIM_T_TYPE __ULONGWORD_TYPE > > > > Then we could remove the __USE_FILE_OFFSET64 in stat.h and fcnt.h in > > aarch64. And truncate and ftruncate is same as truncate64 and > > ftruncate64. > > I don't know what the glibc developers prefer, but I think the > result needs to be something like that: either __OFF_T_TYPE is > defined as you write above as a 64-bit type, or the user-visible > off_t typedef unconditionally uses __OFF64_T_TYPE rather than > __OFF_T_TYPE. > I'm not the glibc developer as well, but I think it's OK. > > Otherwise we need to handle the pad like yury do it in > > stat.h, and we need to handle the bigendian as well: > > I see. > > > @@ -35,12 +35,21 @@ struct stat > > { > > __dev_t st_dev; /* Device. */ > > #ifdef __ILP32__ > > + > > +#if !defined(__AARCH64EB__) > > unsigned int __st_ino_pad; > > +#endif > > + > > # ifndef __USE_FILE_OFFSET64 > > __ino_t st_ino; /* File serial number. */ > > # else > > __ino_t __st_ino; /* 32bit file serial number. */ > > # endif > > + > > +#if defined(__AARCH64EB__) > > + unsigned int __st_ino_pad; > > +#endif > > + > > #else > > This would indeed be silly, we really don't want anyone > to access the old __st_ino field or the 32-bit version of > the offset here. > > Arnd