Re: [PATCH -next] fsconfig: intercept for non-new mount API in advance for FSCONFIG_CMD_CREATE_EXCL

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

 



Hi Hongbo,

kernel test robot noticed the following build errors:

[auto build test ERROR on next-20240510]

url:    https://github.com/intel-lab-lkp/linux/commits/Hongbo-Li/fsconfig-intercept-for-non-new-mount-API-in-advance-for-FSCONFIG_CMD_CREATE_EXCL/20240511-120353
base:   next-20240510
patch link:    https://lore.kernel.org/r/20240511040249.2141380-1-lihongbo22%40huawei.com
patch subject: [PATCH -next] fsconfig: intercept for non-new mount API in advance for FSCONFIG_CMD_CREATE_EXCL
config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20240512/202405122152.lQkWH9DK-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405122152.lQkWH9DK-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/202405122152.lQkWH9DK-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   fs/fsopen.c: In function '__do_sys_fsconfig':
>> fs/fsopen.c:410:22: error: 'FSCONFIG_CMD_CREATE_EXEC' undeclared (first use in this function); did you mean 'FSCONFIG_CMD_CREATE_EXCL'?
     410 |                 case FSCONFIG_CMD_CREATE_EXEC:
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~
         |                      FSCONFIG_CMD_CREATE_EXCL
   fs/fsopen.c:410:22: note: each undeclared identifier is reported only once for each function it appears in


vim +410 fs/fsopen.c

   301	
   302	/**
   303	 * sys_fsconfig - Set parameters and trigger actions on a context
   304	 * @fd: The filesystem context to act upon
   305	 * @cmd: The action to take
   306	 * @_key: Where appropriate, the parameter key to set
   307	 * @_value: Where appropriate, the parameter value to set
   308	 * @aux: Additional information for the value
   309	 *
   310	 * This system call is used to set parameters on a context, including
   311	 * superblock settings, data source and security labelling.
   312	 *
   313	 * Actions include triggering the creation of a superblock and the
   314	 * reconfiguration of the superblock attached to the specified context.
   315	 *
   316	 * When setting a parameter, @cmd indicates the type of value being proposed
   317	 * and @_key indicates the parameter to be altered.
   318	 *
   319	 * @_value and @aux are used to specify the value, should a value be required:
   320	 *
   321	 * (*) fsconfig_set_flag: No value is specified.  The parameter must be boolean
   322	 *     in nature.  The key may be prefixed with "no" to invert the
   323	 *     setting. @_value must be NULL and @aux must be 0.
   324	 *
   325	 * (*) fsconfig_set_string: A string value is specified.  The parameter can be
   326	 *     expecting boolean, integer, string or take a path.  A conversion to an
   327	 *     appropriate type will be attempted (which may include looking up as a
   328	 *     path).  @_value points to a NUL-terminated string and @aux must be 0.
   329	 *
   330	 * (*) fsconfig_set_binary: A binary blob is specified.  @_value points to the
   331	 *     blob and @aux indicates its size.  The parameter must be expecting a
   332	 *     blob.
   333	 *
   334	 * (*) fsconfig_set_path: A non-empty path is specified.  The parameter must be
   335	 *     expecting a path object.  @_value points to a NUL-terminated string that
   336	 *     is the path and @aux is a file descriptor at which to start a relative
   337	 *     lookup or AT_FDCWD.
   338	 *
   339	 * (*) fsconfig_set_path_empty: As fsconfig_set_path, but with AT_EMPTY_PATH
   340	 *     implied.
   341	 *
   342	 * (*) fsconfig_set_fd: An open file descriptor is specified.  @_value must be
   343	 *     NULL and @aux indicates the file descriptor.
   344	 */
   345	SYSCALL_DEFINE5(fsconfig,
   346			int, fd,
   347			unsigned int, cmd,
   348			const char __user *, _key,
   349			const void __user *, _value,
   350			int, aux)
   351	{
   352		struct fs_context *fc;
   353		struct fd f;
   354		int ret;
   355		int lookup_flags = 0;
   356	
   357		struct fs_parameter param = {
   358			.type	= fs_value_is_undefined,
   359		};
   360	
   361		if (fd < 0)
   362			return -EINVAL;
   363	
   364		switch (cmd) {
   365		case FSCONFIG_SET_FLAG:
   366			if (!_key || _value || aux)
   367				return -EINVAL;
   368			break;
   369		case FSCONFIG_SET_STRING:
   370			if (!_key || !_value || aux)
   371				return -EINVAL;
   372			break;
   373		case FSCONFIG_SET_BINARY:
   374			if (!_key || !_value || aux <= 0 || aux > 1024 * 1024)
   375				return -EINVAL;
   376			break;
   377		case FSCONFIG_SET_PATH:
   378		case FSCONFIG_SET_PATH_EMPTY:
   379			if (!_key || !_value || (aux != AT_FDCWD && aux < 0))
   380				return -EINVAL;
   381			break;
   382		case FSCONFIG_SET_FD:
   383			if (!_key || _value || aux < 0)
   384				return -EINVAL;
   385			break;
   386		case FSCONFIG_CMD_CREATE:
   387		case FSCONFIG_CMD_CREATE_EXCL:
   388		case FSCONFIG_CMD_RECONFIGURE:
   389			if (_key || _value || aux)
   390				return -EINVAL;
   391			break;
   392		default:
   393			return -EOPNOTSUPP;
   394		}
   395	
   396		f = fdget(fd);
   397		if (!f.file)
   398			return -EBADF;
   399		ret = -EINVAL;
   400		if (f.file->f_op != &fscontext_fops)
   401			goto out_f;
   402	
   403		fc = f.file->private_data;
   404		if (fc->ops == &legacy_fs_context_ops) {
   405			switch (cmd) {
   406			case FSCONFIG_SET_BINARY:
   407			case FSCONFIG_SET_PATH:
   408			case FSCONFIG_SET_PATH_EMPTY:
   409			case FSCONFIG_SET_FD:
 > 410			case FSCONFIG_CMD_CREATE_EXEC:

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux