From patchwork Fri Jan 25 22:40:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 156644 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp889413jaa; Fri, 25 Jan 2019 14:40:41 -0800 (PST) X-Received: by 2002:a0c:b407:: with SMTP id u7mr11552726qve.179.1548456041077; Fri, 25 Jan 2019 14:40:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548456041; cv=none; d=google.com; s=arc-20160816; b=UIrcoou1t1KZpA7tl68S8zrIN8aSvQJI4LKX8nxZDdpLqDIlmpYUbkIQP64eRgw5Rx Nnp8T2yI+mZB2t2yxCYfcW7z93B5WBhJG/yVQHbhcMQdciH6+jgBxpIM9l0Y+BYTwkwH DTePXmsIilmTB/tUMVtvk3HXKPl+oz2zOt6ovrye9Ovj+7xJ5UMMxzcdUxih+QmGhnfX dGzrLAgw1VaGNxCYAJBcevmoF2CatPjUIYh+RKquFBnZU0nCrW3yDKwTsEJVqFq5ukoC ZPvwipQiLuIlgBjhk0rqOVmvhTFcDYCZ+FFI7Db896sT7KO7at5W206qQUW4hoTKOmai cfPQ== 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=IbhWU+vwiJ4ZGll0liBnsU+9mDwJbLZRs9UYNa4vW7U=; b=Q7xg7jfR0Rrq4dau+bzML3tT9I07RGlKgRaUcSaMZ4WmPL2p0sRwK/XyGSWFw/DDGd U7LVAG5KYG1UKjpSEZNrZ07X5bVV9P/TQiOS98WbLn/7+Mu4MsofHgAdKdJI76uy1B4a lt+QBG3MLjdh46saXBN2nLC9nDfw+qoVTTb8Bcx7+DnsZkh3A+ueDpvedXvBq67YKhEC pj85Po6+5mIWDS9xJ4wurgBDTInwmqX7qvHXf4TbOZ2OVqRseeru7hNeQKFsrV1FRXBy w0kL6HzyeBGAAU+BXbvfqqa78vOv9GTFjg2MnS6+Ub3lOYr7XlDinuVGupsG96qjuwYr HN+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XkgoP/aR"; 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 f64sor132062496qtb.41.2019.01.25.14.40.40 for (Google Transport Security); Fri, 25 Jan 2019 14:40:40 -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="XkgoP/aR"; 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=IbhWU+vwiJ4ZGll0liBnsU+9mDwJbLZRs9UYNa4vW7U=; b=XkgoP/aR1ruWtFuzcADA9M/uV3qkMpU6/6QR1J1vNMNRVbLV6ltZi/DHMsgDcH/gXL Uo0o7iujAAtTPqBuzO4FZM79Bc3bimlqSul3wxL7++3Kp4rECSyyOEzTZCl9orAKAqA6 wi0AGJr7iDKywUV4SBSumAjYVta5a+FZiey0E= 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=jaIgH7h7AJRiGGiead7qtsnt9BSObGyKdpbdw/s/a1d3+0nMAdQDcYJNmp4GEyhRn6 71bR2+TAN1aXF3F3WIYP0IwH6MpdNrAOABUuFyuHCk3Rk+M1/0pcsSHJhZQqnadyt7sn l8VuGgch8x7ddUvg+0nqKo80NsVdmUTeT6SSSx2/34u/HL2HnJ83OIUlpG7ZsfTHx+w9 N7MDPMboZMooWlBTe7MH2jkVaW9oAO0doUvbLwDAIPxxOLivZWCPoUm9WFlvd0PX9zBs BnHDQK+/n2OdomusU4nJkQkglrxv2VRXfOuxr9ltON+hJYFUO7hswYFyGavj0UZfv+pT imgg== X-Gm-Message-State: AJcUukcjULiYxJq9ME3BGDuUPRVvzc0NCQ/NYUCrkcoIFNdCeNzwvMmA CGy5uD2T/2uiJZzj0VJ70AaRNN4l X-Google-Smtp-Source: ALg8bN56jqOLb8NE5CElx7PEuwo7dnhERNf+XGXe7tRds01xClvLZ4htvLeUoM1QDg19N2Ht0b5wiQ== X-Received: by 2002:ac8:35eb:: with SMTP id l40mr13249180qtb.165.1548456040639; Fri, 25 Jan 2019 14:40:40 -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 q38sm73052296qtj.65.2019.01.25.14.40.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 14:40:40 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Julien Thierry , Tony Lindgren , Marc Zyngier Cc: Greg KH , Mark Brown Subject: [PATCH 4.20 1/1] ARM: fix the cockup in the previous patch Date: Fri, 25 Jan 2019 17:40:37 -0500 Message-Id: <20190125224037.4787-2-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125224037.4787-1-dave.long@linaro.org> References: <20190125224037.4787-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 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