Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751461AbdFHXGd (ORCPT ); Thu, 8 Jun 2017 19:06:33 -0400 Received: from mail-co1nam03on0074.outbound.protection.outlook.com ([104.47.40.74]:62543 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751132AbdFHXGa (ORCPT ); Thu, 8 Jun 2017 19:06:30 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; Date: Fri, 9 Jun 2017 02:06:16 +0300 From: Yury Norov To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Andrew Pinski , Heiko Carstens , Chris Metcalf , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Bamvor Jian Zhang , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Subject: Re: [PATCH 19/20] arm64:ilp32: add vdso-ilp32 and use for signal return Message-ID: <20170608230616.2mi6w6llskl35bh4@yury-thinkpad> References: <20170604120009.342-1-ynorov@caviumnetworks.com> <20170604120009.342-20-ynorov@caviumnetworks.com> <20170608152434.5jgcrk6jisdaqap7@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170608152434.5jgcrk6jisdaqap7@localhost> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [31.204.170.137] X-ClientProxiedBy: AM5PR0402CA0023.eurprd04.prod.outlook.com (2603:10a6:203:90::33) To DM2PR0701MB1280.namprd07.prod.outlook.com (2a01:111:e400:5118::18) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0701MB1280: X-MS-Office365-Filtering-Correlation-Id: 9d9c791d-3b3c-4d7b-cb73-08d4aec2fd5f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:DM2PR0701MB1280; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1280;3:4D9Edck0wCMzfC1+fR9T9QtBu78ywFhzese4ElzE8fVMWKKNroOq1Acg+rV3VlG2sfc4IDpsRCrlmzXdCyNOfCju3epidzEFB+pmCplu4HGNAYX3fTufBdTkRuGyql/sgLVyQIe7r/m5aNvdrpxjiR1wa/JwkbBuIsYb91zFGzpCaEuu5pSETvFJ6p0S0vpjv+o7MNwuD6FXvaiYX8ynFaFmhoxJBNuXvFQ7LBdbe+KsJ9MCPZ0/nJRb9yNveAKg3s4Z635Qfxgyq1c+Bok/XH7gf1kNoYC3DqTX3bVdBB8ev6y4h0GQ5wTvUuLqyCFxILYE64Z8g98rKMGNoy03FQ==;25:YgzlZNOSfXhYK5F7vTRxQm2bKPypPPQcsMe4E/dYGR9Rxm0UnJPVwN264LGAvYhm48e63i3OVa/PO9AjJOGIBi+OEWSPIjSJjbt7/Ks1a+aWIr/qqnlgFon/gbe6ArfHE/bz1ZaoTPzeZGy2aFc6BKu+NokfV919LMJvRHtcjnUZvlskEqlm8Ee/hR0ZRsRrfHC5tqKAieY+soajoGx/T+NYw9zadJ4RFYW1/IvokQm4Q436IlPMM3Mt9QEPeB+qmaqjuayD4Zq5ZcV3vr3uNa6YczgCRqosmjE/bSe9zuRsw/litl3CsTaj2b+LNRruo6PvtXoYssDLeH32TUPrj50KxikYiUx5d/pGjMxwcvPZg23Qcfe2QNzCBw872bicl8HHPZnzB4AnZ/v97l4uN8Oh+JlCzKh0Gfc/rDtolB+OqUJ2pJPLMiHGqn2swDLO/9ICrtdF3L5Zb06TDQIEm0+xmpqlCjTzXjD4MOSb0sY= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1280;31:oEyO9YFVLalQtOuWyyJmPvi/X9/ur4fbI4h1fYUNNvB1Ko1aWZJ+ZaX2Z20tF2/fyFcqXl+IkGJFBvWVPq2ZsL6pdJm5kcngmJCLsZSyxly9Q20C+MRQ8IM8hZd7XJAamabqRL4rIHewTNWcBkQ203IRJo/KJXD9FGLXNFW6kqpqBHOQlYpcl7b4OuxbPF9mnmBWmZaWkmBsi53YQ+SEKKjXfgSqFHaFkVFttedrNCU=;20:5nTWgpVBYidH+NJuOUSm73gnIVYvMb22K2EchaCcRrwbSC931gT1PljMO/dpEvgch5qVeEYk2poWDAllV9iR8H+wG++b5FI1Epzm55lnfGuswHa5CqV4ORMQC6U6k7uTyBKb1195Y1ddNoh7CKzxCJIkscqWysOoHQ9NIqrgVjWtApQQbhlhkYoRKDcXEEKBkK7iXOMVURrMCyuxk+I/KzR0vdAO+atoSoAPA3KXZjSt7kuSyAMxGgJ5VAH+IVn15iBDXV8B57mVp1rnWsm1VKAx330ysBVg7D82A7tp66BesjPlUov7c+/v2S0BaKvDAxPizBt/iufEkCeJdMlVPGIPAgJ25hwFu9tVPYY/RWyvIgoDG0+kmk30o3aWr8TNjUHO9t+2qRkbt/oLv9I3iOO4B5J/uSoqFQHb8Vt0IsoqPpG3NTNn0x5qiWpcuWE8ZHoXf6drG4q0Sg/RlKxmywqw1Vatl50cgQ3nu1gDw1/UhGzbIuGkaSWCZGr8sDg0VgP8foy/DaEzaDfdmUaiq5rtTr5x/NtXWjA3rOALwxcQR/fPFIa7/Aj6iP/R3fmFJoEDS1TbkcAi7tALeBTpmfHLwhpP9V/xa5uhIufy0mg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(278021516957215); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0701MB1280;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0701MB1280; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0701MB1280;4:vn5sYK6STA7mHrjABw/yDW8PefWX+CGqxeARPFpb?= =?us-ascii?Q?btIkpCvjbuiHyd4gEasml/wnx4RlARGml4ecKBOVeNfJ0kvzR3JVvWG0hv3a?= =?us-ascii?Q?NnNNrE1DiklnWZXN1FrlQHAS8MZYnSd9oeq3BaawppZ1yaIYgTaIwMzMyWLd?= =?us-ascii?Q?8Wj4vtMyHzjtPuUUNOTwCw+rfxQiBcocq/3lwbgtWH2JZ+KK2So7o3dyKbWk?= =?us-ascii?Q?QEK7uskAqiWlSObdFsvGTKM12IMRJrTKwo5pR7dUiDsQbkTfpZP5wXM7DcU4?= =?us-ascii?Q?eobdw9JujWBmLZEQ+FVrUFB/5sFxP7pDU4a583gLHj29S1zs6cuYxC3tQ08V?= =?us-ascii?Q?VC+dSSmzKxPy88OSMGsK2XwWeQeo8cglOPfufcLdDbc38hm4QNjbmitnOFOU?= =?us-ascii?Q?1A3+xayTQzdVXm9WeU/0XDGhR4sQJPFhobc8LFFC1Vn/cJno7ZuQcp4Bz7Zw?= =?us-ascii?Q?TTnlA4N2VGJx8jjA22GI6cnseYGhKA6YsaYuJjQELIDWUrIxkkIKLJUG5g5o?= =?us-ascii?Q?Hp7FcWIZTKirXhw2U/gF+jOyKTn50bZKXZsRf8sqcO6eS1A+wFporBA7fW6m?= =?us-ascii?Q?H6asm6OCK8+i0ZeEmzmqqMSZ7Op4b6KqTK120G01T8WhmhQiz55rnIjRPdGM?= =?us-ascii?Q?fJBOjcC95CqMZn7049UsKzgSXEP8mLkULInvIw+fz2zzBhrpQUoXozPfgUYm?= =?us-ascii?Q?oEvKIk7q+MJqezcUps4qa/Dmatwq2p0fi5AE7afUfibaAs8PF3U0n7ogw1kZ?= =?us-ascii?Q?rHzHriI6UDN27sn1XX1r2OuGHHlsf0+YeDWANED5mWwLB1hZDeZXqipEF/EK?= =?us-ascii?Q?I5cZdEVvMGoOjJ8gKueXSVIVu3Ub1m+qU1s4TYlLJW/IbWwKaSjAysgJFWMx?= =?us-ascii?Q?wX6B5WxCAt+Xwxj5OxB40SnZrQTvrUNITkNLwWz7jWGx++9fE6Fs7sXSN2F5?= =?us-ascii?Q?N4eHq4yo1bzhzhh9ZmPrSuagPMDPSvmKYRY2wFTKWz9GOKq/BGa5t/Ory5yQ?= =?us-ascii?Q?tICyNJkGSi4RP9zDDjnSSYL36JLSdHfNUEMp4cBrmAIM0opgZJocig7BSkRq?= =?us-ascii?Q?EBJ0LVySCuenMcDTcEkuhedhjKcFY2K3ow5NZe3lA3MzbbYzXpT3ms13a0PQ?= =?us-ascii?Q?XTMiIIyuXkK9jI1fxIM0NOrv50MckyYVC5auk2w19O/V6GugKEhh3a3Iyhg2?= =?us-ascii?Q?Pcv8EBATZEyvLNX06i4dNewS6NLxLzRu48AT?= X-Forefront-PRVS: 0332AACBC3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(24454002)(4326008)(7416002)(7406005)(8676002)(81166006)(33716001)(2950100002)(6916009)(42882006)(561944003)(33646002)(1076002)(6666003)(23726003)(6496005)(25786009)(3846002)(966005)(6486002)(6246003)(9686003)(53936002)(189998001)(38730400002)(6306002)(7736002)(42186005)(305945005)(72206003)(47776003)(54906002)(50986999)(54356999)(2906002)(229853002)(76176999)(76506005)(110136004)(66066001)(478600001)(5660300001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0701MB1280;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0701MB1280;23:HXu2lYn5LBsNObdF8AF8u32qg1q47kqY8RItP4l?= =?us-ascii?Q?pOgUoXZClVi9FcZC4i5lulmq1ukDe1vAGjm8Aq71hpnytEiuamqIxPegt6w5?= =?us-ascii?Q?cqZtQ0qu4U3YxY3vFM+t9Vai76FJK4CfPSDJbzn7zj6qYpL6KL8mrCkR2k3x?= =?us-ascii?Q?OAyrXY0b00Hzbk4JBryRhf9MlMJpDuSZ/Q319yXF2RplqOhzciosdNqnmpEy?= =?us-ascii?Q?dGcqcOxmvPgAJ3Ahf4A7v0++AflxYSRDhS0oaSaUTRsGRJVUs+9O2Uf1JpYd?= =?us-ascii?Q?J23h6LL7Rihytx0RjWbuvhRP7aUAOncfO3w/k5JVYAELHR5HJPkk8t9zaSQr?= =?us-ascii?Q?w0ES2rpYeBCYyY5mAsRAYe7mYW5a/MjWTfLn4l2wo+Z6BIgkQxjurgoDxDJq?= =?us-ascii?Q?UooKrqDbrm3ZLGVVBrBBCodHBBAs2QEW5bbfs6/fhxL80bxrSZtqmcD7tpxO?= =?us-ascii?Q?7MLWh8/8Czj6pA03RgSNlCYZfcrurx6pYrF8TLUCzXwoTuNlEYu41fpYy4Jm?= =?us-ascii?Q?A4JzG3dCyEgvneAx8dNg6XLLfpWL5vFsTImjkl2r0lLQz9729gKlMybxD9HJ?= =?us-ascii?Q?4bdWIEPHJazLnxC82RsFLhAPgggltS/ile5qNWGHTpZS5K+vAIj2loa0oIAM?= =?us-ascii?Q?sgwrpBLiQipTfCNXrd+cueufkTgmykD3rTt4SLAtOInuXEtwv9Kk/l0hhIKS?= =?us-ascii?Q?yJglfS3OxV8EBkRns0pcGNWGJGOqzqee1t6za2+qDCAb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Vj0L0onlb9UGoLDS9IXwanxS3MKPlSX8WHuqDractwdPAqPjsfc+I4sz06oJVQSRmkZvTYMTamLBSGuU4MAxhgDKctZw== X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1280;5:QguWF2Uub3EPsNH3PuYDqJtKu788netDJzuRK9dFHgjpdveR3yZqwseAnTRpyMB7EMaMalvzoGwkHdhWOpAO0EAr7pA4vkJPCa5zdU+9UdhizlccUBuvQuzQGS7/2XjCYkbrGr7h3YSpd2/swkAJxHtQsszHajPZUBjSUVH5ck1UxF8cd69o9jDCBBc/K7BnxsTo5zDc5l3kIHuwNLbeQ8jXLt6gryicEN628QGJeC4utjU8ct02qBuDSPgGxiAmsTs8cGxH8/brtNGXABBqIErW1muoX362BO2Zi8y79v2xrH0jsQGqozE3EuUKjzRN9WB9/CGNPV+v4zqO6nKQGVr6G/2Vms+xXy2kT0vTev7Ynwb7UO0EzG8q9RV7HEINQmGyG67oOHQO4ZpsHpq1xccZLD+0bzN90lF4S5bCpnV0k70Pcvt+FHEeyXpyvFQggaKXZaJYsxPRHz3YlqBP7zfvuFbhy3ExgTZju1WJUEZ7uznC1HbX8Ego9mpf3elW;24:kwWeV37xxSPM8mmSxzoWhcLWv53ZG8UGeLI5iYw7nLEDbnpvNv0SweE7y7Wyp3+4kNhPTkGFbZKqn7Ft28DjHQOMJ6gOlbsUjrgDZ8CtoG8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1280;7:sCsSGk0kT8LYkJmoL2LU93zqGQMt5lt/uKBKlc2mUXTK4qDDR9QXZyCrFnMWMGNk/vvjfuoeL/PB2pf2QNAKB9bMLq/B1futStMyklL7yy8XoQwrhHZGwL5b5F1pDm565SyYop4p6xckukNst7kLW1deTtXWtCsUFYyvekNGfdvdg/Lpe67f2APuceI7J07N+JSE3HRneIk02v/V86vgzAzVOcAfTjL3RctJYFwIAS0uZXuvRZs/MWn3+z6qfsMwcUevap3IZoAlnrO3quplTh5/oYI1X+JMRam5QNlh+ST/Nrbo7YGbQG+Wqpxsz1n/kc2gEIlAS+Bo9xLGwt6SzQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 23:06:26.0572 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1280 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3222 Lines: 70 On Thu, Jun 08, 2017 at 04:24:34PM +0100, Catalin Marinas wrote: > On Sun, Jun 04, 2017 at 03:00:08PM +0300, Yury Norov wrote: > > From: Philipp Tomsich > > > > ILP32 VDSO exports following symbols: > > __kernel_rt_sigreturn; > > __kernel_gettimeofday; > > __kernel_clock_gettime; > > __kernel_clock_getres. > > > > What shared object to use, kernel selects depending on result of > > is_ilp32_compat_task() in arch/arm64/kernel/vdso.c, so it substitutes > > correct pages and spec. > > > > Adjusted to move the data page before code pages in sync with > > commit 601255ae3c98 ("arm64: vdso: move data page before code pages") > > > > Signed-off-by: Philipp Tomsich > > Signed-off-by: Christoph Muellner > > Signed-off-by: Yury Norov > > Signed-off-by: Bamvor Jian Zhang > > --- > > arch/arm64/Makefile | 3 + > > arch/arm64/include/asm/vdso.h | 6 ++ > > arch/arm64/kernel/Makefile | 1 + > > arch/arm64/kernel/asm-offsets.c | 7 ++ > > arch/arm64/kernel/signal.c | 2 + > > arch/arm64/kernel/vdso-ilp32/.gitignore | 2 + > > arch/arm64/kernel/vdso-ilp32/Makefile | 80 ++++++++++++++++++++++ > > arch/arm64/kernel/vdso-ilp32/vdso-ilp32.S | 33 ++++++++++ > > arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S | 95 +++++++++++++++++++++++++++ > > arch/arm64/kernel/vdso.c | 65 +++++++++++++++--- > > arch/arm64/kernel/vdso/gettimeofday.S | 20 +++++- > > arch/arm64/kernel/vdso/vdso.S | 6 +- > > 12 files changed, 304 insertions(+), 16 deletions(-) > > create mode 100644 arch/arm64/kernel/vdso-ilp32/.gitignore > > create mode 100644 arch/arm64/kernel/vdso-ilp32/Makefile > > create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.S > > create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S > > Does this patch get simpler with Andrew Pinski's vdso in C proposal? > I have to read the other thread in detail, Will followed up already. Not much. arch/arm64/kernel/vdso/gettimeofday.S is removed by Andrew, so it will also disappear here. New gettimeofday.c is just compiled with mabi=ilp32, and almost don't need modifications. Makefiles will be modified accordingly. The rest is the same. This is the draft for the changes we need to apply ilp32 series on top of Andrew's patch (there's few typos though, so only for reference): http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1409447.html > > diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h > > index 839ce0031bd5..649a9a416500 100644 > > --- a/arch/arm64/include/asm/vdso.h > > +++ b/arch/arm64/include/asm/vdso.h > > @@ -29,6 +29,12 @@ > > > > #include > > > > +#ifdef CONFIG_ARM64_ILP32 > > +#include > > +#else > > +#define vdso_offset_sigtramp_ilp32 > > +#endif > > BTW, here you could do something like: > > #define vdso_offset_sigtramp_ilp32 ({ BUILD_BUG(); 0; }) OK, will change