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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 117E1C433F5 for ; Tue, 5 Apr 2022 23:02:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C0E56B0074; Tue, 5 Apr 2022 19:02:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 670596B0075; Tue, 5 Apr 2022 19:02:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 511A26B0078; Tue, 5 Apr 2022 19:02:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 43F646B0074 for ; Tue, 5 Apr 2022 19:02:48 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1416124746 for ; Tue, 5 Apr 2022 23:02:38 +0000 (UTC) X-FDA: 79324351596.19.FCEB29B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf07.hostedemail.com (Postfix) with ESMTP id 93F7440017 for ; Tue, 5 Apr 2022 23:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649199757; 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: in-reply-to:in-reply-to:references:references; bh=nm8FXkM0Ei9hiKJXL/DcOuwIbxTLnuGbkfriU0zEGU4=; b=LalpjvSU0WNGzALSVQCE4/O6gvsfns3Ql0mbeiqcmRaf2n8zflUxtO2120k7CLiohS6i4D y7eiasQCeqKTVFu/iRIL7FaisxObe70Ni+uiH+fDrorZhAGCT59rZ1Tlp31rJHFBPrySph wDfeHjoVs9G6xOWNFndx2z2ajz7vFUs= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-Cdlur_WcPgC0i8mf0_zIsA-1; Tue, 05 Apr 2022 19:02:35 -0400 X-MC-Unique: Cdlur_WcPgC0i8mf0_zIsA-1 Received: by mail-io1-f71.google.com with SMTP id x16-20020a6bfe10000000b006409f03e39eso490584ioh.7 for ; Tue, 05 Apr 2022 16:02:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tJmB3NyGHJPctZ5Tp6VQA6j7TxUED1zTYueXlEtvASc=; b=3cVAAhQM041JZdZDlt8jIsN1dM27yESbdND8PPFs0Tm+3Sezuort2IXPAXfenbTqlv diJHBGJtfYHnktb/fWyvu72/Q7TXfeGhaDpaFs7mM30VQ6B5/+SOF3MruXTwMkxSTUwQ 0qFQy2ns5phfMkV1VxQbhAX6j+nzmQeqtsJagoV9Rs42s8fVY5bk89j/4VHKO8SOQ+Bf acZV94BArIU+9ZuX5ZGjjedHXbxwe4MmqzIXKiMhCK5SFdWXXcJ6BUjNmvCL2bms0e7H zZyYJXfZ1t9IOEKCBvaOGL9v7exu5wVtHm46v9fQK++2ztkmg3pV2S6/4QfQt7jGSdSd mc3Q== X-Gm-Message-State: AOAM533f3h9l/iw5YGO9oVD0Mxo3iOyYcSZzd6VQ+l1/hoGEUPbMfKHP QxMdj3DmCof0DLB1U5fvfiqhAYtq1pSxLoqI1AvZIS65ZZCWXoqvaztkgkFCYpnmyQGAXzUlNv/ Eyswmk54L05c= X-Received: by 2002:a02:cb4a:0:b0:323:5e9a:255c with SMTP id k10-20020a02cb4a000000b003235e9a255cmr3038727jap.12.1649199754958; Tue, 05 Apr 2022 16:02:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+9hSCp/2bZlP91Ebv6INEUuSFgp3H+pRfrTy0zNtLnQiDSpakgEIaIy1Up1k16a9mCzdMNw== X-Received: by 2002:a02:cb4a:0:b0:323:5e9a:255c with SMTP id k10-20020a02cb4a000000b003235e9a255cmr3038706jap.12.1649199754675; Tue, 05 Apr 2022 16:02:34 -0700 (PDT) Received: from xz-m1.local (cpec09435e3e0ee-cmc09435e3e0ec.cpe.net.cable.rogers.com. [99.241.198.116]) by smtp.gmail.com with ESMTPSA id r9-20020a6b6009000000b006412abddbbbsm9285044iog.24.2022.04.05.16.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:02:34 -0700 (PDT) Date: Tue, 5 Apr 2022 19:02:32 -0400 From: Peter Xu To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mike Kravetz , David Hildenbrand , Matthew Wilcox , Alistair Popple , Nadav Amit , Axel Rasmussen , Andrea Arcangeli , "Kirill A . Shutemov" , Hugh Dickins , Jerome Glisse , Mike Rapoport Subject: Re: [PATCH v8 00/23] userfaultfd-wp: Support shmem and hugetlbfs Message-ID: References: <20220405014646.13522-1-peterx@redhat.com> <20220405151616.bf25fa4aad55536cd031e1ab@linux-foundation.org> <20220405154912.4cda03c2cc5d801d25d5c2dd@linux-foundation.org> MIME-Version: 1.0 In-Reply-To: <20220405154912.4cda03c2cc5d801d25d5c2dd@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="3ob9n8+f6vq4lAWQ" Content-Disposition: inline X-Stat-Signature: r6enbafw1y7jxs9dutz4ou5rwkobo9du X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 93F7440017 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LalpjvSU; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf07.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=peterx@redhat.com X-Rspam-User: X-HE-Tag: 1649199757-551280 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: --3ob9n8+f6vq4lAWQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Apr 05, 2022 at 03:49:12PM -0700, Andrew Morton wrote: > On Tue, 5 Apr 2022 18:42:43 -0400 Peter Xu wrote: > > > On Tue, Apr 05, 2022 at 03:16:16PM -0700, Andrew Morton wrote: > > > On Mon, 4 Apr 2022 21:46:23 -0400 Peter Xu wrote: > > > > > > > This is v8 of the series to add shmem+hugetlbfs support for userfaultfd > > > > write protection. > > > > > > Various compilation catastrophes with x86_64 allnoconfig. I poked at > > > the include ordering for a while but other things quickly became more > > > attractive ;) > > > > Sorry about that. I still don't know what's the problem, but I'll give it > > a shot soon. > > > > I think I only tried out with the new configs but not all the rest configs. > > I thought there're some bot looking after that one, from which I used to > > receive build reports. And IIRC I fixed some build issues in early versions > > from those reports. Maybe I was wrong.. > > > > Any more hints on the latter? > > `make allnoconfig'? > Ah! I thought when you mentioned "other things" you meant there're other more severe issues... :) For the allnoconfig, could you try with the attached quick fixup (upon patch "mm/uffd: PTE_MARKER_UFFD_WP")? That works for me on x86/arm, but I'm still trying out some other configs. Thanks, -- Peter Xu --3ob9n8+f6vq4lAWQ Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-fixup-mm-uffd-PTE_MARKER_UFFD_WP.patch" >From 83dbc502eeaba12071413691374474c09e9f24bb Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Tue, 5 Apr 2022 19:00:37 -0400 Subject: [PATCH] fixup! mm/uffd: PTE_MARKER_UFFD_WP Signed-off-by: Peter Xu --- include/linux/userfaultfd_k.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h index ea11bed9bb7e..732b522bacb7 100644 --- a/include/linux/userfaultfd_k.h +++ b/include/linux/userfaultfd_k.h @@ -277,8 +277,12 @@ static inline bool uffd_disable_fault_around(struct vm_area_struct *vma) static inline bool pte_marker_entry_uffd_wp(swp_entry_t entry) { +#ifdef CONFIG_PTE_MARKER_UFFD_WP return is_pte_marker_entry(entry) && (pte_marker_get(entry) & PTE_MARKER_UFFD_WP); +#else + return false; +#endif } static inline bool pte_marker_uffd_wp(pte_t pte) -- 2.32.0 --3ob9n8+f6vq4lAWQ--