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=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,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 1B342C2BA19 for ; Thu, 16 Apr 2020 01:51:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4754206D6 for ; Thu, 16 Apr 2020 01:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587001886; bh=1OvG/pgsppQg4mHcQatDJ8Z/DQl1Fo9OwaPgmdrhpJQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=QILJFoj88M/qrr5D1+PpcuVwyH45TvWwX9qOtNUzKbU2H32geXlux1v6XdZbq/PSM x5y0x3+bPYaD3DPrMXSr+m9sW+FFbUwnpCIrcnmuCUk/RErfwu4BRaQa59aYKPQXC4 5NLcV6qyo9Zj/eFdXUw/qa2RMmJ83isLIO9OGfgg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388249AbgDPBvZ (ORCPT ); Wed, 15 Apr 2020 21:51:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:56052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387838AbgDPBvX (ORCPT ); Wed, 15 Apr 2020 21:51:23 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 7F92D206D6; Thu, 16 Apr 2020 01:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587001882; bh=1OvG/pgsppQg4mHcQatDJ8Z/DQl1Fo9OwaPgmdrhpJQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iVT7QzFms73IYN/64KnVv9TDXQoSU/i52EC2XiHMpM0Vu/DboIigt/o3weB3kmhks bgIaPOojBtWKm6gfJ/CIVhNIaDVlHDrd3t6kuQfpflm1wwQbI7+u7cEJHdSdrKLlAP Rf+oPvsetywgMjY8TtFh0xfSpGfcucxVHjFHK/oM= Date: Wed, 15 Apr 2020 21:51:21 -0400 From: Sasha Levin To: gregkh@linuxfoundation.org Cc: broonie@kernel.org, catalin.marinas@arm.com, szabolcs.nagy@arm.com, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] arm64: Always force a branch protection mode when the" failed to apply to 5.6-stable tree Message-ID: <20200416015121.GV1068@sasha-vm> References: <158694980415630@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <158694980415630@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Apr 15, 2020 at 01:23:24PM +0200, gregkh@linuxfoundation.org wrote: > >The patch below does not apply to the 5.6-stable tree. >If someone wants it applied there, or to any other stable or longterm >tree, then please email the backport, including the original git commit >id to . > >thanks, > >greg k-h > >------------------ original commit in Linus's tree ------------------ > >>From b8fdef311a0bd9223f10754f94fdcf1a594a3457 Mon Sep 17 00:00:00 2001 >From: Mark Brown >Date: Tue, 31 Mar 2020 20:44:59 +0100 >Subject: [PATCH] arm64: Always force a branch protection mode when the > compiler has one > >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. > >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 I don't think that this is needed anywhere without 74afda4016a7 ("arm64: compile the kernel with ptrauth return address signing")? -- Thanks, Sasha