From patchwork Thu Jan 10 17:51:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 155262 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2176449jaa; Thu, 10 Jan 2019 09:52:18 -0800 (PST) X-Received: by 2002:ac8:73c4:: with SMTP id v4mr10367917qtp.157.1547142738347; Thu, 10 Jan 2019 09:52:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547142738; cv=none; d=google.com; s=arc-20160816; b=O5hGKGigZhSTOgCEFfVIIu9IrIkRLJ/fRaT0MS6XROESwyJV8soEyclmjzzQrXaQAI OP1sfEyFUZkSOMWmw1XdZhm6eCVUz686wiN0RzszV4Ncoxox7PHj1fJ/ZlHcuPn8Aztj G8kQN3tBe/kclUsr/A2oQ3bOF8RBw07zboi1qV1XgYH4VLTb6DLEMC14RWGFj07Hq/nJ QIUF7ccMsKrQpfR7UGZcE4rBsALdvqoVuugR72tw7va48AO4hjcowgzPfqrnf1JUJk3g 4sNkzsK8UGgKLabNuLHY97t17OayiMgaKvwsSijZX7yqhI77lC0hckqhOZbhHdROj+Lb Ehlw== 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=PsKiniBbjO2AKuejxHoDrnr30F619Gk3dKo8AyPM/tk7SnKU4w8uiHTUT3zSok9Va/ nr/IhbqlfOGgYkNNW9lMzqEY7FZkP0d1XvAel2PXSok4k7eSAIlC6423dqmWZ10ICt6N f4X4C4Z2GiajJA2uugh/Ygvu1TKkwM9pQeu9Zye6fPEGaOsfft0RrF3MvX6ZtXTPRfEQ DNyG5Ge83b/e7V4d/aqoujslcnQdc72xSnW4WUD3DOXgaU5MUPBy/Muo8XwvMvDfNFQk 4kFHKio+RXza34C/v1Z5gH7rgF6vRGaeoZOTDLtpQ2Y0IobNjF4eLeNCotkrQnGL+j81 vmig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FccdvlDO; 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 l6sor9724404qkl.8.2019.01.10.09.52.18 for (Google Transport Security); Thu, 10 Jan 2019 09:52:18 -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=FccdvlDO; 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=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=pm9N2c0ARG0/hL7e4qX1I2pDANhrZA2/PlIjSmVWQesBGpEzcxblNwoJ1uDQqNX6hU zpNBYgpROyjsSCd3kPrrG36mcRpGo4glJFIuv2Bi+kO/jeSc+1LKTwAZdVjZ1rvk1ysf qitUbKIJI8i+HZUm+ivOQSpnbIOqoj4adMj05gNDTgXlwnJm7a5a3hAdk2sBynsplFXz d8d4arrVkGPYxcftAqZXJ85ZKt9+h9L0eqSbAHeMiUvaOJ4vP+xO9jQLP0tmAL+VosEH BRlZMEOkhaiZ4+4OsiuwXm/BQ80ThnkKZYnnlPlEHiqRAXfsrP9BxHTD9E13yMtuXgxe lP8g== X-Gm-Message-State: AJcUukdFeat0Q19jgVjUM9lYHdVXVRZXh8iBjJWHFb+gRgiAP6MDBjiy 3wRgaPAMrtdTUzzIAn6YKP4zBSy1 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) 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 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> 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