From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [PATCH v5 18/26] arm64: vdso32: Code clean up Date: Sat, 21 Mar 2020 12:06:36 +0000 Message-ID: <20200321120635.GA3052@mbp> References: <20200320145351.32292-1-vincenzo.frascino@arm.com> <20200320145351.32292-19-vincenzo.frascino@arm.com> <158474646622.125146.3263940499372231797@swboyd.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <158474646622.125146.3263940499372231797@swboyd.mtv.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd Cc: Vincenzo Frascino , clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, x86@kernel.org, Will Deacon , Arnd Bergmann , Russell King , Paul Burton , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Mark Salyzyn , Kees Cook , Peter Collingbourne , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Nick Desaulniers , Marc Zyngier Mark List-Id: linux-arch.vger.kernel.org On Fri, Mar 20, 2020 at 04:21:06PM -0700, Stephen Boyd wrote: > Quoting Vincenzo Frascino (2020-03-20 07:53:43) > > The compat vdso library had some checks that are not anymore relevant. > > Can we get the information on why they aren't relevant anymore in the > commit text? I'd rather not find this commit three years from now and > have no idea why it was applied. Good point. But I'd rather say that the original reason for adding them was bogus (ABI compatibility between arm64 compat and arm32, when arm32 vdso never got them). There may be some (very hard to justify) reason to add them if we want compatibility between vdso and syscall fallback on addresses greater than TASK_SIZE. The vdso code generates a SIGSEGV or SIGBUS while the syscall returns -EFAULT. However, you'd have similar mismatch on unmapped addresses below TASK_SIZE which cannot be handled by the vdso (not a simple comparison). I think the vdsotest code should be adjusted accordingly. -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.110.172]:34740 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgCUMGm (ORCPT ); Sat, 21 Mar 2020 08:06:42 -0400 Date: Sat, 21 Mar 2020 12:06:36 +0000 From: Catalin Marinas Subject: Re: [PATCH v5 18/26] arm64: vdso32: Code clean up Message-ID: <20200321120635.GA3052@mbp> References: <20200320145351.32292-1-vincenzo.frascino@arm.com> <20200320145351.32292-19-vincenzo.frascino@arm.com> <158474646622.125146.3263940499372231797@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <158474646622.125146.3263940499372231797@swboyd.mtv.corp.google.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Stephen Boyd Cc: Vincenzo Frascino , clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, x86@kernel.org, Will Deacon , Arnd Bergmann , Russell King , Paul Burton , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Mark Salyzyn , Kees Cook , Peter Collingbourne , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Nick Desaulniers , Marc Zyngier , Mark Rutland Message-ID: <20200321120636.GtnbBYfI6ZjmHmyzInx_iOL3LbOt7gn45Nxv01qS-eU@z> On Fri, Mar 20, 2020 at 04:21:06PM -0700, Stephen Boyd wrote: > Quoting Vincenzo Frascino (2020-03-20 07:53:43) > > The compat vdso library had some checks that are not anymore relevant. > > Can we get the information on why they aren't relevant anymore in the > commit text? I'd rather not find this commit three years from now and > have no idea why it was applied. Good point. But I'd rather say that the original reason for adding them was bogus (ABI compatibility between arm64 compat and arm32, when arm32 vdso never got them). There may be some (very hard to justify) reason to add them if we want compatibility between vdso and syscall fallback on addresses greater than TASK_SIZE. The vdso code generates a SIGSEGV or SIGBUS while the syscall returns -EFAULT. However, you'd have similar mismatch on unmapped addresses below TASK_SIZE which cannot be handled by the vdso (not a simple comparison). I think the vdsotest code should be adjusted accordingly. -- Catalin 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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 43280C4332D for ; Sat, 21 Mar 2020 12:06:52 +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 102D520724 for ; Sat, 21 Mar 2020 12:06:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZVTDaqMv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 102D520724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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=zlLXn3yaD1hcfAlVRXUle46l3prYgmcThbZfVCBoYQY=; b=ZVTDaqMvh0Db1i V029+1U5bylr4X2z+PS9f7EKhM3Wgkq6DbzSa9xuImTemgIupW/MrIlbt6+fYAl7lRFPIAsmaecLe 6ABGt2KYIxrJub7q/9+TK8LOMlYQa9jjgzkfnKCQ+FaCXOxxoifwVyMsXorzTXzflD5YPs9yYHZr7 rESOxbJzpmL6TBktX8aAcReZEa+d8IgXW75pFqQHU9ZcsSb3FMZdFnx/8dWomJYrjLhTsRjhR67tI KExng3BjuIz9AlRNqk/sTQDvi/z3ajgJilIFClyaAn4xww3jIkweWW03xJm4ZNlEGVNjpOwV//ga0 WCUKA8GdXfMV4+tg8q5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jFctr-000732-M1; Sat, 21 Mar 2020 12:06:47 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jFctn-00072N-TL for linux-arm-kernel@lists.infradead.org; Sat, 21 Mar 2020 12:06:45 +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 134EC31B; Sat, 21 Mar 2020 05:06:42 -0700 (PDT) Received: from mbp (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 026A33F52E; Sat, 21 Mar 2020 05:06:38 -0700 (PDT) Date: Sat, 21 Mar 2020 12:06:36 +0000 From: Catalin Marinas To: Stephen Boyd Subject: Re: [PATCH v5 18/26] arm64: vdso32: Code clean up Message-ID: <20200321120635.GA3052@mbp> References: <20200320145351.32292-1-vincenzo.frascino@arm.com> <20200320145351.32292-19-vincenzo.frascino@arm.com> <158474646622.125146.3263940499372231797@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <158474646622.125146.3263940499372231797@swboyd.mtv.corp.google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200321_050643_990811_5A7EE655 X-CRM114-Status: GOOD ( 11.86 ) 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: Mark Rutland , Dmitry Safonov <0x7f454c46@gmail.com>, linux-mips@vger.kernel.org, Vincenzo Frascino , Will Deacon , linux-arch@vger.kernel.org, Marc Zyngier , x86@kernel.org, Russell King , clang-built-linux@googlegroups.com, Ingo Molnar , Kees Cook , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Peter Collingbourne , linux-arm-kernel@lists.infradead.org, Andrei Vagin , Nick Desaulniers , linux-kernel@vger.kernel.org, Mark Salyzyn , Paul Burton 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 Fri, Mar 20, 2020 at 04:21:06PM -0700, Stephen Boyd wrote: > Quoting Vincenzo Frascino (2020-03-20 07:53:43) > > The compat vdso library had some checks that are not anymore relevant. > > Can we get the information on why they aren't relevant anymore in the > commit text? I'd rather not find this commit three years from now and > have no idea why it was applied. Good point. But I'd rather say that the original reason for adding them was bogus (ABI compatibility between arm64 compat and arm32, when arm32 vdso never got them). There may be some (very hard to justify) reason to add them if we want compatibility between vdso and syscall fallback on addresses greater than TASK_SIZE. The vdso code generates a SIGSEGV or SIGBUS while the syscall returns -EFAULT. However, you'd have similar mismatch on unmapped addresses below TASK_SIZE which cannot be handled by the vdso (not a simple comparison). I think the vdsotest code should be adjusted accordingly. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel