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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 8A201C34026 for ; Tue, 18 Feb 2020 16:11:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4BC7221D56 for ; Tue, 18 Feb 2020 16:11:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MBkQEM5O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BC7221D56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EB6B06B0003; Tue, 18 Feb 2020 11:11:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E67B86B0008; Tue, 18 Feb 2020 11:11:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D2F186B000A; Tue, 18 Feb 2020 11:11:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id BAE6F6B0003 for ; Tue, 18 Feb 2020 11:11:24 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5CB0F82499A8 for ; Tue, 18 Feb 2020 16:11:24 +0000 (UTC) X-FDA: 76503737688.26.point42_2940868508b60 X-HE-Tag: point42_2940868508b60 X-Filterd-Recvd-Size: 6177 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Feb 2020 16:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582042282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lqf38boNQxCeq760vU4w7nxrAgKOCHEvmedCfGFrbyk=; b=MBkQEM5OYoxCIXGo2SKAHj9ye0OGBtip3dfVlqqQobFHZgyj1LTFpj7GGQoSicK/2rwK7e yS2mklfef4nB5ZtEXgLbffEqIsRv8jgCr1OFatDJTtdIdOXsKpFhXr1zUgZfm4TYh2jMu2 zm2uzjz9gFkbKdmQ71g+psdzyBXUEH0= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-392-vD2nZPXzPTWmO9GueouqqA-1; Tue, 18 Feb 2020 11:11:16 -0500 Received: by mail-qv1-f69.google.com with SMTP id z9so12658062qvo.10 for ; Tue, 18 Feb 2020 08:11:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xtVxSnLQhBRQi9E46Vg+UFDvswVXyAHUtw4gNVo9AWU=; b=Ax6MBbdvhDyWobRqIkziwQ+n7Kw4UBKGJpKseo9SOgXQ+XTzx62Pq/WQ5gJbNKHRDg giIX1lfgkRo8bk9PWU0jEz12UpN4fm2b6D33wQhShJZdv/My2Awty4e20xhDkowvikSe 7sjo4vc+yycopiGqNk775WsAR9IEeEevL2ja3P/O2kj57uO6qrfhlo+i8FOSoPJKkEzW WQ3N+MRMPlOwUDxmCVd2Hc/INKuROuWHcUfq2wS4xcexMyT91jfX7c9UmGalhmk2jTo7 9gTUfDtQDBT4kPVbp43SV+DpdNttFHbr2zVZbYIGUZKX6XcgFdBabmSBVKwA4KLvSMIg IPNw== X-Gm-Message-State: APjAAAVvt102NzLknTn8KX8mOTwh6lz0jghypk8rXBRVGsA1Sri5ggrl 8ysTgvCMwNRosSLDt3dSHVUrGIy1vmp/K5Fji4rj/TDYcR+zW85u1+IofJKUgwRO5TudvbdS7xP afq6medYn/gQ= X-Received: by 2002:ad4:4d85:: with SMTP id cv5mr16879815qvb.171.1582042276103; Tue, 18 Feb 2020 08:11:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwsAFNHnhCqjsdFksUjKyJOjKL33lq+lIUXEzX2KQ7pwl8HAXt1k5OJPRMX/bXlWcKQWVks9w== X-Received: by 2002:ad4:4d85:: with SMTP id cv5mr16879778qvb.171.1582042275771; Tue, 18 Feb 2020 08:11:15 -0800 (PST) Received: from xz-x1 ([104.156.64.74]) by smtp.gmail.com with ESMTPSA id 65sm2013694qtf.95.2020.02.18.08.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 08:11:14 -0800 (PST) Date: Tue, 18 Feb 2020 11:11:13 -0500 From: Peter Xu To: Bobby Powers Cc: linux-mm@kvack.org, Kernel development list , David Hildenbrand , Hugh Dickins , Maya Gokhale , Jerome Glisse , Pavel Emelyanov , Johannes Weiner , Martin Cracauer , Denis Plotnikov , Shaohua Li , Andrea Arcangeli , Mike Kravetz , Marty McFadden , Mike Rapoport , Mel Gorman , "Kirill A . Shutemov" , "Dr . David Alan Gilbert" Subject: Re: [PATCH v5 00/25] userfaultfd: write protection support Message-ID: <20200218161113.GA1408806@xz-x1> References: <20190620022008.19172-1-peterx@redhat.com> MIME-Version: 1.0 In-Reply-To: X-MC-Unique: vD2nZPXzPTWmO9GueouqqA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 Mon, Feb 17, 2020 at 07:59:12PM -0800, Bobby Powers wrote: > On Wed, Jun 19, 2019 at 7:20 PM Peter Xu wrote: > > This series implements initial write protection support for > > userfaultfd. Currently both shmem and hugetlbfs are not supported > > yet, but only anonymous memory. This is the 4nd version of it. > > > > The latest code can also be found at: > > > > https://github.com/xzpeter/linux/tree/uffd-wp-merged >=20 > Hi Peter - I ported the branch you had above on top of v5.4.20 (what I > happened to be running locally), and fixed one issue that was causing > crashes for me: > https://github.com/bpowers/linux/commit/61086b5a0fa4aeb494e86d999926551a4= 323b84f Hi, Bobby, Thanks for playing with the branch! Yes, this should be needed if you have 7d0325749a6c ("userfaultfd: untag user pointers", 2019-09-25) in your base branch where the address is replaced by its pointer. > I wrote a small test program here: > https://github.com/plasma-umass/Mesh/blob/master/src/test/userfaultfd-ker= nel-copy.cc Just FYI that there's some other tests/libraries over there [1,2]. Also the series has the uffd selftest for write-protection as well. > and write protection support for userfaultfd (with eventual shmem > support) would be _hugely_ helpful for a userspace memory allocator > I'm working on. Is there anything I can do to help get this > considered for mainline? We have some time before the 5.7 merge > window opens up. Tested-by: Bobby Powers Thanks for the tag! Yes it would be great if we can continue to work on those, but for now let's see whether we can move on what we have first (it's already two series without much certainty on whether it could get merged soon). Considering that we've got quite a few pings again for either the mm retry series and the write-protect work, I'll rebase the two series, test & post soon this week. I'll keep you in the loop. Thanks, [1] https://github.com/LLNL/umap [2] https://github.com/xzpeter/clibs/blob/master/gpl/userspace/uffd-test/uf= fd-test.c --=20 Peter Xu