All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
@ 2022-04-21 10:34 kernel test robot
  2022-04-21 19:38   ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2022-04-21 10:34 UTC (permalink / raw)
  To: Peter Xu; +Cc: kbuild-all, Linux Memory Management List, Andrew Morton

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
commit: 92393159862dde44e440892eb43ca48dc8c924c3 [5135/5346] fixup! mm/hugetlb: Only drop uffd-wp special pte if required
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204211854.p1LJEBHt-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92393159862dde44e440892eb43ca48dc8c924c3
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 92393159862dde44e440892eb43ca48dc8c924c3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virt/nitro_enclaves/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/virt/nitro_enclaves/ne_misc_dev.c:16:
>> include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
     411 |                         zap_flags_t zap_flags)
         |                         ^~~~~~~~~~~
         |                         vm_flags_t


vim +411 include/linux/hugetlb.h

   407	
   408	static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb,
   409				struct vm_area_struct *vma, unsigned long start,
   410				unsigned long end, struct page *ref_page,
 > 411				zap_flags_t zap_flags)
   412	{
   413		BUG();
   414	}
   415	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
  2022-04-21 10:34 [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? kernel test robot
@ 2022-04-21 19:38   ` Andrew Morton
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2022-04-21 19:38 UTC (permalink / raw)
  To: kernel test robot; +Cc: Peter Xu, kbuild-all, Linux Memory Management List

On Thu, 21 Apr 2022 18:34:32 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
> commit: 92393159862dde44e440892eb43ca48dc8c924c3 [5135/5346] fixup! mm/hugetlb: Only drop uffd-wp special pte if required
> config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204211854.p1LJEBHt-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92393159862dde44e440892eb43ca48dc8c924c3
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 92393159862dde44e440892eb43ca48dc8c924c3
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virt/nitro_enclaves/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from drivers/virt/nitro_enclaves/ne_misc_dev.c:16:
> >> include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?

Thanks.

I could include mm.h in drivers/virt/nitro_enclaves/ne_misc_dev.c, but
hugetlb.h should be standalone and I don't know what including mm.h
from hugetlb.h will do.

I'll test this instead:

--- a/include/linux/hugetlb.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/hugetlb.h
@@ -1124,4 +1124,14 @@ bool want_pmd_share(struct vm_area_struc
 #define flush_hugetlb_tlb_range(vma, addr, end)	flush_tlb_range(vma, addr, end)
 #endif
 
+typedef unsigned int __bitwise zap_flags_t;
+
+/*
+ * Whether to drop the pte markers, for example, the uffd-wp information for
+ * file-backed memory.  This should only be specified when we will completely
+ * drop the page in the mm, either by truncation or unmapping of the vma.  By
+ * default, the flag is not set.
+ */
+#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
+
 #endif /* _LINUX_HUGETLB_H */
--- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/mm.h
@@ -3431,14 +3431,4 @@ madvise_set_anon_name(struct mm_struct *
 }
 #endif
 
-typedef unsigned int __bitwise zap_flags_t;
-
-/*
- * Whether to drop the pte markers, for example, the uffd-wp information for
- * file-backed memory.  This should only be specified when we will completely
- * drop the page in the mm, either by truncation or unmapping of the vma.  By
- * default, the flag is not set.
- */
-#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
-
 #endif /* _LINUX_MM_H */
_



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
@ 2022-04-21 19:38   ` Andrew Morton
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2022-04-21 19:38 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2990 bytes --]

On Thu, 21 Apr 2022 18:34:32 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
> commit: 92393159862dde44e440892eb43ca48dc8c924c3 [5135/5346] fixup! mm/hugetlb: Only drop uffd-wp special pte if required
> config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204211854.p1LJEBHt-lkp(a)intel.com/config)
> compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92393159862dde44e440892eb43ca48dc8c924c3
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 92393159862dde44e440892eb43ca48dc8c924c3
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virt/nitro_enclaves/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from drivers/virt/nitro_enclaves/ne_misc_dev.c:16:
> >> include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?

Thanks.

I could include mm.h in drivers/virt/nitro_enclaves/ne_misc_dev.c, but
hugetlb.h should be standalone and I don't know what including mm.h
from hugetlb.h will do.

I'll test this instead:

