Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752018AbdFHPYm (ORCPT ); Thu, 8 Jun 2017 11:24:42 -0400 Received: from foss.arm.com ([217.140.101.70]:53610 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbdFHPYk (ORCPT ); Thu, 8 Jun 2017 11:24:40 -0400 Date: Thu, 8 Jun 2017 16:24:34 +0100 From: Catalin Marinas To: Yury Norov 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: <20170608152434.5jgcrk6jisdaqap7@localhost> References: <20170604120009.342-1-ynorov@caviumnetworks.com> <20170604120009.342-20-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170604120009.342-20-ynorov@caviumnetworks.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2569 Lines: 62 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. > 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; }) -- Catalin