From patchwork Wed Feb 13 21:32:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158268 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp561106jaa; Wed, 13 Feb 2019 13:32:49 -0800 (PST) X-Received: by 2002:a0c:8a02:: with SMTP id 2mr238268qvt.172.1550093569270; Wed, 13 Feb 2019 13:32:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550093569; cv=none; d=google.com; s=arc-20160816; b=W2pKVGpmnjBM6TpZ4Ajdv8YDbTUDGcQ6P+C8jm2glGG2YPB4PJoqYJmcc67tctD/sO tFHWhgQa01m9cwGFk9wbx0NB2elzquUbH6+jlO3kALTPi8Q/Oax6LWh2/HfSBPxduEj4 rLAMdWnaYcJN/oGwDqhMijEk0EAkX3Xwh0zWiBHy/D0CKeUamztpU+HjYRJJqFrqHl+O bEBTTl9H/QltHhAcGzjJ9Ntd4G28kVfqNFI6zCk8hkTzGTB6stixdRoVLlChYp6JIUPN DpVDB2lBWy8tTgPe2X5wYSu+ybvi6Q3M5h+IsmQLk45JeJtRrlv3BKux73x76Mpk0ruA Cjcg== 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=FmBdzCt5OS3qlgu8JS56ZBIGILmjLtsdOci6f5bQSnT1cp9oSSAtA6SH1vbFU9CcQO hdJNkl8yFwICyiyBu7nnj45QP2essihotqnRdOzTmDi5p3561mqEE37cX5MucJz318zo hawvay3ybYVwY/SGRgqOHCv5s83+kp9N4M013pEWP+Rh5TPSMQ9Rb9eGPm70krufjLAM 1tqBUBynmBJwWdMjdsVO0x30mOtkgBhB+pJrRo7GU+1ICFu3WdbZ+8UoGm1myu55A7QO oPpoLQVqVpWP+gD3iUVUHyoTjX8yBEmLceUNrITCq5kJWi/TeKePVUdJ0+AVeMBcfPYr HTjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yiA5zt26; 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 l12sor267430qkk.143.2019.02.13.13.32.49 for (Google Transport Security); Wed, 13 Feb 2019 13:32:49 -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=yiA5zt26; 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=yiA5zt26BcNlSC5TY8vcwZCC8Vzn6Bz6CToYTziIY/wmZs2h7ALzfFg6KxIMMdyQeW mXKRScI2MNZrqm1ZVyXeQpzK39pyFV9WPHYHsr4T6o8rot52in5/iEXLwKo0A5m8Gg8v 9eRtWIrFNIBEV+zhGdBRZJIQe27wW4ts8UK0sE10MeDSdI2YLmav3hO5kiPWcz2Eb+Ac h6NqzwKBox2S65KFnSaiwhGDDwib73UMsgOkw5gz4DwEoHdog20jFc4nMFUANhsv1Xow 7r6tmeC5nloBRPIBUP2/otfZYwqwEVT7hsJ/JGkaMlu/VA1gHYxsLwbFc3JEGj7yeKoS UGRg== 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=YHhwgHl62p9J3fsrGxmESai1J3iwy/hqN2fubDpYe2q76gcJxjXcR55wxpiCAwpXq9 lB4hNDoCcpA/6TkXCne5AB6lJwYmEbyOblS5+uvlJlVned3BnJq5DS57dY1rukdOBFc1 JDlfDEElorgiFjxFni681uTgfgB9nimeHLZUIZG8EuFaP6NlrPjdETBJPIvlFdHJ2KL8 IjMsovcaX2mLaIn9tEmIrrgo6PgWSfYgQPdnJRWOpkW4hLMzUiXPPGtdSTY1Mol/6tsL N1edfHyaUbn+nIFol7xFVu5VOvx+UFYrZ0olh97FcfbX5RTml6lW+yBqM5p8unhm+G0M 0xHg== X-Gm-Message-State: AHQUAuaQkFUQg+IjgDwfOee36nqpAIlpq6D7yrepHXOlSa/c+AiARpbn A963Q2NM+jUEokrqsWkN2obEPCYF X-Google-Smtp-Source: AHgI3IYXQF9N4dCnG9cpRZUOHeWOYrfyw7Sr6gFT+huWsZ0DCuGdVdHQc2a9H39LsIARTX0dB6pvWg== X-Received: by 2002:ae9:e203:: with SMTP id c3mr220767qkc.270.1550093569019; Wed, 13 Feb 2019 13:32:49 -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 8sm382675qtr.7.2019.02.13.13.32.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 13:32:48 -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.19 17/17] ARM: fix the cockup in the previous patch Date: Wed, 13 Feb 2019 16:32:23 -0500 Message-Id: <20190213213223.916-18-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190213213223.916-1-dave.long@linaro.org> References: <20190213213223.916-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