--- a/include/linux/hugetlb.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/hugetlb.h
@@ -1124,4 +1124,14 @@ bool want_pmd_share(struct vm_area_struc
 #define flush_hugetlb_tlb_range(vma, addr, end)	flush_tlb_range(vma, addr, end)
 #endif
 
+typedef unsigned int __bitwise zap_flags_t;
+
+/*
+ * Whether to drop the pte markers, for example, the uffd-wp information for
+ * file-backed memory.  This should only be specified when we will completely
+ * drop the page in the mm, either by truncation or unmapping of the vma.  By
+ * default, the flag is not set.
+ */
+#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
+
 #endif /* _LINUX_HUGETLB_H */
--- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/mm.h
@@ -3431,14 +3431,4 @@ madvise_set_anon_name(struct mm_struct *
 }
 #endif
 
-typedef unsigned int __bitwise zap_flags_t;
-
-/*
- * Whether to drop the pte markers, for example, the uffd-wp information for
- * file-backed memory.  This should only be specified when we will completely
- * drop the page in the mm, either by truncation or unmapping of the vma.  By
- * default, the flag is not set.
- */
-#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
-
 #endif /* _LINUX_MM_H */
_

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
  2022-04-21 19:38   ` Andrew Morton
@ 2022-04-21 19:51     ` Peter Xu
  -1 siblings, 0 replies; 9+ messages in thread
From: Peter Xu @ 2022-04-21 19:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kernel test robot, kbuild-all, Linux Memory Management List

On Thu, Apr 21, 2022 at 12:38:49PM -0700, Andrew Morton wrote:
> On Thu, 21 Apr 2022 18:34:32 +0800 kernel test robot <lkp@intel.com> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
> > commit: 92393159862dde44e440892eb43ca48dc8c924c3 [5135/5346] fixup! mm/hugetlb: Only drop uffd-wp special pte if required
> > config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204211854.p1LJEBHt-lkp@intel.com/config)
> > compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
> > reproduce (this is a W=1 build):
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92393159862dde44e440892eb43ca48dc8c924c3
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout 92393159862dde44e440892eb43ca48dc8c924c3
> >         # save the config file
> >         mkdir build_dir && cp config build_dir/.config
> >         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virt/nitro_enclaves/
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    In file included from drivers/virt/nitro_enclaves/ne_misc_dev.c:16:
> > >> include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
> 
> Thanks.
> 
> I could include mm.h in drivers/virt/nitro_enclaves/ne_misc_dev.c, but
> hugetlb.h should be standalone and I don't know what including mm.h
> from hugetlb.h will do.
> 
> I'll test this instead:
> 
> --- a/include/linux/hugetlb.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/hugetlb.h
> @@ -1124,4 +1124,14 @@ bool want_pmd_share(struct vm_area_struc
>  #define flush_hugetlb_tlb_range(vma, addr, end)	flush_tlb_range(vma, addr, end)
>  #endif
>  
> +typedef unsigned int __bitwise zap_flags_t;
> +
> +/*
> + * Whether to drop the pte markers, for example, the uffd-wp information for
> + * file-backed memory.  This should only be specified when we will completely
> + * drop the page in the mm, either by truncation or unmapping of the vma.  By
> + * default, the flag is not set.
> + */
> +#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> +
>  #endif /* _LINUX_HUGETLB_H */
> --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/mm.h
> @@ -3431,14 +3431,4 @@ madvise_set_anon_name(struct mm_struct *
>  }
>  #endif
>  
> -typedef unsigned int __bitwise zap_flags_t;
> -
> -/*
> - * Whether to drop the pte markers, for example, the uffd-wp information for
> - * file-backed memory.  This should only be specified when we will completely
> - * drop the page in the mm, either by truncation or unmapping of the vma.  By
> - * default, the flag is not set.
> - */
> -#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> -
>  #endif /* _LINUX_MM_H */
> _
> 

Andrew,

It may work, but I have worry that zap_flags_t should still be a common
struct for mm not hugetlb specific, let's say it's still legal some .c file
wants to reference it without hugetlb knowledge?

From that POV, could we perhaps move these chunk into mm_types.h (which
hugetlb.h includes anyway)?

Thanks,

-- 
Peter Xu



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
@ 2022-04-21 19:51     ` Peter Xu
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Xu @ 2022-04-21 19:51 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3538 bytes --]

On Thu, Apr 21, 2022 at 12:38:49PM -0700, Andrew Morton wrote:
> On Thu, 21 Apr 2022 18:34:32 +0800 kernel test robot <lkp@intel.com> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   65eb92e4c9f0a962656f131521f4fbc0d24c9d4c
> > commit: 92393159862dde44e440892eb43ca48dc8c924c3 [5135/5346] fixup! mm/hugetlb: Only drop uffd-wp special pte if required
> > config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204211854.p1LJEBHt-lkp(a)intel.com/config)
> > compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
> > reproduce (this is a W=1 build):
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92393159862dde44e440892eb43ca48dc8c924c3
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout 92393159862dde44e440892eb43ca48dc8c924c3
> >         # save the config file
> >         mkdir build_dir && cp config build_dir/.config
> >         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virt/nitro_enclaves/
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    In file included from drivers/virt/nitro_enclaves/ne_misc_dev.c:16:
> > >> include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
> 
> Thanks.
> 
> I could include mm.h in drivers/virt/nitro_enclaves/ne_misc_dev.c, but
> hugetlb.h should be standalone and I don't know what including mm.h
> from hugetlb.h will do.
> 
> I'll test this instead:
> 
> --- a/include/linux/hugetlb.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/hugetlb.h
> @@ -1124,4 +1124,14 @@ bool want_pmd_share(struct vm_area_struc
>  #define flush_hugetlb_tlb_range(vma, addr, end)	flush_tlb_range(vma, addr, end)
>  #endif
>  
> +typedef unsigned int __bitwise zap_flags_t;
> +
> +/*
> + * Whether to drop the pte markers, for example, the uffd-wp information for
> + * file-backed memory.  This should only be specified when we will completely
> + * drop the page in the mm, either by truncation or unmapping of the vma.  By
> + * default, the flag is not set.
> + */
> +#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> +
>  #endif /* _LINUX_HUGETLB_H */
> --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/mm.h
> @@ -3431,14 +3431,4 @@ madvise_set_anon_name(struct mm_struct *
>  }
>  #endif
>  
> -typedef unsigned int __bitwise zap_flags_t;
> -
> -/*
> - * Whether to drop the pte markers, for example, the uffd-wp information for
> - * file-backed memory.  This should only be specified when we will completely
> - * drop the page in the mm, either by truncation or unmapping of the vma.  By
> - * default, the flag is not set.
> - */
> -#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> -
>  #endif /* _LINUX_MM_H */
> _
> 

Andrew,

It may work, but I have worry that zap_flags_t should still be a common
struct for mm not hugetlb specific, let's say it's still legal some .c file
wants to reference it without hugetlb knowledge?

>From that POV, could we perhaps move these chunk into mm_types.h (which
hugetlb.h includes anyway)?

Thanks,

-- 
Peter Xu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
  2022-04-21 19:51     ` Peter Xu
@ 2022-04-21 20:02       ` Andrew Morton
  -1 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2022-04-21 20:02 UTC (permalink / raw)
  To: Peter Xu; +Cc: kernel test robot, kbuild-all, Linux Memory Management List

On Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu <peterx@redhat.com> wrote:

> > - * file-backed memory.  This should only be specified when we will completely
> > - * drop the page in the mm, either by truncation or unmapping of the vma.  By
> > - * default, the flag is not set.
> > - */
> > -#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> > -
> >  #endif /* _LINUX_MM_H */
> > _
> > 
> 
> Andrew,
> 
> It may work, but I have worry that zap_flags_t should still be a common
> struct for mm not hugetlb specific, let's say it's still legal some .c file
> wants to reference it without hugetlb knowledge?
> 
> >From that POV, could we perhaps move these chunk into mm_types.h (which
> hugetlb.h includes anyway)?
> 

Sure.  ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in
mm.h?


--- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/mm.h
@@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct *
 }
 #endif
 
-typedef unsigned int __bitwise zap_flags_t;
-
 /*
  * Whether to drop the pte markers, for example, the uffd-wp information for
  * file-backed memory.  This should only be specified when we will completely
--- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/mm_types.h
@@ -850,4 +850,6 @@ enum fault_flag {
 	FAULT_FLAG_ORIG_PTE_VALID =	1 << 11,
 };
 
+typedef unsigned int __bitwise zap_flags_t;
+
 #endif /* _LINUX_MM_TYPES_H */
_



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
@ 2022-04-21 20:02       ` Andrew Morton
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2022-04-21 20:02 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

On Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu <peterx@redhat.com> wrote:

> > - * file-backed memory.  This should only be specified when we will completely
> > - * drop the page in the mm, either by truncation or unmapping of the vma.  By
> > - * default, the flag is not set.
> > - */
> > -#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> > -
> >  #endif /* _LINUX_MM_H */
> > _
> > 
> 
> Andrew,
> 
> It may work, but I have worry that zap_flags_t should still be a common
> struct for mm not hugetlb specific, let's say it's still legal some .c file
> wants to reference it without hugetlb knowledge?
> 
> >From that POV, could we perhaps move these chunk into mm_types.h (which
> hugetlb.h includes anyway)?
> 

Sure.  ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in
mm.h?


--- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/mm.h
@@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct *
 }
 #endif
 
-typedef unsigned int __bitwise zap_flags_t;
-
 /*
  * Whether to drop the pte markers, for example, the uffd-wp information for
  * file-backed memory.  This should only be specified when we will completely
--- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
+++ a/include/linux/mm_types.h
@@ -850,4 +850,6 @@ enum fault_flag {
 	FAULT_FLAG_ORIG_PTE_VALID =	1 << 11,
 };
 
+typedef unsigned int __bitwise zap_flags_t;
+
 #endif /* _LINUX_MM_TYPES_H */
_

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
  2022-04-21 20:02       ` Andrew Morton
@ 2022-04-21 20:29         ` Peter Xu
  -1 siblings, 0 replies; 9+ messages in thread
From: Peter Xu @ 2022-04-21 20:29 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kernel test robot, kbuild-all, Linux Memory Management List

On Thu, Apr 21, 2022 at 01:02:25PM -0700, Andrew Morton wrote:
> On Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu <peterx@redhat.com> wrote:
> 
> > > - * file-backed memory.  This should only be specified when we will completely
> > > - * drop the page in the mm, either by truncation or unmapping of the vma.  By
> > > - * default, the flag is not set.
> > > - */
> > > -#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> > > -
> > >  #endif /* _LINUX_MM_H */
> > > _
> > > 
> > 
> > Andrew,
> > 
> > It may work, but I have worry that zap_flags_t should still be a common
> > struct for mm not hugetlb specific, let's say it's still legal some .c file
> > wants to reference it without hugetlb knowledge?
> > 
> > >From that POV, could we perhaps move these chunk into mm_types.h (which
> > hugetlb.h includes anyway)?
> > 
> 
> Sure.  ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in
> mm.h?

