From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94F06C433E0 for ; Sun, 24 Jan 2021 02:02:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51283225AC for ; Sun, 24 Jan 2021 02:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbhAXCBw (ORCPT ); Sat, 23 Jan 2021 21:01:52 -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.