Re: [PATCH v8 10/23] mm/shmem: Handle uffd-wp during fork()

From: Peter Xu
Date: Wed Apr 06 2022 - 11:16:54 EST


I assume below should be the same issue as the allnoconfig one Andrew
reported, IOW after the fixup squashed this report along with the other one
in patch 4 should go away. Let me know otherwise..

Thanks,

On Wed, Apr 06, 2022 at 02:16:56PM +0800, kernel test robot wrote:
> All warnings (new ones prefixed by >>):
>
> In file included from arch/ia64/include/asm/pgtable.h:153,
> from include/linux/pgtable.h:6,
> from arch/ia64/include/asm/uaccess.h:40,
> from include/linux/uaccess.h:11,
> from arch/ia64/include/asm/sections.h:11,
> from include/linux/interrupt.h:21,
> from include/linux/kernel_stat.h:9,
> from mm/memory.c:42:
> arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
> arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
> 127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
> | ^~~~~~~
> In file included from include/linux/mm_inline.h:9,
> from mm/memory.c:44:
> include/linux/userfaultfd_k.h: In function 'pte_marker_entry_uffd_wp':
> include/linux/userfaultfd_k.h:260:16: error: implicit declaration of function 'is_pte_marker_entry' [-Werror=implicit-function-declaration]
> 260 | return is_pte_marker_entry(entry) &&
> | ^~~~~~~~~~~~~~~~~~~
> include/linux/userfaultfd_k.h:261:14: error: implicit declaration of function 'pte_marker_get' [-Werror=implicit-function-declaration]
> 261 | (pte_marker_get(entry) & PTE_MARKER_UFFD_WP);
> | ^~~~~~~~~~~~~~
> include/linux/userfaultfd_k.h:261:38: error: 'PTE_MARKER_UFFD_WP' undeclared (first use in this function)
> 261 | (pte_marker_get(entry) & PTE_MARKER_UFFD_WP);
> | ^~~~~~~~~~~~~~~~~~
> include/linux/userfaultfd_k.h:261:38: note: each undeclared identifier is reported only once for each function it appears in
> In file included from include/linux/mm_inline.h:10,
> from mm/memory.c:44:
> include/linux/swapops.h: At top level:
> include/linux/swapops.h:289:20: error: conflicting types for 'is_pte_marker_entry'; have 'bool(swp_entry_t)' {aka '_Bool(swp_entry_t)'}
> 289 | static inline bool is_pte_marker_entry(swp_entry_t entry)
> | ^~~~~~~~~~~~~~~~~~~
> In file included from include/linux/mm_inline.h:9,
> from mm/memory.c:44:
> include/linux/userfaultfd_k.h:260:16: note: previous implicit declaration of 'is_pte_marker_entry' with type 'int()'
> 260 | return is_pte_marker_entry(entry) &&
> | ^~~~~~~~~~~~~~~~~~~
> In file included from include/linux/mm_inline.h:10,
> from mm/memory.c:44:
> include/linux/swapops.h:294:26: error: conflicting types for 'pte_marker_get'; have 'pte_marker(swp_entry_t)' {aka 'long unsigned int(swp_entry_t)'}
> 294 | static inline pte_marker pte_marker_get(swp_entry_t entry)
> | ^~~~~~~~~~~~~~
> In file included from include/linux/mm_inline.h:9,
> from mm/memory.c:44:
> include/linux/userfaultfd_k.h:261:14: note: previous implicit declaration of 'pte_marker_get' with type 'int()'
> 261 | (pte_marker_get(entry) & PTE_MARKER_UFFD_WP);
> | ^~~~~~~~~~~~~~

--
Peter Xu