Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1866540ybd; Sun, 23 Jun 2019 18:44:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwi4xkMmQ9RKQniWNMFaVg+ingIQyk981Byn7mIrwCtsuCzVgcKWXQ3vz0AQ9Hw37KhMmu X-Received: by 2002:a17:90a:8d0d:: with SMTP id c13mr20850190pjo.137.1561340649054; Sun, 23 Jun 2019 18:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561340649; cv=none; d=google.com; s=arc-20160816; b=nhVOGYuyV9wr0i9jHBSCPh2WkYFTtcL+/4LN7V+BrgYmnPtNxxBXHyfe/FdhxtVRGd e/T9yDUANpKYNlfFoCGLIstIZTxGBzlHH2EsE8xx6/y6f3r5tUV8L/gosY6A3laA9EOm 7zNcCNMwcr0gnPN7Rrx2ud2AGttP9+1kzf53mYj7oJDwhBaOJZbhfdGdhXoaQkvM1QfV vKbgoZ3yQw2Ex3m54K+kJTripgDHgb3v7JPEQsMZRAkyw26oIymiw6FbIPWWEi+IaELo 9RPttA59G60yIwydJWK9i+zg9LGBXTWBllBUTeq2z6Edm7dB7TE9rWpQckHssyT6vYBV Ytkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=edl4mcIV9KIInPAdE5Cm1ulGFQS5zNDKqOxX+yAEMWk=; b=SrUwgpYoBxUiJFSnGU18Tt0UMByNxSRwo4p6PSzYWf4SSLWnGRx3wSjU+np9j2BGWk SIpMgyaXgaV7EJVIvy0fSadoUycyUc7COv00XOTr/T4VC/OgGX5NhWb0IO7Y1fQIgxgN 53YrOF9Sudp1WBu7qWjorzHiCNw9MUX5IKAyT5Zk+a4kwPGgKujZuYefxtQwI49PYWNi xX/2nv3St9skF0f4oK+DDf2ohWjngNY8saxTYyYxFU+BOU/hi9PTg24OJgYNy7jvFjJB S/KDxQxYT6rzyov955BbDqocjQKKwbRHh/6U6j52Ri8HgBBmGWFbKhxH3U4tUTsXe59N 78vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=XUorqbSn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si9010068pgh.30.2019.06.23.18.43.53; Sun, 23 Jun 2019 18:44:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=XUorqbSn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbfFXBlr (ORCPT + 99 others); Sun, 23 Jun 2019 21:41:47 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43987 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbfFXBk5 (ORCPT ); Sun, 23 Jun 2019 21:40:57 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x5NNrCnR2859711 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 23 Jun 2019 16:53:12 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x5NNrCnR2859711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1561333993; bh=edl4mcIV9KIInPAdE5Cm1ulGFQS5zNDKqOxX+yAEMWk=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=XUorqbSn5dewYUPpr08alpXyQq77DD/dZO+CuuSLaenCD6o2UPxnsN7jp4M4d6iCX Wd0bNL0NwZ7IjlIRVocXD6DR7oHcyg52g2NSfS0dcfXaOjd4lJrDixAdbPk9JamU06 9t314WaNiCKzmT3bISwYmEm0q2MmfsBcOLKOt8/fMkFAhPNz7/ERXIPo6RqP81Nhc+ ja67svlfQ8749/uAjrJ9b7I34zQFkmazQ6ecMoR0ncF9LMK9h9C4UL8nws60t2eCW4 29v33liZMAXqZLfjJ5m4YkPY7fk/YXN+Ivj2s5t8pEsFXsr+INS2REjpyo4LDVEgiC 2TthAmjeC0Eqw== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x5NNrBsK2859708; Sun, 23 Jun 2019 16:53:11 -0700 Date: Sun, 23 Jun 2019 16:53:11 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Vincenzo Frascino Message-ID: Cc: andre.przywara@arm.com, vincenzo.frascino@arm.com, sthotton@marvell.com, huw@codeweavers.com, arnd@arndb.de, linux@rasmusvillemoes.dk, salyzyn@android.com, 0x7f454c46@gmail.com, mingo@kernel.org, shuah@kernel.org, hpa@zytor.com, paul.burton@mips.com, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, ralf@linux-mips.org, tglx@linutronix.de, will.deacon@arm.com, pcc@google.com, daniel.lezcano@linaro.org, catalin.marinas@arm.com Reply-To: mingo@kernel.org, 0x7f454c46@gmail.com, hpa@zytor.com, shuah@kernel.org, arnd@arndb.de, sthotton@marvell.com, huw@codeweavers.com, vincenzo.frascino@arm.com, andre.przywara@arm.com, salyzyn@android.com, linux@rasmusvillemoes.dk, daniel.lezcano@linaro.org, pcc@google.com, catalin.marinas@arm.com, ralf@linux-mips.org, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, paul.burton@mips.com, will.deacon@arm.com, tglx@linutronix.de In-Reply-To: <20190621095252.32307-14-vincenzo.frascino@arm.com> References: <20190621095252.32307-14-vincenzo.frascino@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/vdso] arm64: elf: VDSO code page discovery Git-Commit-ID: 1e3f17f55aec6510f88ff65dcbaae13435af0ba6 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=2.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_03_06,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, DKIM_VALID_EF,FREEMAIL_FORGED_REPLYTO,FREEMAIL_REPLYTO_END_DIGIT autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 1e3f17f55aec6510f88ff65dcbaae13435af0ba6 Gitweb: https://git.kernel.org/tip/1e3f17f55aec6510f88ff65dcbaae13435af0ba6 Author: Vincenzo Frascino AuthorDate: Fri, 21 Jun 2019 10:52:40 +0100 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara 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 Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies 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 \