Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp404829pxb; Wed, 3 Mar 2021 06:20:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+ZLJ9oHEJG50VOT+1H0C8z4fTEUgmZh8A+nbtC6jAi8to54/DJYDOnqKHz+QTahn1fdfj X-Received: by 2002:a17:906:8408:: with SMTP id n8mr24981996ejx.152.1614781202441; Wed, 03 Mar 2021 06:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781202; cv=none; d=google.com; s=arc-20160816; b=YJg95QQp6EPyO0C5m8HgYAm9qwGUtze01W07w3/GDfn2GanahwmmWdG/Zh3UKsWmT/ WMk30UwtlPcnUE0ig8FdQV1GTMsFpWMeB6C5oepHleMvVapod2gMfQecYKuz47YG5MmM GRka/P2unykPy7AaoU16WTN2MI7uoLkdeHsYq8JG2JpyuHkU9WjgG6XEjziEolfqXa+k /hFYKWafRSfMLanBCikWgOBHxlv5w3LWEYowOr72d0ctDpfyLbomlCsE+JTV1l2MYMc6 VhNANF74u8Yp0iSvbet8xcHMA2l2x1zOfzrDHJV2f1P74ELVHYjv9INYlzbZpRi1lG11 m8rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6PfLWznZ4YwDyzskXN1jsWIqryFD1dm0JAHuh54Co50=; b=VnmEwuULnTCNsJuF44WmcCH60z8keV+WHKjjRvt1SYDAeJUvokGkL99HEp01HqtACq TtJfg++EcCf+R7vqG1j0MASj1zDbDneegV2v5tzCAJK7ez/zEqrI5ZHt2FgGFEyai97s QwkU0hDzMxFWEYj3Qrzv0ZwWthbyIcPGPSVYVknSSkRIPEUkbaUGaWk+Mpmi+MhsRPdY UZs+aDHT8YSyF7nXZe7RNKR75vzhUWklHzT42sY1Rjo1Mf2I0lJtf9e2M9aCP2CGEulx sADMb1xxpE3rJyKUgUOqNUuX7PilO7dpH1J39cU3VOlN0cPPca8M6LxkB7kyl+IVOZD+ B68A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=taEF2dHv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si15152767ejl.393.2021.03.03.06.19.34; Wed, 03 Mar 2021 06:20:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=taEF2dHv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243986AbhCAVDL (ORCPT + 99 others); Mon, 1 Mar 2021 16:03:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:46228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237161AbhCARMN (ORCPT ); Mon, 1 Mar 2021 12:12:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 04DEF6502A; Mon, 1 Mar 2021 16:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617017; bh=TT6F23gzrsrySwDgfs+Or/uGmUlwPvjNXknvoFZo4Ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=taEF2dHvwpxgz6UtjuCYLWfUOYbzRXE449i7NeaFGz2IqJGh9KOQwuKSEUdYFGzeT Ai/7g41S6XfujaU8wPruii/tH+HtqSyb60VeeNFddBDQQbjnXTvP6ZiP84rDkAfHCy MCqsyfDqSdSMtBgIVSk2rhzAFL9D25kD0G5AqY3A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Marc Zyngier , Mark Rutland , Sasha Levin Subject: [PATCH 4.19 174/247] arm64: Add missing ISB after invalidating TLB in __primary_switch Date: Mon, 1 Mar 2021 17:13:14 +0100 Message-Id: <20210301161040.181587414@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier [ Upstream commit 9d41053e8dc115c92b8002c3db5f545d7602498b ] Although there has been a bit of back and forth on the subject, it appears that invalidating TLBs requires an ISB instruction when FEAT_ETS is not implemented by the CPU. >From the bible: | In an implementation that does not implement FEAT_ETS, a TLB | maintenance instruction executed by a PE, PEx, can complete at any | time after it is issued, but is only guaranteed to be finished for a | PE, PEx, after the execution of DSB by the PEx followed by a Context | synchronization event Add the missing ISB in __primary_switch, just in case. Fixes: 3c5e9f238bc4 ("arm64: head.S: move KASLR processing out of __enable_mmu()") Suggested-by: Will Deacon Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210224093738.3629662-3-maz@kernel.org Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/head.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index d22ab8d9edc95..c85ea70b92936 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -867,6 +867,7 @@ __primary_switch: tlbi vmalle1 // Remove any stale TLB entries dsb nsh + isb msr sctlr_el1, x19 // re-enable the MMU isb -- 2.27.0