tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: 6e165f54437931f329d09dca6c19d99af08a36e1 commit: 6b72648c4e2b94fc7df65cab28a59b185a37c997 [166/172] mm: perform all memfd seal checks in a single place config: arm-randconfig-004-20241207 (https://download.01.org/0day-ci/archive/20241207/202412072101.6xUaltAj-lkp@xxxxxxxxx/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241207/202412072101.6xUaltAj-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202412072101.6xUaltAj-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from fs/fcntl.c:8: In file included from include/linux/syscalls.h:94: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:6: In file included from include/linux/ring_buffer.h:5: In file included from include/linux/mm.h:2287: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from fs/fcntl.c:26: >> include/linux/memfd.h:27:5: warning: no previous prototype for function 'memfd_check_seals_mmap' [-Wmissing-prototypes] 27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) | ^ include/linux/memfd.h:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 27 | int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) | ^ | static 2 warnings generated. vim +/memfd_check_seals_mmap +27 include/linux/memfd.h 6 7 #ifdef CONFIG_MEMFD_CREATE 8 extern long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg); 9 struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx); 10 /* 11 * Check for any existing seals on mmap, return an error if access is denied due 12 * to sealing, or 0 otherwise. 13 * 14 * We also update VMA flags if appropriate by manipulating the VMA flags pointed 15 * to by vm_flags_ptr. 16 */ 17 int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags_ptr); 18 #else 19 static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned int a) 20 { 21 return -EINVAL; 22 } 23 static inline struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx) 24 { 25 return ERR_PTR(-EINVAL); 26 } > 27 int memfd_check_seals_mmap(struct file *file, unsigned long *vm_flags) 28 { 29 return 0; 30 } 31 #endif 32 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki