Received: by 10.223.185.116 with SMTP id b49csp5728661wrg; Tue, 27 Feb 2018 20:02:23 -0800 (PST) X-Google-Smtp-Source: AG47ELt4GXq8rzjQ208ldKob4cv9RPdyFqB8uNv1Hlo0DxLwaEIkuezscicI/ih0xcebMOHwdeqk X-Received: by 10.99.56.83 with SMTP id h19mr9022613pgn.230.1519790542909; Tue, 27 Feb 2018 20:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519790542; cv=none; d=google.com; s=arc-20160816; b=IATpkZgmdPOpUAOLy9yhJ1LUYd7/agieF2oD30rtobn/DL+cTQPY7kl3itEUOdEiiU ospdTqz19vQo36kUzkdUIT9C++ltHaAYdbz6dPvTX2+eQPZZv0FWD9AlDgOmSlHQ3LBh h7lm8ldF6Y4YPPQUuvk9C9b7C+aoaIF17lD72eHpwgOECcycxKZhlQQ15bw0VBvv8Gu2 yF/lIu6S8zXJM3/M2XKeIoGSdlpNlA9nqhkt9F1SPvNn4WANpPq56Jp2FmhYO/9rCfs0 xbzdoTJoqESuUyEzTYeSecYEolrqfYarjFBEvsGphUmobo1xU3cw++RazatScvUCvwyn Q40g== 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:dkim-signature:arc-authentication-results; bh=mDAP47eyIT68Z920skzZ0tbKXBprTWayJOiSVpV8SAg=; b=RjS6QOq0RhfAfvmX/Fm7S0CdVpIoGpHv2gqDZhvJHQlyOSj+FbMz5geSIAd1IvlN58 RUKGsGdnCBOS4gl/fz/K5dEILgyjU2JYL+vahuM8Q/xjb2D/BRmMYTGTKlUP3rjU+thd 6/QLRKM3nO1YlDOTRAaABLHoirhBj2GMrFsN7AAJjEXnnXjXwY5g0mhe7DaaWudYN8xm LdvbqrcUsisgv/zO3xZUPNsq6rciB1MWQNhXlozecSrC6J8YYSzV05Xf4XZj9Kn2z2kN kspHib4eOpY8cED6UfZUsfaMfG625Tpk11aokkz43GnwAuR3gL2OFVmiKrMyeHigzdzk 76xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Js+guy+h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y125si565499pfb.73.2018.02.27.20.02.08; Tue, 27 Feb 2018 20:02:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Js+guy+h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752441AbeB1EBD (ORCPT + 99 others); Tue, 27 Feb 2018 23:01:03 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45545 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422AbeB1EBA (ORCPT ); Tue, 27 Feb 2018 23:01:00 -0500 Received: by mail-pg0-f67.google.com with SMTP id i133so477814pgc.12 for ; Tue, 27 Feb 2018 20:01:00 -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=WE4mdrI3TzvFdZxZNBqBPi5/twHdCzBm5BnwghVv/HpIHjyaMbMZunhX0QKdYr/XS9 XLG3ZRhCswROlUYkPTwgtOyTVRofaSph348F78BeDzhBrZqevdhdAIODw0OGr/nZzyvG RbJGE9o3uiLEMR9e54ZCRhsrZ2kSghXYpHwqctdHgF7ywqcli3em9kw4zd9cxjMMzk57 eRtyEktiowG66bDPF/dm8qa3IROZG2EVzfkuWTUQ/ndLvbNxdHLtlJiY2zO15fSGiXOG kWeF8bYPBt9VCntjIHE1hBopX4skIyLjLKxpNENnPXwlM5spYcnQqD+ALObdA2QMkfI7 YI8A== X-Gm-Message-State: APf1xPDlW5WDEeX5lgBTOF3dzKyt0bK9QWqNGN0xC/azorSM9XfdJ4x2 ZXi3OgZ4RMmwox/saLer28/ofQ== 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 Cc: Alex Shi 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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 -- 2.7.4