kernel/fork.c:3088:2: warning: #warning clone3() entry point is missing, please fix

From: kernel test robot
Date: Fri Dec 20 2024 - 20:11:50 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 499551201b5f4fd3c0618a3e95e3d0d15ea18f31
commit: 505d66d1abfb90853e24ab6cbdf83b611473d6fc clone3: drop __ARCH_WANT_SYS_CLONE3 macro
date: 5 months ago
config: sparc-sparc32_defconfig (https://download.01.org/0day-ci/archive/20241221/202412210954.b4AprHmP-lkp@xxxxxxxxx/config)
compiler: sparc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241221/202412210954.b4AprHmP-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/202412210954.b4AprHmP-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

kernel/fork.c: In function '__do_sys_clone3':
>> kernel/fork.c:3088:2: warning: #warning clone3() entry point is missing, please fix [-Wcpp]
3088 | #warning clone3() entry point is missing, please fix
| ^~~~~~~


vim +3088 kernel/fork.c

3068
3069 /**
3070 * sys_clone3 - create a new process with specific properties
3071 * @uargs: argument structure
3072 * @size: size of @uargs
3073 *
3074 * clone3() is the extensible successor to clone()/clone2().
3075 * It takes a struct as argument that is versioned by its size.
3076 *
3077 * Return: On success, a positive PID for the child process.
3078 * On error, a negative errno number.
3079 */
3080 SYSCALL_DEFINE2(clone3, struct clone_args __user *, uargs, size_t, size)
3081 {
3082 int err;
3083
3084 struct kernel_clone_args kargs;
3085 pid_t set_tid[MAX_PID_NS_LEVEL];
3086
3087 #ifdef __ARCH_BROKEN_SYS_CLONE3
> 3088 #warning clone3() entry point is missing, please fix
3089 return -ENOSYS;
3090 #endif
3091
3092 kargs.set_tid = set_tid;
3093
3094 err = copy_clone_args_from_user(&kargs, uargs, size);
3095 if (err)
3096 return err;
3097
3098 if (!clone3_args_valid(&kargs))
3099 return -EINVAL;
3100
3101 return kernel_clone(&kargs);
3102 }
3103

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki