Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [RFC PATCH 1/2] io_uring: cmd: introduce io_uring_cmd_import_fixed_vec
       [not found] <20250311114053.216359-2-sidong.yang@furiosa.ai>
@ 2025-03-12  9:59 ` kernel test robot
  2025-03-12 10:10 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-03-12  9:59 UTC (permalink / raw)
  To: Sidong Yang; +Cc: llvm, oe-kbuild-all

Hi Sidong,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20250307]
[also build test WARNING on v6.14-rc6]
[cannot apply to kdave/for-next linus/master v6.14-rc6 v6.14-rc5 v6.14-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sidong-Yang/io_uring-cmd-introduce-io_uring_cmd_import_fixed_vec/20250311-194620
base:   next-20250307
patch link:    https://lore.kernel.org/r/20250311114053.216359-2-sidong.yang%40furiosa.ai
patch subject: [RFC PATCH 1/2] io_uring: cmd: introduce io_uring_cmd_import_fixed_vec
config: i386-buildonly-randconfig-003-20250312 (https://download.01.org/0day-ci/archive/20250312/202503121708.ZioDSAXU-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250312/202503121708.ZioDSAXU-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503121708.ZioDSAXU-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from io_uring/uring_cmd.c:5:
   include/linux/io_uring/cmd.h:51:42: warning: 'struct iou_vec' declared inside parameter list will not be visible outside of this definition or declaration
      51 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^~~~~~~
>> io_uring/uring_cmd.c:262:42: warning: 'struct iou_vec' declared inside parameter list will not be visible outside of this definition or declaration
     262 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^~~~~~~
   io_uring/uring_cmd.c:258:5: error: conflicting types for 'io_uring_cmd_import_fixed_vec'; have 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, bool,  unsigned int)' {aka 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, _Bool,  unsigned int)'}
     258 | int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/io_uring/cmd.h:47:5: note: previous declaration of 'io_uring_cmd_import_fixed_vec' with type 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, bool,  unsigned int)' {aka 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, _Bool,  unsigned int)'}
      47 | int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   io_uring/uring_cmd.c: In function 'io_uring_cmd_import_fixed_vec':
   io_uring/uring_cmd.c:273:15: error: implicit declaration of function 'io_vec_realloc' [-Werror=implicit-function-declaration]
     273 |         ret = io_vec_realloc(iou_vec, nr_segs);
         |               ^~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/string.h:3,
                    from include/linux/string.h:65,
                    from arch/x86/include/asm/page_32.h:18,
                    from arch/x86/include/asm/page.h:14,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/linux/spinlock.h:60,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:7,
                    from include/uapi/linux/io_uring.h:11,
                    from include/linux/io_uring/cmd.h:5:
   io_uring/uring_cmd.c:278:23: error: invalid use of undefined type 'struct iou_vec'
     278 |         memcpy(iou_vec->iovec, iov, sizeof(*iov) * nr_segs);
         |                       ^~
   arch/x86/include/asm/string_32.h:150:42: note: in definition of macro 'memcpy'
     150 | #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
         |                                          ^
   io_uring/uring_cmd.c:281:15: error: implicit declaration of function 'io_import_reg_vec'; did you mean 'io_import_reg_buf'? [-Werror=implicit-function-declaration]
     281 |         ret = io_import_reg_vec(rw, iter, req, iou_vec, iou_vec->nr, 0,
         |               ^~~~~~~~~~~~~~~~~
         |               io_import_reg_buf
   io_uring/uring_cmd.c:281:64: error: invalid use of undefined type 'struct iou_vec'
     281 |         ret = io_import_reg_vec(rw, iter, req, iou_vec, iou_vec->nr, 0,
         |                                                                ^~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:18,
                    from io_uring/uring_cmd.c:2:
   io_uring/uring_cmd.c: At top level:
   io_uring/uring_cmd.c:285:19: error: conflicting types for 'io_uring_cmd_import_fixed_vec'; have 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, bool,  unsigned int)' {aka 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, _Bool,  unsigned int)'}
     285 | EXPORT_SYMBOL_GPL(io_uring_cmd_import_fixed_vec);
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:70:28: note: in definition of macro '__EXPORT_SYMBOL'
      70 |         extern typeof(sym) sym;                                 \
         |                            ^~~
   include/linux/export.h:84:41: note: in expansion of macro '_EXPORT_SYMBOL'
      84 | #define EXPORT_SYMBOL_GPL(sym)          _EXPORT_SYMBOL(sym, "GPL")
         |                                         ^~~~~~~~~~~~~~
   io_uring/uring_cmd.c:285:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     285 | EXPORT_SYMBOL_GPL(io_uring_cmd_import_fixed_vec);
         | ^~~~~~~~~~~~~~~~~
   include/linux/io_uring/cmd.h:47:5: note: previous declaration of 'io_uring_cmd_import_fixed_vec' with type 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, bool,  unsigned int)' {aka 'int(const struct iovec *, long unsigned int,  int,  struct iov_iter *, struct io_uring_cmd *, struct iou_vec *, _Bool,  unsigned int)'}
      47 | int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +262 io_uring/uring_cmd.c

   257	
   258	int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
   259					  unsigned long nr_segs, int rw,
   260					  struct iov_iter *iter,
   261					  struct io_uring_cmd *ioucmd,
 > 262					  struct iou_vec *iou_vec, bool compat,
   263					  unsigned int issue_flags)
   264	{
   265		struct io_kiocb *req = cmd_to_io_kiocb(ioucmd);
   266		struct iovec *iov;
   267		int ret;
   268	
   269		iov = iovec_from_user(uiovec, nr_segs, 0, NULL, compat);
   270		if (IS_ERR(iov))
   271			return PTR_ERR(iov);
   272	
   273		ret = io_vec_realloc(iou_vec, nr_segs);
   274		if (ret) {
   275			kfree(iov);
   276			return ret;
   277		}
   278		memcpy(iou_vec->iovec, iov, sizeof(*iov) * nr_segs);
   279		kfree(iov);
   280	
   281		ret = io_import_reg_vec(rw, iter, req, iou_vec, iou_vec->nr, 0,
   282					issue_flags);
   283		return ret;
   284	}
   285	EXPORT_SYMBOL_GPL(io_uring_cmd_import_fixed_vec);
   286	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH 1/2] io_uring: cmd: introduce io_uring_cmd_import_fixed_vec
       [not found] <20250311114053.216359-2-sidong.yang@furiosa.ai>
  2025-03-12  9:59 ` [RFC PATCH 1/2] io_uring: cmd: introduce io_uring_cmd_import_fixed_vec kernel test robot
@ 2025-03-12 10:10 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-03-12 10:10 UTC (permalink / raw)
  To: Sidong Yang; +Cc: llvm, oe-kbuild-all

Hi Sidong,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20250307]
[also build test WARNING on v6.14-rc6]
[cannot apply to kdave/for-next linus/master v6.14-rc6 v6.14-rc5 v6.14-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sidong-Yang/io_uring-cmd-introduce-io_uring_cmd_import_fixed_vec/20250311-194620
base:   next-20250307
patch link:    https://lore.kernel.org/r/20250311114053.216359-2-sidong.yang%40furiosa.ai
patch subject: [RFC PATCH 1/2] io_uring: cmd: introduce io_uring_cmd_import_fixed_vec
config: i386-buildonly-randconfig-002-20250312 (https://download.01.org/0day-ci/archive/20250312/202503121758.aWUV652p-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250312/202503121758.aWUV652p-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503121758.aWUV652p-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from block/ioctl.c:4:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/x86/include/asm/cacheflush.h:5:
   In file included from include/linux/mm.h:2306:
   include/linux/vmstat.h:507:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     507 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from block/ioctl.c:15:
>> include/linux/io_uring/cmd.h:51:14: warning: declaration of 'struct iou_vec' will not be visible outside of this function [-Wvisibility]
      51 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^
   2 warnings generated.
--
   In file included from io_uring/uring_cmd.c:5:
   In file included from include/linux/io_uring/cmd.h:6:
   In file included from include/linux/io_uring_types.h:4:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/x86/include/asm/cacheflush.h:5:
   In file included from include/linux/mm.h:2306:
   include/linux/vmstat.h:507:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     507 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from io_uring/uring_cmd.c:5:
>> include/linux/io_uring/cmd.h:51:14: warning: declaration of 'struct iou_vec' will not be visible outside of this function [-Wvisibility]
      51 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^
>> io_uring/uring_cmd.c:262:14: warning: declaration of 'struct iou_vec' will not be visible outside of this function [-Wvisibility]
     262 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^
   io_uring/uring_cmd.c:258:5: error: conflicting types for 'io_uring_cmd_import_fixed_vec'
     258 | int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
         |     ^
   include/linux/io_uring/cmd.h:47:5: note: previous declaration is here
      47 | int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
         |     ^
   io_uring/uring_cmd.c:273:8: error: call to undeclared function 'io_vec_realloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     273 |         ret = io_vec_realloc(iou_vec, nr_segs);
         |               ^
   io_uring/uring_cmd.c:278:16: error: incomplete definition of type 'struct iou_vec'
     278 |         memcpy(iou_vec->iovec, iov, sizeof(*iov) * nr_segs);
         |                ~~~~~~~^
   arch/x86/include/asm/string_32.h:150:42: note: expanded from macro 'memcpy'
     150 | #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
         |                                          ^
   io_uring/uring_cmd.c:262:14: note: forward declaration of 'struct iou_vec'
     262 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^
   io_uring/uring_cmd.c:281:8: error: call to undeclared function 'io_import_reg_vec'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     281 |         ret = io_import_reg_vec(rw, iter, req, iou_vec, iou_vec->nr, 0,
         |               ^
   io_uring/uring_cmd.c:281:8: note: did you mean 'io_import_reg_buf'?
   io_uring/rsrc.h:61:5: note: 'io_import_reg_buf' declared here
      61 | int io_import_reg_buf(struct io_kiocb *req, struct iov_iter *iter,
         |     ^
   io_uring/uring_cmd.c:281:57: error: incomplete definition of type 'struct iou_vec'
     281 |         ret = io_import_reg_vec(rw, iter, req, iou_vec, iou_vec->nr, 0,
         |                                                         ~~~~~~~^
   io_uring/uring_cmd.c:262:14: note: forward declaration of 'struct iou_vec'
     262 |                                   struct iou_vec *iou_vec, bool compat,
         |                                          ^
   3 warnings and 5 errors generated.


vim +51 include/linux/io_uring/cmd.h

    40	
    41	#if defined(CONFIG_IO_URING)
    42	int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,
    43				      struct iov_iter *iter,
    44				      struct io_uring_cmd *ioucmd,
    45				      unsigned int issue_flags);
    46	
    47	int io_uring_cmd_import_fixed_vec(const struct iovec __user *uiovec,
    48					  unsigned long nr_segs, int rw,
    49					  struct iov_iter *iter,
    50					  struct io_uring_cmd *ioucmd,
  > 51					  struct iou_vec *iou_vec, bool compat,
    52					  unsigned int issue_flags);
    53	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-12 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250311114053.216359-2-sidong.yang@furiosa.ai>
2025-03-12  9:59 ` [RFC PATCH 1/2] io_uring: cmd: introduce io_uring_cmd_import_fixed_vec kernel test robot
2025-03-12 10:10 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox