lkml.org 
[lkml]   [2022]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v8 00/23] userfaultfd-wp: Support shmem and hugetlbfs
On Tue, Apr 05, 2022 at 03:49:12PM -0700, Andrew Morton wrote:
> On Tue, 5 Apr 2022 18:42:43 -0400 Peter Xu <peterx@redhat.com> 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 <peterx@redhat.com> 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
From 83dbc502eeaba12071413691374474c09e9f24bb Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@redhat.com>
Date: Tue, 5 Apr 2022 19:00:37 -0400
Subject: [PATCH] fixup! mm/uffd: PTE_MARKER_UFFD_WP

Signed-off-by: Peter Xu <peterx@redhat.com>
---
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
\
 
 \ /
  Last update: 2022-04-06 07:17    [W:0.056 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site