Message ID | 20230309135718.1490461-3-usama.anjum@collabora.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Implement IOCTL to get and optionally clear info about PTEs | expand |
Hi, On Thu, Mar 09, 2023 at 06:57:13PM +0500, Muhammad Usama Anjum wrote: > Define uffd_wp_range() for the cases when CONFIG_USERFAULTFD isn't set. > > Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> > --- > include/linux/userfaultfd_k.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h > index b680c0ec8b85..fd1a1ecdb5f6 100644 > --- a/include/linux/userfaultfd_k.h > +++ b/include/linux/userfaultfd_k.h > @@ -182,6 +182,14 @@ extern int userfaultfd_wp_async(struct vm_area_struct *vma); > > #else /* CONFIG_USERFAULTFD */ > > +extern inline long uffd_wp_range(struct mm_struct *dst_mm, static inline > + struct vm_area_struct *vma, > + unsigned long start, unsigned long len, > + bool enable_wp) > +{ > + return 0; > +} > + I didn't see uffd_wp_range() defined in the previous patch. Could be a rebase issue? In any case, the stub should be defined in the same patch as the actual function in order not to break bisectability. > /* mm helpers */ > static inline vm_fault_t handle_userfault(struct vm_fault *vmf, > unsigned long reason) > -- > 2.39.2 >
On 3/16/23 12:02 PM, Mike Rapoport wrote: > Hi, > > On Thu, Mar 09, 2023 at 06:57:13PM +0500, Muhammad Usama Anjum wrote: >> Define uffd_wp_range() for the cases when CONFIG_USERFAULTFD isn't set. >> >> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> >> --- >> include/linux/userfaultfd_k.h | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h >> index b680c0ec8b85..fd1a1ecdb5f6 100644 >> --- a/include/linux/userfaultfd_k.h >> +++ b/include/linux/userfaultfd_k.h >> @@ -182,6 +182,14 @@ extern int userfaultfd_wp_async(struct vm_area_struct *vma); >> >> #else /* CONFIG_USERFAULTFD */ >> >> +extern inline long uffd_wp_range(struct mm_struct *dst_mm, > > static inline I'll update. > >> + struct vm_area_struct *vma, >> + unsigned long start, unsigned long len, >> + bool enable_wp) >> +{ >> + return 0; >> +} >> + > > I didn't see uffd_wp_range() defined in the previous patch. > Could be a rebase issue? > > In any case, the stub should be defined in the same patch as the actual > function in order not to break bisectability. This 2/7 patch is a preparatory patch for 3/7 patch. I'll merge both then. > >> /* mm helpers */ >> static inline vm_fault_t handle_userfault(struct vm_fault *vmf, >> unsigned long reason) >> -- >> 2.39.2 >> >
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h index b680c0ec8b85..fd1a1ecdb5f6 100644 --- a/include/linux/userfaultfd_k.h +++ b/include/linux/userfaultfd_k.h @@ -182,6 +182,14 @@ extern int userfaultfd_wp_async(struct vm_area_struct *vma); #else /* CONFIG_USERFAULTFD */ +extern inline long uffd_wp_range(struct mm_struct *dst_mm, + struct vm_area_struct *vma, + unsigned long start, unsigned long len, + bool enable_wp) +{ + return 0; +} + /* mm helpers */ static inline vm_fault_t handle_userfault(struct vm_fault *vmf, unsigned long reason)
Define uffd_wp_range() for the cases when CONFIG_USERFAULTFD isn't set. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> --- include/linux/userfaultfd_k.h | 8 ++++++++ 1 file changed, 8 insertions(+)