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.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 99639C433E0 for ; Fri, 22 Jan 2021 08:27:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 99414235FF for ; Fri, 22 Jan 2021 08:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99414235FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9CD0A6B0008; Fri, 22 Jan 2021 03:27:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 92E026B000A; Fri, 22 Jan 2021 03:27:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 86BAF6B000C; Fri, 22 Jan 2021 03:27:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 717E56B0008 for ; Fri, 22 Jan 2021 03:27:31 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2D7DF612B for ; Fri, 22 Jan 2021 08:27:31 +0000 (UTC) X-FDA: 77732731902.29.snail17_2c101cd2756a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 0BCC318039798 for ; Fri, 22 Jan 2021 08:27:31 +0000 (UTC) X-HE-Tag: snail17_2c101cd2756a X-Filterd-Recvd-Size: 2621 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 Jan 2021 08:27:30 +0000 (UTC) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DMXQZ5clkzl7Vt; Fri, 22 Jan 2021 16:25:58 +0800 (CST) Received: from [10.174.177.2] (10.174.177.2) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Fri, 22 Jan 2021 16:27:24 +0800 Subject: Re: [PATCH] mm: Fix potential pte_unmap_unlock pte error From: Miaohe Lin To: Andrew Morton CC: , , , , , Andi Kleen References: <20210109080118.20885-1-linmiaohe@huawei.com> <20210110171443.GC1914459@tassilo.jf.intel.com> <530deddf-705e-045d-f7c6-521531dced71@huawei.com> Message-ID: <2c691a87-42fd-63f6-6d7a-136be6572fab@huawei.com> Date: Fri, 22 Jan 2021 16:27:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <530deddf-705e-045d-f7c6-521531dced71@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.2] X-CFilter-Loop: Reflected 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: 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. > >> That said of course the change is the right thing for main line, but probably doesn't >> need to be backported. >> > > So it should not be backported. Should I resend a patch or Andrew would kindly do this? > >> -Andi >> . >> > > Many thanks for review and reply. >