From patchwork Thu Feb 14 14:49:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158410 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1462442jaa; Thu, 14 Feb 2019 06:49:55 -0800 (PST) X-Received: by 2002:a37:ba06:: with SMTP id k6mr3091795qkf.115.1550155795112; Thu, 14 Feb 2019 06:49:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550155795; cv=none; d=google.com; s=arc-20160816; b=I/lsEqjAkfRYWwz8vPmFXBYdb2jU9vReI2vEGJbu6nuW95milA/VAYlp6+IYadL9VP iC6MfMHbQbU4v1dWJV++Mvd4L5A+YmW/gXgnkFQ6H//dzLptAsMQLz8PLduh8OMLgyc5 oH2aiAJu+NZCAM6Dq6K7iwIDMiJF0RXiQ7t8z7j7mfOUP9P91d/pTEzeGUiRPJIPvt/h N2i53b11UZLOdzGb78c4ZkLrt/mxydNydzDGVYb/MC7t36kNKKRlPl4C20lvuDPEQbEl i/XWqiONnfCWlGkovTrCoU97QJfpPE+AfRYM7Y/98zAL/+2u44b6sAgb7I5zPCXY+v1P 7UIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WbXTq/rv4PTCxNmHyDWfQL5ZTTgJSJ1C6Vt+iGpdItk=; b=Mfcg4+ZH5GCe1DnNZZh7hpmy/x1Zr4Q7h4EuQYFXqu0iF/5ZD+a6LkmL3nN1m+nRhX Fe4eGn4eEE8fwcf3fueLMyOpa3vRna9pwYf5jn2BsG9tjN0D+d6JBRcuvTYXLCj9bbQn wSLYknBrv1TSPmNO7quDfnsrzThaqpGZ/YglN4LzabDtAgr/Puam8pOH6IUGUph/zxf6 WqqZpwqAxpZyDnnFGR4I43WMzhDXn9ghNIdJKFUh4FFW/BubpFKLZ0lmgli9KwroLjRF idooBe2W4zx1dX/+S4Far4HP3H/DJ35SeZ2a7z9KteixsY795xZPZwxXgCMOCGRAPTrX GG4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=utApWRdu; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t11sor3207075qti.36.2019.02.14.06.49.55 for (Google Transport Security); Thu, 14 Feb 2019 06:49:55 -0800 (PST) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=utApWRdu; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=WbXTq/rv4PTCxNmHyDWfQL5ZTTgJSJ1C6Vt+iGpdItk=; b=utApWRduTafCEFGv8UAoII0fePrHnB33bW4J/MQptc0lsPlgbmsQ1qtVb9MMnHkiUL jrG56n4yCy1KuQKwHn4C7PKyJQXFEZS5hgjDLQURUyl00zgciW4Q5N1OzrNmK8McMQ2H uINaH6/BILlntPaPi7xE7VW8OK3XLqrFyJ/lgNq97H8EUNjVLBQRLzU5ObT0bNF1+rOy 6aX6UGmbyx9RygbF1jSSymTia1hAYqBrytu/G1gDS/NyR/XF/3TSdVWJ88UERuGSf3Jp +VOBXow+YpZ41THXI4CWgyBRMzm1xG1vbBWtviB8faOYMxJG2JXS85I4nlF/SnF4cy1R Kwng== 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=WbXTq/rv4PTCxNmHyDWfQL5ZTTgJSJ1C6Vt+iGpdItk=; b=EhpWHn/Y+n/Q/WkZBxP7UXgp7ScRpZ9vVk5hnCa3zy2qu0fYBEZL0sr2/yCBxnwwl/ hdzQh9nnNL+2dN/3V+Yt3j7YSHJA0e8TvUcoz7hsJwnYKFsShy1IXW+B2N80PJllr7tO lWTUeYdYuiGq4Eq8ZpxqG1756eexIP4Y/x+6gnaeCWHlnIb29tOMhR8CspNDMzCm3feT dszRTjPWEyGeAotkb9QuP40NQfplauIV66CuHBqcsCYmT4XKim45MaGxTkqDuPC3jAOl lBLnvhTugogSVtMFm9LyOKS/I1bKT/ncRqlzaRn5WRsGvKUAxrARvuEDngQ+dKq7zRwk gJ+A== X-Gm-Message-State: AHQUAubpceia3SMwV0zjATdyQ4QegSbE3T8v3+e6DbVGr0Q9MHGJlQlF YnYPDJJ8aTqCVwO5B8477f6CUSAd X-Google-Smtp-Source: AHgI3IbFz1iUbRoxfRgmOdWkz41vaur9A+BtxGrF6mFztB6uoGLcDn0JYna6uhIqtASfYo0eIOjmPg== X-Received: by 2002:ac8:b0e:: with SMTP id e14mr3403862qti.336.1550155794878; Thu, 14 Feb 2019 06:49:54 -0800 (PST) Return-Path: Received: from localhost.localdomain (pool-72-71-243-63.cncdnh.fast00.myfairpoint.net. [72.71.243.63]) by smtp.googlemail.com with ESMTPSA id k66sm1498919qkc.25.2019.02.14.06.49.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 06:49:54 -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.9 16/16] ARM: fix the cockup in the previous patch Date: Thu, 14 Feb 2019 09:49:30 -0500 Message-Id: <20190214144930.27539-17-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214144930.27539-1-dave.long@linaro.org> References: <20190214144930.27539-1-dave.long@linaro.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(-) -- 2.17.1 diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 7be1d7921342..f8bb65032b79 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@ -279,7 +279,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 @@ -317,7 +317,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