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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 2BB25FA3728 for ; Wed, 16 Oct 2019 14:33:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CB9912067D for ; Wed, 16 Oct 2019 14:33:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB9912067D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6EB828E0033; Wed, 16 Oct 2019 10:33:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69B398E0001; Wed, 16 Oct 2019 10:33:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5897D8E0033; Wed, 16 Oct 2019 10:33:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 37B458E0001 for ; Wed, 16 Oct 2019 10:33:02 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id CB38018028227 for ; Wed, 16 Oct 2019 14:33:01 +0000 (UTC) X-FDA: 76049889762.08.waste60_3739005a0b90d X-HE-Tag: waste60_3739005a0b90d X-Filterd-Recvd-Size: 2759 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Oct 2019 14:32:59 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2492D142F; Wed, 16 Oct 2019 07:32:57 -0700 (PDT) Received: from arrakis.emea.arm.com (unknown [10.1.196.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7C5453F68E; Wed, 16 Oct 2019 07:32:54 -0700 (PDT) Date: Wed, 16 Oct 2019 15:32:52 +0100 From: Catalin Marinas To: Will Deacon Cc: Jia He , Mark Rutland , James Morse , Marc Zyngier , Matthew Wilcox , "Kirill A. Shutemov" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Suzuki Poulose , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Thomas Gleixner , Andrew Morton , hejianet@gmail.com, Kaly Xin , nd@arm.com Subject: Re: [PATCH v12 0/4] fix double page fault in cow_user_page for pfn mapping Message-ID: <20191016143252.GJ49619@arrakis.emea.arm.com> References: <20191011140939.6115-1-justin.he@arm.com> <20191015001834.wwkd46t6dwicta7n@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191015001834.wwkd46t6dwicta7n@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Tue, Oct 15, 2019 at 01:18:34AM +0100, Will Deacon wrote: > On Fri, Oct 11, 2019 at 10:09:35PM +0800, Jia He wrote: > > When we tested pmdk unit test vmmalloc_fork TEST1 in arm64 guest, there > > will be a double page fault in __copy_from_user_inatomic of cow_user_page. > > > > As told by Catalin: "On arm64 without hardware Access Flag, copying from > > user will fail because the pte is old and cannot be marked young. So we > > always end up with zeroed page after fork() + CoW for pfn mappings. we > > don't always have a hardware-managed access flag on arm64." > > > > -Changes > > v12: > > refine PATCH 01, remove the !! since C languages can convert unsigned > > to bool (Catalin) > > Thanks. I think it's a bit late to take something like this for 5.4 now, > especially as the current behaviour has always been there. Hopefully > somebody can queue it for 5.5 instead. I can queue this through the arm64 tree for 5.5 if I get an ack on the x86 patch (3/4) or I don't hear any complaints. -- Catalin