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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS 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 17868C352BE for ; Thu, 16 Apr 2020 11:39:28 +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 E1FE920656 for ; Thu, 16 Apr 2020 11:39:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qNuZS4a0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jDbwc/Xv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1FE920656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.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=6U9ajhM70sLUgreCebSivdA7nOCSGiWCgfVq5B6XJr4=; b=qNuZS4a0DRDkhw 4hcGw1IysT/9xvW/tR+gYbLVhMbrPEADVZXqwRuN41Chdp0ZqEYN1aWMk0z76oUYbQK6NtIdds1k8 6FwBURFhAwsf/BtsWhua5m2CAjzm6L7MB97xRSsEqVmH6ZFtofazqt8bPSM4TD7TqvQIeyzbm3EXV 73ZOYIlu/3ctP6eOIz76OiP/KA+qz3Wu64AYFeS4PHyZz5Tw8r/1ueoWCV6auVb9mJ7f06ufAZq6l Jerkra7+tvXFqTLdnJGyhx4urkA+xgdj6jo3oWZ9nDCkJJKIljBUcWhb9ytfw9CSeJpdQLYHokQHu CzD2P/4WS3cBPjdpIrQA==; 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 1jP2re-0007Fw-V5; Thu, 16 Apr 2020 11:39:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP2rb-0007FB-EL for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 11:39:24 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 E284B21D95; Thu, 16 Apr 2020 11:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587037162; bh=qcp3Kk6bi7SjnZbnz8tvc9/xDE7T0f554GkHSi26Ygs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jDbwc/XvtbD/uCbHs5vOxwV7XSBoVeKqQIJ4ZJssPOZPrx9oHCKfGZEF46QFrq5le 96XFHzVlVkoTcOPAZvrioHd1PM1rIrrmQPcruKPCh+H7qpHfQZ1/tPx21v54NZCKVT WNBY7WQ5ZwBGhIzYFdaDZ+64X/9o1TEPI0tco/No= Date: Thu, 16 Apr 2020 13:39:20 +0200 From: Greg KH To: Mark Brown Subject: Re: [PATCH 5.6] arm64: Always force a branch protection mode when the compiler has one Message-ID: <20200416113920.GB882109@kroah.com> References: <20200416112430.1256-1-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200416112430.1256-1-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200416_043923_506935_46AB8E61 X-CRM114-Status: GOOD ( 14.30 ) 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: Szabolcs Nagy , Catalin Marinas , linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org 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 Thu, Apr 16, 2020 at 12:24:30PM +0100, Mark Brown wrote: > Compilers with branch protection support can be configured to enable it by > default, it is likely that distributions will do this as part of deploying > branch protection system wide. As well as the slight overhead from having > some extra NOPs for unused branch protection features this can cause more > serious problems when the kernel is providing pointer authentication to > userspace but not built for pointer authentication itself. In that case our > switching of keys for userspace can affect the kernel unexpectedly, causing > pointer authentication instructions in the kernel to corrupt addresses. > > To ensure that we get consistent and reliable behaviour always explicitly > initialise the branch protection mode, ensuring that the kernel is built > the same way regardless of the compiler defaults. > > [This is a reworked version of b8fdef311a0bd9223f1075 ("arm64: Always > force a branch protection mode when the compiler has one") for backport. > Kernels prior to 74afda4016a7 ("arm64: compile the kernel with ptrauth > return address signing") don't have any Makefile machinery for forcing > on pointer auth but still have issues if the compiler defaults it on so > need this reworked version. -- broonie] > > Fixes: 7503197562567 (arm64: add basic pointer authentication support) > Reported-by: Szabolcs Nagy > Signed-off-by: Mark Brown > Cc: stable@vger.kernel.org > [catalin.marinas@arm.com: remove Kconfig option in favour of Makefile check] > Signed-off-by: Catalin Marinas > --- > arch/arm64/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) Now queued up, thanks! greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel