Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9223656ybi; Wed, 10 Jul 2019 06:44:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9GBfaHJjTZ3cNzcmZzOosxRRGGc8scaT3liujFEyDMA1CZ19MD45O4KVEAMv00fkdVq9a X-Received: by 2002:a17:90a:d593:: with SMTP id v19mr7139470pju.1.1562766285834; Wed, 10 Jul 2019 06:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562766285; cv=none; d=google.com; s=arc-20160816; b=IDcqiCprxEK8lyiPbaniJddaj/UFTllc2RvZLwzjCQMzif4aA4xdKRuTUEWMmvYcnt M4YVhny94MoNpCxi/g0STaZNNZ59VQ5fcTvOOlVQM8vIDdh3/9aohVzYxAFNmyaby08Q Hp1sQ/BG8T/7rdSRkpvPfnsFC2exW1qN01gABvv6AfB//SoJ65pKyG5zspkO84K1/9a0 9cJJbrNTsL9sEQ2NugH8uwxsP+k8iAN2F2riaQmHCCIDlRhojYmYF/VQKMVAZjlfm+w9 zBcW4Mgs2zGxYJylIzozrnaDup/qAcVt9tgT1Isk13jl3G454D8brY55Befqkv1aZoUC E0NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=gJ8nSeU8UP9ewlYSAaSEewCtSf1avdlc/jkU0AhIi6Q=; b=Pw4JlSxv0xS54ibLheVUBbE9EAXC7ZmOnWsG8svQSztKTQ6RRSQqJGYKBd/g/laDkE f6/c22/+zE3g8+OIvDGurmqFeVZmmVmd8avoceyjS/mA5fPqz7Qo2bRcy4MqRr8vORDU QMcQ3wWBi/P3YuW4fmTClKGsxvvkUVszB+ao3NauQf1lXpO2FWbqbdX81rzY6bN1TWqc m6nBA4sjU32jLZf8O2ZuE1I0tYha8PBFOIgc+oCGRy5LGKCZcJ1naQkccGAJo/7pGG2w zBXfiFVJ1Jdmfkr12/sOyu22YgrT0VJBpZDY5j5QqJIxXAo9fcuEuPlycL/E7reAGi/8 ZQxg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si2175443plc.54.2019.07.10.06.44.28; Wed, 10 Jul 2019 06:44:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727297AbfGJNm7 (ORCPT + 99 others); Wed, 10 Jul 2019 09:42:59 -0400 Received: from foss.arm.com ([217.140.110.172]:33560 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbfGJNm6 (ORCPT ); Wed, 10 Jul 2019 09:42:58 -0400 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 DB6732B; Wed, 10 Jul 2019 06:42:57 -0700 (PDT) Received: from [10.1.196.72] (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 152993F71F; Wed, 10 Jul 2019 06:42:54 -0700 (PDT) Subject: Re: [PATCH] arm64: vdso: Fix ABI regression in compat vdso To: Will Deacon Cc: 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, catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de, linux@armlinux.org.uk, ralf@linux-mips.org, paul.burton@mips.com, daniel.lezcano@linaro.org, tglx@linutronix.de, salyzyn@android.com, pcc@google.com, shuah@kernel.org, 0x7f454c46@gmail.com, linux@rasmusvillemoes.dk, huw@codeweavers.com, sthotton@marvell.com, andre.przywara@arm.com, luto@kernel.org, john.stultz@linaro.org References: <20190621095252.32307-11-vincenzo.frascino@arm.com> <20190710130452.44111-1-vincenzo.frascino@arm.com> <20190710132532.r27yryvt25ex76xk@willie-the-truck> From: Vincenzo Frascino Message-ID: <4ea8fd8a-c50d-0cb7-af56-5bb90b0e50f8@arm.com> Date: Wed, 10 Jul 2019 14:42:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190710132532.r27yryvt25ex76xk@willie-the-truck> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/2019 14:25, Will Deacon wrote: > On Wed, Jul 10, 2019 at 02:04:52PM +0100, Vincenzo Frascino wrote: >> 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. > > I think you could do a better job in the changelog of explaining what's > actually going on here. The problem seems to be that you're advertising > the presence of a non-existent vDSO to userspace. > >> 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) > > Can't this just be #ifdef CONFIG_COMPAT_VDSO ? > Yes, I realized it after I pushed the patch that CONFIG_GENERIC_COMPAT_VDSO can be removed. Posting v2 shortly. > John -- can you give this a whirl, please? > > Cheers, > > Will > -- Regards, Vincenzo