Received: by 10.223.185.116 with SMTP id b49csp2255324wrg; Thu, 15 Feb 2018 08:50:37 -0800 (PST) X-Google-Smtp-Source: AH8x224fwdUgsOa3rtKxt7eFbG66pqnMOfen4RZdgELHdsWPi2s3XPG7sgpWK99qxWPSIqqUin1j X-Received: by 2002:a17:902:a504:: with SMTP id s4-v6mr3181058plq.43.1518713437241; Thu, 15 Feb 2018 08:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518713437; cv=none; d=google.com; s=arc-20160816; b=DEmRZYxtGSwS9V/Dev9IK8UXhGJ+4iyHAJ8J9ACXgtagQ+htDZnZu1AI5p5Ugvq6Sv qb+bTg6DRjORZ5cLsFxk1lsuamHHkl59xIvHh8MjxquaJy2IWzfc6VL+sPRDPSCBy1Yw YUA9ATYj+FTTHtqcdWDGyL/UZugk8TLySdXpMM5onRa+cNQK419s1o6joKgTts43ObNI wFz4TQMY7SnA7molf5kQNBgcoPykj/yv7YAk2RVn5+GOMb8wbEfsg/opohjZJs+KMQm/ sc+Dk9CcgN8HgClPZ0RXcTtJMZeK4sWHIIQq3KEd4UtuV4tfdxIjrjwVvytYF/B+YLwF BRcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zGG0GJXcj7JiiRsf+pyd0s1Z65Xgi/bRFsLrhV9mkmQ=; b=drYnXYzoRLrh0pJYWDm8z54/RyD/kddfN4vIAkNuyKJV6cSjfeyypuQwg386ejibCW 55GqHMcgmAvgS9VNUbhaLTkCDpOsLlXrPnw6YCe+BxpcQYH24gPslUmDV+F5DXVNrGfK 0sF3XM3ghP5DTptNh7mVkdBHj0laFbCjRI6GCyf40chtGqYBDYApsI6R68cKIBIP1wn/ 0qhlCmuF6bBkKid5zrVpYSR/8S8VfY/aQ//jLhgeilE5gimctWjQakD2igjGI6S0OUWc ILLs301KEUcXD7rcqwjw9GZBoDxSP1ElfvHsHPpsAjvGvNyL2g2bFX0OOhvoX/O5Qqwt cl+A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11-v6si1271563plr.671.2018.02.15.08.50.22; Thu, 15 Feb 2018 08:50:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423758AbeBOPkg (ORCPT + 99 others); Thu, 15 Feb 2018 10:40:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60144 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423742AbeBOPkb (ORCPT ); Thu, 15 Feb 2018 10:40:31 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EB9A4115A; Thu, 15 Feb 2018 15:40:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Catalin Marinas Subject: [PATCH 4.15 043/202] [Variant 3/Meltdown] arm64: mm: Permit transitioning from Global to Non-Global without BBM Date: Thu, 15 Feb 2018 16:15:43 +0100 Message-Id: <20180215151715.431836869@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon Commit 4e6020565596 upstream. Break-before-make is not needed when transitioning from Global to Non-Global mappings, provided that the contiguous hint is not being used. Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman --- arch/arm64/mm/mmu.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -117,6 +117,10 @@ static bool pgattr_change_is_safe(u64 ol if ((old | new) & PTE_CONT) return false; + /* Transitioning from Global to Non-Global is safe */ + if (((old ^ new) == PTE_NG) && (new & PTE_NG)) + return true; + return ((old ^ new) & ~mask) == 0; }