Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp869698pxb; Wed, 13 Jan 2021 18:55:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQP/BQsQ/Y1WvRQIrP95nUPZ6sh36Hi/hrwpjXGc3PD8YYEGbWj/u2lVi+GCMDruXtZK87 X-Received: by 2002:aa7:dac5:: with SMTP id x5mr4210658eds.198.1610592940604; Wed, 13 Jan 2021 18:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610592940; cv=none; d=google.com; s=arc-20160816; b=jNWyM5GGQYSSUYOBBiqviBzjYJ/K8NZ0XYgKmiZ85Fbvcq8DfJdr+/00rF1Zhxi9KH uQ9IJ1bFJYInReqMVowHEjmggWe4vDKU176ArJh/fHKyXHV4t5pHreFbGQarMOW0wCEc Do3wOVyQHDYPhi7wHyOvzoqewrA9D46ozCweOsvwLePfa9JW/MD3J7u75t+bZgUiAoz8 QGynS0ym+T68Iyb0uPx5e2CTsX0+WPEdslyAbm1Ts3Ge6PUrv2oAB73hsaU7y2wDXCxz 8gMAsq9qZQB5Fpuunk+5lFRQfFTJiaG8bJK5QNZck5F5N5J90570PefYSfVm9jgZnYAm Mmqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=lkEtNSWmiZ+dcIHpORYr3zXxhsXv7mvfhOyxaTn1FJY=; b=GRpXw8F5oDHcU4XZcvAiCZlizJRI4x8laX7T/LmxkC5CFevQVV1MfJACxS19egMzcZ T9GuihDj7DA/97+gt8mDron4KquqJIThqCmNmpUz2tAQN2saVb+qWaPufl107g30uCf2 0N3CsFKWp/mn5nlvUW2AGPJSLQ2OKX8p12je/xF/FnvWYrYv7b3TNq5qWe1D2JrXoVat xAJ61495t54gWlse09K5FK3lM0/nBDqBXlV3FNrUprTPm0ITOg5H62o0pH5OO7pLa57i pXkpRwAvjANLEff1AoGc6D8OxKw+5VJ3HIsMBJUUftSuAs/6+MMIoHlkWkZON7YGDKF2 GH/g== ARC-Authentication-Results: i=1; mx.google.com; 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 x9si2016952eje.109.2021.01.13.18.55.17; Wed, 13 Jan 2021 18:55:40 -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; 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 S1726110AbhANCwJ (ORCPT + 99 others); Wed, 13 Jan 2021 21:52:09 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:11012 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbhANCwI (ORCPT ); Wed, 13 Jan 2021 21:52:08 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DGTM52rSwzj7Sc; Thu, 14 Jan 2021 10:50:25 +0800 (CST) Received: from [10.174.176.197] (10.174.176.197) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Thu, 14 Jan 2021 10:51:24 +0800 Subject: Re: [PATCH] mm: Fix potential pte_unmap_unlock pte error To: Andi Kleen , Andrew Morton CC: , , , , References: <20210109080118.20885-1-linmiaohe@huawei.com> <20210110171443.GC1914459@tassilo.jf.intel.com> From: Miaohe Lin Message-ID: <530deddf-705e-045d-f7c6-521531dced71@huawei.com> Date: Thu, 14 Jan 2021 10:51:24 +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: <20210110171443.GC1914459@tassilo.jf.intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.197] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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.