From patchwork Wed Feb 28 03:56:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 10246769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 65D9E60211 for ; Wed, 28 Feb 2018 04:16:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5453528AB5 for ; Wed, 28 Feb 2018 04:16:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490DD28ABD; Wed, 28 Feb 2018 04:16:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DB7D528AB5 for ; Wed, 28 Feb 2018 04:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XUawS82v+RJ/TNJK95TF6p+NaUif9nzIZVIb/B5baiA=; b=dkJLbPzdoZosSIW7IbrEO+XB2+ AxGjIqmhXxpAzyH86AlRfe8m0YoWfqofnEOk/rQTRLvXH8TYPfkZbiKXxtqmPQhfdAdfRaUVkgZIr U5PUUkf/7zRTsc3ivIAlQemP9lQuV+zh3eVyulf9AeYR2OIdblH+4ApXskDQivD7j4tvr5oei/woj 2fH6TsW05awTXXBooR7fQrUmknGd5+IXO+HtGux58k6N3YMd56Whz9rC7PWtT02iIHTKCKSoUo5vH xmwwtj7scixXU0a+LPrGD0g8fS/XksK5tB1EQ1p0I/1Pt5QJ0VV04037UgHlwOuTPf9t8GE0+jt7p 5aYna9kA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqt9w-0004Nz-Al; Wed, 28 Feb 2018 04:16:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqt9B-0002b7-7w for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Feb 2018 04:15:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mDAP47eyIT68Z920skzZ0tbKXBprTWayJOiSVpV8SAg=; b=VuA52KgoR6p6F6QPlHBPZGuYR jRlN2iYg05Zuf3yMnx84EKTLiT6ojzxhO2HRj/pGVXHUV+Dzmb5mugRSRuRg/0k4QkoLtUxzohxfm JkkzHWbX0rnL6n13n148BPuAM1bZfCeTPAuQASWudUu5JWlYQhRjGrsu7KUHVr2Po3j5aqlQ7/jkL RtPK/CcQ6iNfVQcMQkQnCfi92AV5gSbF+Ap5ZKaIYHSlAkDIBESpGEiBJgWjivuMvovAUGAuh0u6I HecdMP2avdicNjLty0o4oazxNdiWF1futgfQ1Av32438ffQw179tgqHwajd787UQN/xg472vZzE5v a58i/IT+Q==; Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqsvX-0002Wf-OD for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2018 04:01:13 +0000 Received: by mail-pg0-x241.google.com with SMTP id l4so478921pgp.11 for ; Tue, 27 Feb 2018 20:01:01 -0800 (PST) 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=mDAP47eyIT68Z920skzZ0tbKXBprTWayJOiSVpV8SAg=; b=Js+guy+hMKxmFG4/egEFD9meAto9cmYTH9gXJ1RnPYpBfiYmD0SrrjfzxT5+f23OkG 7K5BnvIU1LwjqR5x8WJrR/d1p1zu0eQWKQU5UJklQ53L6a7eFFkOQSOpUYXL3gyrhDmQ 5r4HMTDCrs7xZLGrCsZmR56s0vla1r1u8kxys= 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=mDAP47eyIT68Z920skzZ0tbKXBprTWayJOiSVpV8SAg=; b=FRMOdZ7E5i/wos5QxTLvjgTgXSTMSg78GoB4URp+tB5gdF0IB4+U/11HEB6mmzjL22 OMiF5RVNtRcneDrTez7AICchsmbZKiLt3hKD7RKshagILF8RYnr77diyz/tvAXIxCkSn NYPOPFPLAh2PkvKQdyXuWE8pk+yddQ44Tu0kKBymC3UNlAiazu3mQgo2/2sqlO+iirlP 0zx/ujsLqlsOpxOSJI3OfFqss2Y8XbjSRNANFpasvr1NwL0BTetDwN7GbiR+CLLGpOwU yms2jUqvbk85vaJFhtg0p2c/J+awQl9bXjmDitpRj2mR8sFnJ3U5IjEoA26J5AW16HW9 70aA== X-Gm-Message-State: APf1xPD8/3lXsBIaMriLF2tDgeI3X8BYo8S7c5smdcU+J9+UMBpOzqnJ QKgrKyEmuQ7iJNdGx2SYtgL1hQ== X-Google-Smtp-Source: AG47ELsai7Nf1tExOWWvKsw0MaO0k+BvcrDItw4VyHLGSJBuZOfmWeijCtj4D6hRsZtnEK4nuMwLPg== X-Received: by 10.98.237.12 with SMTP id u12mr4523070pfh.72.1519790460145; Tue, 27 Feb 2018 20:01:00 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id q17sm739911pgt.7.2018.02.27.20.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 20:00:59 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 28/29] arm64: entry: Reword comment about post_ttbr_update_workaround Date: Wed, 28 Feb 2018 11:56:50 +0800 Message-Id: <1519790211-16582-29-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519790211-16582-1-git-send-email-alex.shi@linaro.org> References: <1519790211-16582-1-git-send-email-alex.shi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180228_040111_807132_C3566565 X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Shi MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/arm64/kernel/entry.S | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index c00921e..8d50b28 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -883,16 +883,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