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: 129912 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp569810lja; Tue, 27 Feb 2018 20:01:07 -0800 (PST) X-Google-Smtp-Source: AG47ELthaYlVfMqHrqMetpOG1yh3vwukFPp37zRxV0p6gRhF/4x/9I3KxDGi7atjRCIFYDzzQgXi X-Received: by 10.99.178.6 with SMTP id x6mr5366524pge.98.1519790466898; Tue, 27 Feb 2018 20:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519790466; cv=none; d=google.com; s=arc-20160816; b=iyDx+bm2PTJg7TFgJptNjpC5mJJa0uEjzNswhohCdoyZnHlClfduEvK42wm9fvdEvR Gqj1sUpwY0chPucgaUmFjKJsxqNZwb/JuLlLJeh0Jg2kQPP7kyJdb+f+Ziq7sbmRqeUf JI15xjt1velO9cBNYPKSFKyq0DDVRq5RB2uMAOcc8XZE4vEseLJCv/cZ55MK5mpW9pYh xL9tgG2+Z0D3cVpEHZjmnM+T3N2s7tWRsfHoRr/Ty0Gah1n121aRiSWWWeorRsNcZZ2t FoWZ+3Y6k7t44SVLY/rsnGrfoPSacXbCxmhZNuFXIM45FxyLMZBBNW1Rv/kl2lCOoyon gY9w== 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 c5-v6si604191pll.90.2018.02.27.20.01.06; Tue, 27 Feb 2018 20:01:06 -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 S1752444AbeB1EBD (ORCPT + 28 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(-) -- 2.7.4 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