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=-7.7 required=3.0 tests=BAYES_00,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 42306C433DB for ; Fri, 8 Jan 2021 12:49:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 070B2239FE for ; Fri, 8 Jan 2021 12:49:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726938AbhAHMtF (ORCPT ); Fri, 8 Jan 2021 07:49:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:57694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbhAHMtE (ORCPT ); Fri, 8 Jan 2021 07:49:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1A0423975; Fri, 8 Jan 2021 12:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610110103; bh=36VZw2L66bGcuQh5lKshp8v9vfagj/C2VUJhkwmPQHE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iT3tw22cOC4rEe+FXic7rm/lVuU6IAYPYgodiMJg6+41ROlW354+Xhu2uBi2ND02D rwBxzIxxfFUDXwiR4kAnDgpY5u5QTqx6PR1Eo5fH/GrpHPcna+ONSNYSXbgEu6sKj1 /CL1n30AYNwZZwaEptIULV8Vn8WJ0GrdWOodfppdOI6QTU1lQV4ubFwY60TRCw18R4 niyvX3VogLN3wRZArtLNPT000RvUjSwgItDZeAEoDFbRRmF+H1GRnsGwNuZ656+xGW ovwZdvqeVcPcYz/dTQPpOntJI2oEWl5HKdQhtwvsLn3T/8y3s7geRpZibEkO4h1RRy h4DvBXWUYX13Q== Date: Fri, 8 Jan 2021 12:48:16 +0000 From: Will Deacon To: Linus Torvalds Cc: Andrea Arcangeli , Linux-MM , Linux Kernel Mailing List , Yu Zhao , Andy Lutomirski , Peter Xu , Pavel Emelyanov , Mike Kravetz , Mike Rapoport , Minchan Kim , Peter Zijlstra , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Oleg Nesterov , Jann Horn , Kees Cook , John Hubbard , Leon Romanovsky , Jason Gunthorpe , Jan Kara , Kirill Tkhai Subject: Re: [PATCH 2/2] mm: soft_dirty: userfaultfd: introduce wrprotect_tlb_flush_pending Message-ID: <20210108124815.GA4512@willie-the-truck> References: <20210107200402.31095-1-aarcange@redhat.com> <20210107200402.31095-3-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 04:25:54PM -0800, Linus Torvalds wrote: > Please. Why is the correct patch not the attached one (apart from the > obvious fact that I haven't tested it and maybe just screwed up > completely - but you get the idea)? It certainly looks simple and correct to me, although it means we're now taking the mmap sem for write in the case where we only want to clear the access flag, which should be fine with the thing only held for read, no? Will