Sounds good, thanks!

> 
> 
> --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/mm.h
> @@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct *
>  }
>  #endif
>  
> -typedef unsigned int __bitwise zap_flags_t;
> -
>  /*
>   * Whether to drop the pte markers, for example, the uffd-wp information for
>   * file-backed memory.  This should only be specified when we will completely
> --- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/mm_types.h
> @@ -850,4 +850,6 @@ enum fault_flag {
>  	FAULT_FLAG_ORIG_PTE_VALID =	1 << 11,
>  };
>  
> +typedef unsigned int __bitwise zap_flags_t;
> +
>  #endif /* _LINUX_MM_TYPES_H */
> _
> 

-- 
Peter Xu



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'?
@ 2022-04-21 20:29         ` Peter Xu
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Xu @ 2022-04-21 20:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1749 bytes --]

On Thu, Apr 21, 2022 at 01:02:25PM -0700, Andrew Morton wrote:
> On Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu <peterx@redhat.com> wrote:
> 
> > > - * file-backed memory.  This should only be specified when we will completely
> > > - * drop the page in the mm, either by truncation or unmapping of the vma.  By
> > > - * default, the flag is not set.
> > > - */
> > > -#define  ZAP_FLAG_DROP_MARKER        ((__force zap_flags_t) BIT(0))
> > > -
> > >  #endif /* _LINUX_MM_H */
> > > _
> > > 
> > 
> > Andrew,
> > 
> > It may work, but I have worry that zap_flags_t should still be a common
> > struct for mm not hugetlb specific, let's say it's still legal some .c file
> > wants to reference it without hugetlb knowledge?
> > 
> > >From that POV, could we perhaps move these chunk into mm_types.h (which
> > hugetlb.h includes anyway)?
> > 
> 
> Sure.  ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in
> mm.h?

Sounds good, thanks!

> 
> 
> --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/mm.h
> @@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct *
>  }
>  #endif
>  
> -typedef unsigned int __bitwise zap_flags_t;
> -
>  /*
>   * Whether to drop the pte markers, for example, the uffd-wp information for
>   * file-backed memory.  This should only be specified when we will completely
> --- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix
> +++ a/include/linux/mm_types.h
> @@ -850,4 +850,6 @@ enum fault_flag {
>  	FAULT_FLAG_ORIG_PTE_VALID =	1 << 11,
>  };
>  
> +typedef unsigned int __bitwise zap_flags_t;
> +
>  #endif /* _LINUX_MM_TYPES_H */
> _
> 

-- 
Peter Xu

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-21 20:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 10:34 [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? kernel test robot
2022-04-21 19:38 ` Andrew Morton
2022-04-21 19:38   ` Andrew Morton
2022-04-21 19:51   ` Peter Xu
2022-04-21 19:51     ` Peter Xu
2022-04-21 20:02     ` Andrew Morton
2022-04-21 20:02       ` Andrew Morton
2022-04-21 20:29       ` Peter Xu
2022-04-21 20:29         ` Peter Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.