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=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 DF7D7C43381 for ; Thu, 28 Mar 2019 09:02:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B57252082F for ; Thu, 28 Mar 2019 09:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726357AbfC1JC3 (ORCPT ); Thu, 28 Mar 2019 05:02:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:34556 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725853AbfC1JC3 (ORCPT ); Thu, 28 Mar 2019 05:02:29 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 15AFFAC97; Thu, 28 Mar 2019 09:02:28 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id B1D271E424A; Thu, 28 Mar 2019 10:02:27 +0100 (CET) Date: Thu, 28 Mar 2019 10:02:27 +0100 From: Jan Kara To: Andrew Morton Cc: Jan Kara , Linux MM , "Aneesh Kumar K.V" , Chandan Rajendra , stable , Dan Williams Subject: Re: [PATCH] mm: Fix modifying of page protection by insert_pfn() Message-ID: <20190328090227.GB22915@quack2.suse.cz> References: <20190311084537.16029-1-jack@suse.cz> <20190327173332.GA15475@quack2.suse.cz> <20190327141414.ad663db479afa8694ed270c6@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327141414.ad663db479afa8694ed270c6@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed 27-03-19 14:14:14, Andrew Morton wrote: > On Wed, 27 Mar 2019 18:33:32 +0100 Jan Kara wrote: > > > On Mon 11-03-19 10:22:44, Dan Williams wrote: > > > On Mon, Mar 11, 2019 at 1:45 AM Jan Kara wrote: > > > > > > > > Aneesh has reported that PPC triggers the following warning when > > > > excercising DAX code: > > > > > > > > [c00000000007610c] set_pte_at+0x3c/0x190 > > > > LR [c000000000378628] insert_pfn+0x208/0x280 > > > > Call Trace: > > > > [c0000002125df980] [8000000000000104] 0x8000000000000104 (unreliable) > > > > [c0000002125df9c0] [c000000000378488] insert_pfn+0x68/0x280 > > > > [c0000002125dfa30] [c0000000004a5494] dax_iomap_pte_fault.isra.7+0x734/0xa40 > > > > [c0000002125dfb50] [c000000000627250] __xfs_filemap_fault+0x280/0x2d0 > > > > [c0000002125dfbb0] [c000000000373abc] do_wp_page+0x48c/0xa40 > > > > [c0000002125dfc00] [c000000000379170] __handle_mm_fault+0x8d0/0x1fd0 > > > > [c0000002125dfd00] [c00000000037a9b0] handle_mm_fault+0x140/0x250 > > > > [c0000002125dfd40] [c000000000074bb0] __do_page_fault+0x300/0xd60 > > > > [c0000002125dfe20] [c00000000000acf4] handle_page_fault+0x18 > > > > > > > > Now that is WARN_ON in set_pte_at which is > > > > > > > > VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep)); > > > > > > > > The problem is that on some architectures set_pte_at() cannot cope with > > > > a situation where there is already some (different) valid entry present. > > > > > > > > Use ptep_set_access_flags() instead to modify the pfn which is built to > > > > deal with modifying existing PTE. > > > > > > > > CC: stable@vger.kernel.org > > > > Fixes: b2770da64254 "mm: add vm_insert_mixed_mkwrite()" > > > > Reported-by: "Aneesh Kumar K.V" > > > > Signed-off-by: Jan Kara > > > > > > Acked-by: Dan Williams > > > > > > Andrew, can you pick this up? > > > > Andrew, ping? > > I merged this a couple of weeks ago and it's in the queue for 5.1. Ah, sorry. I didn't find any email about this in my archives. Not sure what happened. Thanks for merging the patch! Honza -- Jan Kara SUSE Labs, CR