[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-1e3f17f55aec6510f88ff65dcbaae13435af0ba6@git.kernel.org>
Date: Sun, 23 Jun 2019 16:53:11 -0700
From: tip-bot for Vincenzo Frascino <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: andre.przywara@....com, vincenzo.frascino@....com,
sthotton@...vell.com, huw@...eweavers.com, arnd@...db.de,
linux@...musvillemoes.dk, salyzyn@...roid.com,
0x7f454c46@...il.com, mingo@...nel.org, shuah@...nel.org,
hpa@...or.com, paul.burton@...s.com, linux-kernel@...r.kernel.org,
linux@...linux.org.uk, ralf@...ux-mips.org, tglx@...utronix.de,
will.deacon@....com, pcc@...gle.com, daniel.lezcano@...aro.org,
catalin.marinas@....com
Subject: [tip:timers/vdso] arm64: elf: VDSO code page discovery
Commit-ID: 1e3f17f55aec6510f88ff65dcbaae13435af0ba6
Gitweb: https://git.kernel.org/tip/1e3f17f55aec6510f88ff65dcbaae13435af0ba6
Author: Vincenzo Frascino <vincenzo.frascino@....com>
AuthorDate: Fri, 21 Jun 2019 10:52:40 +0100
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 22 Jun 2019 21:21:09 +0200
arm64: elf: VDSO code page discovery
Like in normal vDSOs, when compat vDSOs are enabled the auxiliary
vector symbol AT_SYSINFO_EHDR needs to point to the address of the
vDSO code, to allow the dynamic linker to find it.
Add the necessary code to the elf arm64 module to make this possible.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Shijith Thotton <sthotton@...vell.com>
Tested-by: Andre Przywara <andre.przywara@....com>
Cc: linux-arch@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-mips@...r.kernel.org
Cc: linux-kselftest@...r.kernel.org
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Russell King <linux@...linux.org.uk>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Paul Burton <paul.burton@...s.com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Mark Salyzyn <salyzyn@...roid.com>
Cc: Peter Collingbourne <pcc@...gle.com>
Cc: Shuah Khan <shuah@...nel.org>
Cc: Dmitry Safonov <0x7f454c46@...il.com>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Huw Davies <huw@...eweavers.com>
Link: https://lkml.kernel.org/r/20190621095252.32307-14-vincenzo.frascino@arm.com
---
arch/arm64/include/asm/elf.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index 325d9515c0f8..3c7037c6ba9b 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -202,7 +202,21 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG];
({ \
set_thread_flag(TIF_32BIT); \
})
+#ifdef CONFIG_GENERIC_COMPAT_VDSO
+#define COMPAT_ARCH_DLINFO \
+do { \
+ /* \
+ * Note that we use Elf64_Off instead of elf_addr_t because \
+ * elf_addr_t in compat is defined as Elf32_Addr and casting \
+ * current->mm->context.vdso to it triggers a cast warning of \
+ * cast from pointer to integer of different size. \
+ */ \
+ NEW_AUX_ENT(AT_SYSINFO_EHDR, \
+ (Elf64_Off)current->mm->context.vdso); \
+} while (0)
+#else
#define COMPAT_ARCH_DLINFO
+#endif
extern int aarch32_setup_additional_pages(struct linux_binprm *bprm,
int uses_interp);
#define compat_arch_setup_additional_pages \
Powered by blists - more mailing lists