From patchwork Thu Feb 14 02:10:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 158290 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp793949jaa; Wed, 13 Feb 2019 18:10:48 -0800 (PST) X-Received: by 2002:a0c:e751:: with SMTP id g17mr1044256qvn.160.1550110248312; Wed, 13 Feb 2019 18:10:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550110248; cv=none; d=google.com; s=arc-20160816; b=J83KPFQm5UOGyUfwpyAH8+fhbSZbpYt3/jjraZ07bRP9tIohWuzl7w+cHYT2iLifsO /+si1oB2ce6wmYsAkRycnOemLElxS/ivZvL5IDBROuywGA0DNbQcHzNknhkZVQclkOSW cmugUGdmX4ND18Z220cHc4xBz++g3tSeym1ukhV4Y+9b++Nmi8RUW1A153ywrxD2g4fY 3o+JZClr/gcUA0e4N68Hvqzs4Ex3H5mOriEGxtpCHigXF1ITarvnQtaRZWoWEfJG3VcU yyxycYikE3M9Fi0ozFvmCYLHMXw7tEc53bfXVFZ/+ZdC6XrruaFu+fzKf3v1wEJvmDk7 mgOQ== 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=Yay8Ei4z+GaV9hI9l2UOpDtb8gsGsqc80XDPQCMUPLk9mbWgg6QcfczuVISNSunefG Ljfz78EGmDD/7frgI/iPnq6h5DTO5SHdMDcNyhsiZeho3wy5Q04Oes/vV9Tt+h4HTeqB wejqck2BkOimZRzZzNXLwfxSac9eyYPFGWjYcmE9NZLhU6+VLRTI72XmsNE1AfkgCrxM tFcEWPyz34rZcbNvx0xgS9MyJRoRuXsO3Ej1l11pSsyjN+1JE1D7G3SoCX/6P+KzXQls nz+LKgZzxsU8sM2C+197APfr+dzybq9GILwjZ28Om6jLLtceSviaROBMfl0z3i1Al0IW tkOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TUmqxXJ3; 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 z19sor1279535qti.20.2019.02.13.18.10.48 for (Google Transport Security); Wed, 13 Feb 2019 18:10:48 -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=TUmqxXJ3; 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=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=P2Xp4ZruttiEYmupcYWxq7scp76cHs7eE1SixZKS3GGS8LliK5pUP6WSLofLk7Iot7 DXtZF+CDij6PUscdrY0+erY7vmYV78M335mKrnE1QpI5HACL3EKwYEcSzIPjPJzdcbrr 4BXAGXCyrcJU/ruPjgHwLZrykbL2GohQBs7d3HPxUpWV3BY5wHQ1kr86fCCVFei5Jk/Z tr/ocTHJrARrYDuVdnrtW4tg2ecJlD2xPzZX0xOiXVAvJgfMJ8ELkjzSOPpqgK6Ewr4/ 4Gk8HLZY1ztWd9MI0NHlMLPn2KU5RWXp09W2Xv6Od/1UwOxo1krTbvYUjCdz/StNLule mzOw== X-Gm-Message-State: AHQUAuYLO0k5/ElIh/j6Mcztt9/MmL8XYuCvXEUxJgNQKRYArWL3Pa4p Shl3KtTlzLIhlY6bC0HBac8HTY6d 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) 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 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> 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