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=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 D4A98C43381 for ; Thu, 14 Feb 2019 02:10:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5C60222A4 for ; Thu, 14 Feb 2019 02:10:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TUmqxXJ3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404963AbfBNCKt (ORCPT ); Wed, 13 Feb 2019 21:10:49 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:38398 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404953AbfBNCKt (ORCPT ); Wed, 13 Feb 2019 21:10:49 -0500 Received: by mail-qt1-f194.google.com with SMTP id 2so5199533qtb.5 for ; Wed, 13 Feb 2019 18:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IbhWU+vwiJ4ZGll0liBnsU+9mDwJbLZRs9UYNa4vW7U=; b=TUmqxXJ3ic22OfhEe89ZDRixUCnlvjj9uB5CneITxJzkkMRs4WQJb72VlX96SnADhP VTB2pHS0k0VrzNbJ7NecCcw5rLmo7jkFZRwzJimwbIRLJl2JzmXmG8mHtxbI3Hs3lKVj x0Kr2EK1MrrrxyR4tumbtse4V110OGsowoYFJSivydgnmPQLPQHAHuXcM9nDmtTmeJCE V9hOmEexPi2D2xMW5MBKQvah2oQRMMgRYFkjWpILEKE8wRbimcDYjzJSxWMZvLIoqcrL BYhm701/zHf+FaO2fUGdcFVKYR3zbgk2FPE98KatEzZ5cbJkeNOnp1N2z9IFznpLXwQq y5Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IbhWU+vwiJ4ZGll0liBnsU+9mDwJbLZRs9UYNa4vW7U=; b=fzd4phEa5Az6kXYtv0z8PV22eHhs6f7+mUn8vNKrVD5/dQspZAIRc26VPQuN1iQtKl M+ZC7AAXG6rmgLGgw2rJT8TXBtQZfFIH0WINHmPA2NEA39/U664/l4bGzETTUypOF38W tRCYGC2iWYfO8onlUhtjUgnTiyH9ko3D9+ZmFTIGMl5y9BLKkrlMdtq7TpcJzzODn7dG adxuwchRPCJQg2txdSndak0Jy0N5IoelFzLL9a3Gw+27ESnxNJNiPF8NzmME0XXsSa6l R4JQ9hNnDkS9z+vw19SxLSwnbcrVZ5x/AricznvN4ZiUISQIf81GukcGWCglqvr0kPS0 bgDQ== X-Gm-Message-State: AHQUAuacI34q7AJki0W3fPM1OK5KfYmicvgEp1y/WqlmD9FEVaAq4CWp 2kATTFp2fnPiCvUf56+KnGii8KNAkjU= X-Google-Smtp-Source: AHgI3IZCqQEjW8+70aks9hLHT5DqKugLFWu2fQpvtcz0+1TLoEgwjoykFxfZCRsuGgFtLTftI4KRhg== X-Received: by 2002:ac8:27ba:: with SMTP id w55mr1061465qtw.228.1550110248059; Wed, 13 Feb 2019 18:10:48 -0800 (PST) Received: from localhost.localdomain (pool-72-71-243-63.cncdnh.fast00.myfairpoint.net. [72.71.243.63]) by smtp.googlemail.com with ESMTPSA id d63sm1091575qka.22.2019.02.13.18.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 18:10:47 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Julien Thierry , Tony Lindgren , Marc Zyngier , Greg KH , Mark Rutland Cc: Will Deacon , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH 4.14 V2 17/17] ARM: fix the cockup in the previous patch Date: Wed, 13 Feb 2019 21:10:22 -0500 Message-Id: <20190214021022.5313-18-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214021022.5313-1-dave.long@linaro.org> References: <20190214021022.5313-1-dave.long@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Russell King Commit d6951f582cc50ba0ad22ef46b599740966599b14 upstream. The intention in the previous patch was to only place the processor tables in the .rodata section if big.Little was being built and we wanted the branch target hardening, but instead (due to the way it was tested) it ended up always placing the tables into the .rodata section. Although harmless, let's correct this anyway. Fixes: 3a4d0c2172bc ("ARM: ensure that processor vtables is not lost after boot") Signed-off-by: Russell King Signed-off-by: David A. Long --- arch/arm/mm/proc-macros.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 19516fbc2c55..5461d589a1e2 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@ -278,7 +278,7 @@ * If we are building for big.Little with branch predictor hardening, * we need the processor function tables to remain available after boot. */ -#if 1 // defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR) +#if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR) .section ".rodata" #endif .type \name\()_processor_functions, #object @@ -316,7 +316,7 @@ ENTRY(\name\()_processor_functions) .endif .size \name\()_processor_functions, . - \name\()_processor_functions -#if 1 // defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR) +#if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR) .previous #endif .endm -- 2.17.1