From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9A11C74A23 for ; Wed, 10 Jul 2019 13:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 830682084B for ; Wed, 10 Jul 2019 13:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562765142; bh=TvIYigy0Bf458ARoYJR+lIAzAVW32Q+zCs3htN50YFE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=lR2AU+txbL4SrvMM9UQj4AAgqvWO4pLh/2cdnZT+lVRIf0AZ3+F0rW8mTS4dByVo1 p2BslJCoV2uBqZlAFIXkGHCY8HBJ37G8aA1PN1pDG+p9uOoOv/oLQe31u/fZYHY+tY 4J/DCP4cGSiF4+XNXQRMWwxohw/QXsEBxh1d57tI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727523AbfGJNZl (ORCPT ); Wed, 10 Jul 2019 09:25:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:46454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726708AbfGJNZk (ORCPT ); Wed, 10 Jul 2019 09:25:40 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D787A2064B; Wed, 10 Jul 2019 13:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562765139; bh=TvIYigy0Bf458ARoYJR+lIAzAVW32Q+zCs3htN50YFE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eX9ZzqH6pqN88Uqghq+OYeQgOiUPblilOt1ruqmmlPIMENmN+dxYtWWv3Yq2amFbI LDtJTQQ1b/um0wiQeYo/JHi4IeBRalMLwk/LB26dPlW6rtCF/OFhonm3olB3u1SwY7 rnSwgLdcakjndWNB0IxuKSgaOAGdD0NYXVF4OaBs= Date: Wed, 10 Jul 2019 14:25:33 +0100 From: Will Deacon To: Vincenzo Frascino 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 Subject: Re: [PATCH] arm64: vdso: Fix ABI regression in compat vdso Message-ID: <20190710132532.r27yryvt25ex76xk@willie-the-truck> References: <20190621095252.32307-11-vincenzo.frascino@arm.com> <20190710130452.44111-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190710130452.44111-1-vincenzo.frascino@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? John -- can you give this a whirl, please? Cheers, Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D62A6C74A22 for ; Wed, 10 Jul 2019 13:25:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEB462084B for ; Wed, 10 Jul 2019 13:25:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZChenflw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="eX9ZzqH6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEB462084B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B6cS1IZlNOpImbqgMIxlUBzbjhbBHktvrHx167ryL4U=; b=ZChenflwb2tQml MeMAAnwQjAgDxfrIgBjqkW9Rnp0obA36R3HfmEf44ECmI5E6DGYmL1IcQBGB9p6pv01IIjiO1OITP KPwvHSHGwCQgRV5h5mrQ5p55mS/ZGKmD1QXyGfYx/gghpa0ZOT3Ed8vdjISUtC8DbVAqz5XFzXsux 1LBKrB9OVaH8CKI6urls1cYUzB2wJecojAjDnFhWxp0ceGo8ZJK2KmreZ+sHvWboEMA94s7o5Z7mn rSd9tJNvtJoeFOytpUhK2exm6c1u0ffL01AyLrdyDQXyYfPO+qCZAEBWct5yKFPm7DNumJ9OMWrMN +PnGMOfJ3mU27WLMw55g==; 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 1hlCbP-0002CA-Nt; Wed, 10 Jul 2019 13:25:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlCbM-0002Bj-3G for linux-arm-kernel@lists.infradead.org; Wed, 10 Jul 2019 13:25:41 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D787A2064B; Wed, 10 Jul 2019 13:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562765139; bh=TvIYigy0Bf458ARoYJR+lIAzAVW32Q+zCs3htN50YFE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eX9ZzqH6pqN88Uqghq+OYeQgOiUPblilOt1ruqmmlPIMENmN+dxYtWWv3Yq2amFbI LDtJTQQ1b/um0wiQeYo/JHi4IeBRalMLwk/LB26dPlW6rtCF/OFhonm3olB3u1SwY7 rnSwgLdcakjndWNB0IxuKSgaOAGdD0NYXVF4OaBs= Date: Wed, 10 Jul 2019 14:25:33 +0100 From: Will Deacon To: Vincenzo Frascino Subject: Re: [PATCH] arm64: vdso: Fix ABI regression in compat vdso Message-ID: <20190710132532.r27yryvt25ex76xk@willie-the-truck> References: <20190621095252.32307-11-vincenzo.frascino@arm.com> <20190710130452.44111-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190710130452.44111-1-vincenzo.frascino@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190710_062540_201911_8024748E X-CRM114-Status: GOOD ( 16.47 ) 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: luto@kernel.org, linux@rasmusvillemoes.dk, catalin.marinas@arm.com, will.deacon@arm.com, linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, linux-arch@vger.kernel.org, daniel.lezcano@linaro.org, linux@armlinux.org.uk, arnd@arndb.de, andre.przywara@arm.com, john.stultz@linaro.org, 0x7f454c46@gmail.com, tglx@linutronix.de, pcc@google.com, linux-arm-kernel@lists.infradead.org, huw@codeweavers.com, linux-kernel@vger.kernel.org, ralf@linux-mips.org, salyzyn@android.com, paul.burton@mips.com, sthotton@marvell.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 ? John -- can you give this a whirl, please? Cheers, Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel