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'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxx/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@xxxxxxxxx>
> > 
> > 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?


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux