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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 6258EECE58C for ; Tue, 15 Oct 2019 00:18:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2913921882 for ; Tue, 15 Oct 2019 00:18:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="InkkdLmS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2913921882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B814A8E0005; Mon, 14 Oct 2019 20:18:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B590F8E0001; Mon, 14 Oct 2019 20:18:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A46C68E0005; Mon, 14 Oct 2019 20:18:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 887AE8E0001 for ; Mon, 14 Oct 2019 20:18:42 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 0EF3A6D83 for ; Tue, 15 Oct 2019 00:18:42 +0000 (UTC) X-FDA: 76044108084.25.judge99_6903e7bd80440 X-HE-Tag: judge99_6903e7bd80440 X-Filterd-Recvd-Size: 2797 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 00:18:41 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66448217D9; Tue, 15 Oct 2019 00:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571098720; bh=rwoRiB+wQGU744n1zKSEPj4a2yJrIqPtZgHsJ+gOmQg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=InkkdLmSnOzul4H4R5ACoiK7D9dwZxnAkDvsoMiPOFdD26XeTzvD/ipLadEpVE5VL o1swarhHFBdtMoU+xGI8GEUhSp0cFOACydk/7GZf8nAj21bwbn4Nl30wkhwhsMAlaM 40fUHKf8UxJMK48BHD/nH3V+ReS9VpmKXsknnDn8= Date: Tue, 15 Oct 2019 01:18:34 +0100 From: Will Deacon To: Jia He Cc: Catalin Marinas , 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: <20191015001834.wwkd46t6dwicta7n@willie-the-truck> References: <20191011140939.6115-1-justin.he@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191011140939.6115-1-justin.he@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) 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, 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. Will