lkml.org 
[lkml]   [2019]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    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@arm.com>
    AuthorDate: Fri, 21 Jun 2019 10:52:40 +0100
    Committer: Thomas Gleixner <tglx@linutronix.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@arm.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Tested-by: Shijith Thotton <sthotton@marvell.com>
    Tested-by: Andre Przywara <andre.przywara@arm.com>
    Cc: linux-arch@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kselftest@vger.kernel.org
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Paul Burton <paul.burton@mips.com>
    Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
    Cc: Mark Salyzyn <salyzyn@android.com>
    Cc: Peter Collingbourne <pcc@google.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: Dmitry Safonov <0x7f454c46@gmail.com>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Huw Davies <huw@codeweavers.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 \
    \
     
     \ /
      Last update: 2019-06-24 03:42    [W:4.047 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site