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=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 B4074C43387 for ; Thu, 10 Jan 2019 17:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B1612173B for ; Thu, 10 Jan 2019 17:52:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linaro.org header.i=@linaro.org header.b="FccdvlDO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730745AbfAJRwU (ORCPT ); Thu, 10 Jan 2019 12:52:20 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:43308 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730738AbfAJRwU (ORCPT ); Thu, 10 Jan 2019 12:52:20 -0500 Received: by mail-qt1-f193.google.com with SMTP id i7so14276608qtj.10 for ; Thu, 10 Jan 2019 09:52:18 -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=FccdvlDOTVg9RB1rLSPiXfbypsLqvegncWloQntpCNFGDHQ2nx4bj2YDhjz8qS0KoI XDBlwoD8Y5M57Bx0mW5DKK7ci3K9r8otkyskZMlQoyu7haIqS3YCaXtmCcWX5MPRzvBh kUJaXJo7ohTrYWoj4LOu7puN7+S5ex010Nrz4= 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=gKEPJAWGurqOtO0gUL5csi7z0W+eGIAe9CBP6T61PHpeu5hQNms8x3BYVn2KmhjNF9 SYN21QgA/oEYP64WVXmB3lsQ7PxvaeqSwlGG2x1kmsFXlz/WgiNLd8OAJrQ0SCQsflwZ 6Apt3wv/jmP9cNPFYb+5E/yApsCvmJG8QDmmqzUcgHlX1Mb0RT3zgpHn8FKfDx5oNwAA vUbEprgGeY1j8n1lDYZDT6bvYa3gw9DSaVHgEpJHaWrCXfYed1Tha08ib05clFZTtcTo UgQbZRBef3ofnEUBi+kEhlJAlGDDGQJg98Erpxj2BAMjIv+yRdhHjF5TdFBw45dOHid3 PTDw== X-Gm-Message-State: AJcUukeI6IFKs0ZSpuGgNe8jEPCpJ7d+KJbMcpNuIuD5lDIV64BDhOBj UJA7wXcLO5tUIPZPD/hCw07t4h1hlq0= X-Google-Smtp-Source: ALg8bN5jhBCPrXkZlyjggkc2TYMHEpdBG+8MXNpmxkX7mlgHsGTIxBNwdZC4f8EJK1DgoNfOYDO95g== X-Received: by 2002:ae9:ee02:: with SMTP id i2mr9979811qkg.179.1547142738085; Thu, 10 Jan 2019 09:52:18 -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 b8sm41815904qka.79.2019.01.10.09.52.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jan 2019 09:52:17 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Julien Thierry , Tony Lindgren , Marc Zyngier , Mark Rutland Cc: Greg KH , Mark Brown Subject: [PATCH 4.14 17/17] ARM: fix the cockup in the previous patch Date: Thu, 10 Jan 2019 12:51:50 -0500 Message-Id: <20190110175150.5239-18-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190110175150.5239-1-dave.long@linaro.org> References: <20190110175150.5239-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