From patchwork Tue Apr 3 11:09:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 132731 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3666530ljb; Tue, 3 Apr 2018 04:10:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4831TtMn5RtuKI3RIo6OGzcch+abdg4+84be5ccyraL4R6VXBPn0v/lfOFyVC9CPssRUZwS X-Received: by 2002:a17:902:7785:: with SMTP id o5-v6mr11947586pll.356.1522753840716; Tue, 03 Apr 2018 04:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522753840; cv=none; d=google.com; s=arc-20160816; b=r7xZa8+K7T8Ruajo7vYfXTgCLe4bjUXk2YefGdYz3oKnGQHmCRHUsKRxKEQQxTTJPs U+YvVdZycCaSHiWZnTLhLtmd66a7o5D1mZUQsso2JTqXgrykmZJJ3Kl4rQyJOvnaAmfb oX2JfvxfJ0nJMgfaLYWE1/+I+Gj0nvHfoBenKKN6nnsjB4iKcykmV2MmIPLcA9iBFa/A XdTAuARwIacpC4Uc1BkSRS6EMDYj53v6vUQr0AdBn/0UrSnoxsKjLgx6gbNvp3t/eY0o U1aIFeUjGRRxS0wgCYnwCBTZQ98tnNrr+0iEuCkyicJXNvpw3at2ZTZzSLuQWZfytmrn W6FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=xPfm9nry8I7PGE6eR3ftu7Td/FDq9QTxHsBb14QXJ2U=; b=MR3d6Fk22R1Ihp6+ak8TlQ3USpTchEwju0C5t/8mk7XebOEadV6zI5OfFMYqF0fSKd zjXn1tEyEInopVOsn5PeQC2zDYgF/AKsUjgkprH+FuEkAQkxiFkaAxgSaJpezOEOB8Og PpP9f0SZiBwVDi4vfg6gZjqh+LyLJ5TTBq4Dj7LmMWWEuCjAIos9gnHLa/kkJW38o7kA w6G8womHrNGGOpVm8oOXjRNST1hxAQwLJvJOd4zUortZaA0k6bLlUoy32kogiUdLIhga RDqgkpJ/QehMAU1e92a4/BHpWgc2XdEot9N6Pw1fp9mgJWy//5JZOb8BKTZcDlQc8LQG wbew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9-v6si295691plr.273.2018.04.03.04.10.40; Tue, 03 Apr 2018 04:10:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755267AbeDCLKi (ORCPT + 11 others); Tue, 3 Apr 2018 07:10:38 -0400 Received: from foss.arm.com ([217.140.101.70]:59432 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755361AbeDCLKh (ORCPT ); Tue, 3 Apr 2018 07:10:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B7711435; Tue, 3 Apr 2018 04:10:37 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DF1933F587; Tue, 3 Apr 2018 04:10:35 -0700 (PDT) From: Mark Rutland To: stable@vger.kernel.org Cc: mark.brown@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com Subject: [PATCH v4.9.y 26/27] arm64: entry: Reword comment about post_ttbr_update_workaround Date: Tue, 3 Apr 2018 12:09:22 +0100 Message-Id: <20180403110923.43575-27-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180403110923.43575-1-mark.rutland@arm.com> References: <20180403110923.43575-1-mark.rutland@arm.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Will Deacon commit f167211a93ac upstream. We don't fully understand the Cavium ThunderX erratum, but it appears that mapping the kernel as nG can lead to horrible consequences such as attempting to execute userspace from kernel context. Since kpti isn't enabled for these CPUs anyway, simplify the comment justifying the lack of post_ttbr_update_workaround in the exception trampoline. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Alex Shi [v4.9 backport] Signed-off-by: Mark Rutland [v4.9 backport] --- arch/arm64/kernel/entry.S | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) -- 2.11.0 diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index f35ca1e54b5a..8d1600b18562 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -861,16 +861,9 @@ __ni_sys_trace: orr \tmp, \tmp, #USER_ASID_FLAG msr ttbr1_el1, \tmp /* - * We avoid running the post_ttbr_update_workaround here because the - * user and kernel ASIDs don't have conflicting mappings, so any - * "blessing" as described in: - * - * http://lkml.kernel.org/r/56BB848A.6060603@caviumnetworks.com - * - * will not hurt correctness. Whilst this may partially defeat the - * point of using split ASIDs in the first place, it avoids - * the hit of invalidating the entire I-cache on every return to - * userspace. + * We avoid running the post_ttbr_update_workaround here because + * it's only needed by Cavium ThunderX, which requires KPTI to be + * disabled. */ .endm