tree: https://github.com/ammarfaizi2/linux-block akpm/mm/mm-unstable head: da4b5585bc49f2538482b9e383f4165e5a31d8a0 commit: bdb6231e88a3f675e33ed422d2f0b6d02ad4b159 [16/32] mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC config: riscv-randconfig-r011-20221215 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 98b13979fb05f3ed288a900deb843e7b27589e58) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/ammarfaizi2/linux-block/commit/bdb6231e88a3f675e33ed422d2f0b6d02ad4b159 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block akpm/mm/mm-unstable git checkout bdb6231e88a3f675e33ed422d2f0b6d02ad4b159 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): >> kernel/pid_namespace.c:114:2: error: call to undeclared function 'initialize_memfd_noexec_scope'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] initialize_memfd_noexec_scope(ns); ^ kernel/pid_namespace.c:114:2: note: did you mean 'set_memfd_noexec_scope'? kernel/pid_sysctl.h:55:20: note: 'set_memfd_noexec_scope' declared here static inline void set_memfd_noexec_scope(struct pid_namespace *ns) {} ^ >> kernel/pid_namespace.c:462:2: error: call to undeclared function 'register_pid_ns_sysctl_table_vm'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] register_pid_ns_sysctl_table_vm(); ^ kernel/pid_namespace.c:462:2: note: did you mean 'register_pid_ns_ctl_table_vm'? kernel/pid_sysctl.h:56:20: note: 'register_pid_ns_ctl_table_vm' declared here static inline void register_pid_ns_ctl_table_vm(void) {} ^ 2 errors generated. vim +/initialize_memfd_noexec_scope +114 kernel/pid_namespace.c 71 72 static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns, 73 struct pid_namespace *parent_pid_ns) 74 { 75 struct pid_namespace *ns; 76 unsigned int level = parent_pid_ns->level + 1; 77 struct ucounts *ucounts; 78 int err; 79 80 err = -EINVAL; 81 if (!in_userns(parent_pid_ns->user_ns, user_ns)) 82 goto out; 83 84 err = -ENOSPC; 85 if (level > MAX_PID_NS_LEVEL) 86 goto out; 87 ucounts = inc_pid_namespaces(user_ns); 88 if (!ucounts) 89 goto out; 90 91 err = -ENOMEM; 92 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); 93 if (ns == NULL) 94 goto out_dec; 95 96 idr_init(&ns->idr); 97 98 ns->pid_cachep = create_pid_cachep(level); 99 if (ns->pid_cachep == NULL) 100 goto out_free_idr; 101 102 err = ns_alloc_inum(&ns->ns); 103 if (err) 104 goto out_free_idr; 105 ns->ns.ops = &pidns_operations; 106 107 refcount_set(&ns->ns.count, 1); 108 ns->level = level; 109 ns->parent = get_pid_ns(parent_pid_ns); 110 ns->user_ns = get_user_ns(user_ns); 111 ns->ucounts = ucounts; 112 ns->pid_allocated = PIDNS_ADDING; 113 > 114 initialize_memfd_noexec_scope(ns); 115 116 return ns; 117 118 out_free_idr: 119 idr_destroy(&ns->idr); 120 kmem_cache_free(pid_ns_cachep, ns); 121 out_dec: 122 dec_pid_namespaces(ucounts); 123 out: 124 return ERR_PTR(err); 125 } 126 -- 0-DAY CI Kernel Test Service https://01.org/lkp