Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2116402pxb; Sat, 23 Jan 2021 18:04:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJynKvgTO37BoVhIVmTiASw9PTEY+2vR0NvI5vIMqE4tBKC4nDG11uKSWJophuwJ4Icc6yZT X-Received: by 2002:a17:906:944a:: with SMTP id z10mr2611255ejx.96.1611453863563; Sat, 23 Jan 2021 18:04:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611453863; cv=none; d=google.com; s=arc-20160816; b=z/VNs5+rCIFwlm9z+YI1AQXvZo7WG7hVFqjUvXRFgIsgXgsmlMhknC7QAexQm7i0/K QahfGVgDH27tkhTMd13aIupSlVELRbUMKARjQ6Bz8mXTuQx5Jkld+N2By7+L/to3azmg HywHKnoe5MWnLAxdpG0Mk8BZtCCWJPLy1rTojOFIX8MvR5zxCViHRNhX3RAPe4cIfMdd uhE1RfL5PyepZ+vyRHX9ZaPE1rql4wZK/Ew3GFT7xsC+pfZp9eaccKsGg92Gs0ds81jG 7Xptm/VDtPDvIM8W0BUQuU0/we9Go/V5CgjTJWVKPwOIgkcU9dF05RjOqpWDXAdIjQBT oLDw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=XodLKwYFNnNCKTOMgD3oroA+eFwYEcmDm1jcn68MrPQ=; b=JQ8TeFbD+vHtbSUvdfoIcsPFaD5FOJaXtl1vn2oaPSUR6xdmPpAMPzMcxkuBwrGpp+ UHTfIQ2jXseCn+wfc9cAfJYlN7+HOzXZH9JEfoQ2aWfAjk0wB+nFcQxbdx/mhTchD0oA l4ySafpMD/FXxh0uQG0OP/Cpjp46qp1CtByX6nvcSf81dF9ONtk17XnJAxoX57NZT6pW 4veMffa7KPfbrxsumqn1DxPgDbLGJ6DL4RSPV5N9wGul3vv3fFbtzj3vWzIWdh/q96qG iJwUmHGeFJrdZ6GGDbL7l0AtK9KDSdyAjJSJvGzSCx8QnPz3Ma2oG3unn/En6elUYM/D /Zpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=vxg5RMFG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id uz26si4581067ejb.10.2021.01.23.18.03.33; Sat, 23 Jan 2021 18:04:23 -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=@linux-foundation.org header.s=korg header.b=vxg5RMFG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbhAXCBv (ORCPT + 99 others); Sat, 23 Jan 2021 21:01:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:52776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbhAXCBt (ORCPT ); Sat, 23 Jan 2021 21:01:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 66F8C225AC; Sun, 24 Jan 2021 02:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1611453669; bh=ru6rEZb57xkA0U2WwjNNXhXwODx+Gd/wB0CNya2LX8c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vxg5RMFGYzw/CkTn99KZw5yq9jz8VDHjYGXTn+T2MG6uNufJmXh3gMs6l7fiQJsLL ircroI3i2tU8yQ4Cig5GLV4FhxtQtxbjDQBiGmVyUVrq5LreLlUDnXKhNZeDx9XCXd UoiB6Np7GccyfBX9VLNB7JJqIABgAtGe2CuP9Mkg= Date: Sat, 23 Jan 2021 18:01:07 -0800 From: Andrew Morton To: Miaohe Lin Cc: , , , , , Andi Kleen Subject: Re: [PATCH] mm: Fix potential pte_unmap_unlock pte error Message-Id: <20210123180107.95f54cc0849a6d8c6afa16ee@linux-foundation.org> In-Reply-To: <2c691a87-42fd-63f6-6d7a-136be6572fab@huawei.com> References: <20210109080118.20885-1-linmiaohe@huawei.com> <20210110171443.GC1914459@tassilo.jf.intel.com> <530deddf-705e-045d-f7c6-521531dced71@huawei.com> <2c691a87-42fd-63f6-6d7a-136be6572fab@huawei.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jan 2021 16:27:23 +0800 Miaohe Lin wrote: > Hi Andrew: > On 2021/1/14 10:51, Miaohe Lin wrote: > > Hi: > > On 2021/1/11 1:14, Andi Kleen wrote: > >> On Sat, Jan 09, 2021 at 03:01:18AM -0500, Miaohe Lin wrote: > >>> Since commit 42e4089c7890 ("x86/speculation/l1tf: Disallow non privileged > >>> high MMIO PROT_NONE mappings"), when the first pfn modify is not allowed, > >>> we would break the loop with pte unchanged. Then the wrong pte - 1 would > >>> be passed to pte_unmap_unlock. > >> > >> Thanks. > >> > >> While the fix is correct, I'm not sure if it actually is a real bug. Is there > >> any architecture that would do something else than unlocking the underlying > >> page? If it's just the underlying page then it should be always the same > >> page, so no bug. > >> > > > > It's just a theoretical issue via code inspection. > > Should I send a new one without Cc statle or just drop this patch? Thanks. Your patch makes the code much less scary looking. I added Andi's observation to the changelog, removed the cc:stable and queued it up, thanks.