From patchwork Wed Jul 10 13:04:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 11038465 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A974F112C for ; Wed, 10 Jul 2019 13:05:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B19E286E6 for ; Wed, 10 Jul 2019 13:05:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F14828837; Wed, 10 Jul 2019 13:05:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 430AB286E6 for ; Wed, 10 Jul 2019 13:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+zImXNk5Q3SwBdskQDGN7p5Ox3/uE93JI6V68eHLHp0=; b=bPkZQ8ppOwF9ni fKN0ns1G/AbBYjjwuWjmQUsA+5CeeXcGMmOFBcZ6PWBq9KMKF56584sedlpBYqcwik4VQE/KohEdM ERe1Fv3zp6zVbXxT/vYf/fXIUHw0diOheFzctlCDBxzL0Ii09YgePegPygplDmNSLHu9NoP7htFJU Asspx9anpfUGJ5AyLglVaIb/VZhEE2YIanVlzc18ORfbN4DrgxieZ5ZwZb5KU9iSpQ6/h3Cm/McQU Ze1wd4eReGHoHpf0hyD85n+Wu4m9zP+nsI+voa2CMRDzyW9HhrYJ4hKzfAJu/cdmg8bQOQHetjbQM nbCLQRtLZYWYuEH2fRrg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hlCHY-0003ct-HF; Wed, 10 Jul 2019 13:05:12 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hlCHW-0003cC-5u for linux-arm-kernel@lists.infradead.org; Wed, 10 Jul 2019 13:05:11 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5893A2B; Wed, 10 Jul 2019 06:05:08 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 846A43F738; Wed, 10 Jul 2019 06:05:05 -0700 (PDT) From: Vincenzo Frascino To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH] arm64: vdso: Fix ABI regression in compat vdso Date: Wed, 10 Jul 2019 14:04:52 +0100 Message-Id: <20190710130452.44111-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190621095252.32307-11-vincenzo.frascino@arm.com> References: <20190621095252.32307-11-vincenzo.frascino@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190710_060510_271166_9FB13598 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shuah@kernel.org, andre.przywara@arm.com, arnd@arndb.de, huw@codeweavers.com, catalin.marinas@arm.com, daniel.lezcano@linaro.org, will.deacon@arm.com, linux@armlinux.org.uk, ralf@linux-mips.org, salyzyn@android.com, luto@kernel.org, paul.burton@mips.com, john.stultz@linaro.org, 0x7f454c46@gmail.com, linux@rasmusvillemoes.dk, tglx@linutronix.de, sthotton@marvell.com, pcc@google.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Prior to the introduction of Unified vDSO support and compat layer for vDSO on arm64, AT_SYSINFO_EHDR was not defined for compat tasks. In the current implementation, AT_SYSINFO_EHDR is defined even if the compat vdso layer is not built and this causes a regression in the expected behavior of the ABI. Restore the ABI behavior making sure that AT_SYSINFO_EHDR for compat tasks is defined only when CONFIG_GENERIC_COMPAT_VDSO and CONFIG_COMPAT_VDSO are enabled. Reported-by: John Stultz Signed-off-by: Vincenzo Frascino --- arch/arm64/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 3c7037c6ba9b..b7992bb9d414 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -202,7 +202,7 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; ({ \ set_thread_flag(TIF_32BIT); \ }) -#ifdef CONFIG_GENERIC_COMPAT_VDSO +#if defined(CONFIG_COMPAT_VDSO) && defined(CONFIG_GENERIC_COMPAT_VDSO) #define COMPAT_ARCH_DLINFO \ do { \ /* \