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 A80F8C433E0 for ; Sun, 24 Jan 2021 02:01:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 30F4A22C7C for ; Sun, 24 Jan 2021 02:01:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30F4A22C7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 283A86B0005; Sat, 23 Jan 2021 21:01:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 20B716B0007; Sat, 23 Jan 2021 21:01:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D4236B0008; Sat, 23 Jan 2021 21:01:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id E873F6B0005 for ; Sat, 23 Jan 2021 21:01:10 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B307D180ACF9A for ; Sun, 24 Jan 2021 02:01:10 +0000 (UTC) X-FDA: 77739015900.06.unit25_290a54e27579 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 824DC104E8D93 for ; Sun, 24 Jan 2021 02:01:10 +0000 (UTC) X-HE-Tag: unit25_290a54e27579 X-Filterd-Recvd-Size: 2683 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Sun, 24 Jan 2021 02:01:09 +0000 (UTC) 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.