All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Caleb Sander Mateos <csander@purestorage.com>,
	Akilesh Kailash <akailash@google.com>,
	bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH 5/5] io_uring: bpf: add io_uring_bpf_req_memcpy() kfunc
Date: Sat, 8 Nov 2025 02:51:51 +0800	[thread overview]
Message-ID: <202511080255.v8F8GrXF-lkp@intel.com> (raw)
In-Reply-To: <20251104162123.1086035-6-ming.lei@redhat.com>

Hi Ming,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20251104]
[cannot apply to bpf-next/net bpf-next/master bpf/master linus/master v6.18-rc4 v6.18-rc3 v6.18-rc2 v6.18-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/Ming-Lei/io_uring-prepare-for-extending-io_uring-with-bpf/20251105-002757
base:   next-20251104
patch link:    https://lore.kernel.org/r/20251104162123.1086035-6-ming.lei%40redhat.com
patch subject: [PATCH 5/5] io_uring: bpf: add io_uring_bpf_req_memcpy() kfunc
config: openrisc-allyesconfig (https://download.01.org/0day-ci/archive/20251108/202511080255.v8F8GrXF-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251108/202511080255.v8F8GrXF-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/202511080255.v8F8GrXF-lkp@intel.com/

All warnings (new ones prefixed by >>):

   io_uring/bpf.c: In function 'io_bpf_import_buffer':
>> io_uring/bpf.c:423:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     423 |                 return import_ubuf(direction, (void __user *)(addr + offset),
         |                                               ^
   In file included from include/linux/bpf_verifier.h:7,
                    from io_uring/bpf.c:9:
   io_uring/bpf.c: In function 'io_bpf_init':
   include/linux/bpf.h:2044:50: warning: statement with no effect [-Wunused-value]
    2044 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
         |                                                  ^~~~~~~~~~~~~~~~
   io_uring/bpf.c:551:15: note: in expansion of macro 'register_bpf_struct_ops'
     551 |         err = register_bpf_struct_ops(&bpf_uring_bpf_ops, uring_bpf_ops);
         |               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from <command-line>:
   In function 'io_kiocb_cmd_sz_check',
       inlined from 'io_uring_bpf_prep' at io_uring/bpf.c:93:32:
   include/linux/compiler_types.h:603:45: error: call to '__compiletime_assert_598' declared with attribute error: BUILD_BUG_ON failed: cmd_sz > sizeof(struct io_cmd_data)
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:584:25: note: in definition of macro '__compiletime_assert'
     584 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:603:9: note: in expansion of macro '_compiletime_assert'
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/io_uring_types.h:655:9: note: in expansion of macro 'BUILD_BUG_ON'
     655 |         BUILD_BUG_ON(cmd_sz > sizeof(struct io_cmd_data));
         |         ^~~~~~~~~~~~
   In function 'io_kiocb_cmd_sz_check',
       inlined from 'io_uring_bpf_issue' at io_uring/bpf.c:131:32:
   include/linux/compiler_types.h:603:45: error: call to '__compiletime_assert_598' declared with attribute error: BUILD_BUG_ON failed: cmd_sz > sizeof(struct io_cmd_data)
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:584:25: note: in definition of macro '__compiletime_assert'
     584 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:603:9: note: in expansion of macro '_compiletime_assert'
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/io_uring_types.h:655:9: note: in expansion of macro 'BUILD_BUG_ON'
     655 |         BUILD_BUG_ON(cmd_sz > sizeof(struct io_cmd_data));
         |         ^~~~~~~~~~~~
   In function 'io_kiocb_cmd_sz_check',
       inlined from 'io_uring_bpf_fail' at io_uring/bpf.c:148:32:
   include/linux/compiler_types.h:603:45: error: call to '__compiletime_assert_598' declared with attribute error: BUILD_BUG_ON failed: cmd_sz > sizeof(struct io_cmd_data)
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:584:25: note: in definition of macro '__compiletime_assert'
     584 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:603:9: note: in expansion of macro '_compiletime_assert'
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/io_uring_types.h:655:9: note: in expansion of macro 'BUILD_BUG_ON'
     655 |         BUILD_BUG_ON(cmd_sz > sizeof(struct io_cmd_data));
         |         ^~~~~~~~~~~~
   In function 'io_kiocb_cmd_sz_check',
       inlined from 'io_uring_bpf_cleanup' at io_uring/bpf.c:159:32:
   include/linux/compiler_types.h:603:45: error: call to '__compiletime_assert_598' declared with attribute error: BUILD_BUG_ON failed: cmd_sz > sizeof(struct io_cmd_data)
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:584:25: note: in definition of macro '__compiletime_assert'
     584 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:603:9: note: in expansion of macro '_compiletime_assert'
     603 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/io_uring_types.h:655:9: note: in expansion of macro 'BUILD_BUG_ON'
     655 |         BUILD_BUG_ON(cmd_sz > sizeof(struct io_cmd_data));
         |         ^~~~~~~~~~~~


vim +423 io_uring/bpf.c

   401	
   402	/*
   403	 * Helper to import a buffer into an iov_iter for BPF memcpy operations.
   404	 * Handles both plain user buffers and fixed/registered buffers.
   405	 *
   406	 * @req: io_kiocb request
   407	 * @iter: output iterator
   408	 * @buf_type: buffer type (plain or fixed)
   409	 * @addr: buffer address
   410	 * @offset: offset into buffer
   411	 * @len: length from offset
   412	 * @direction: ITER_SOURCE for source buffer, ITER_DEST for destination
   413	 * @issue_flags: io_uring issue flags
   414	 *
   415	 * Returns 0 on success, negative error code on failure.
   416	 */
   417	static int io_bpf_import_buffer(struct io_kiocb *req, struct iov_iter *iter,
   418					u8 buf_type, u64 addr, unsigned int offset,
   419					u32 len, int direction, unsigned int issue_flags)
   420	{
   421		if (buf_type == IORING_BPF_BUF_TYPE_PLAIN) {
   422			/* Plain user buffer */
 > 423			return import_ubuf(direction, (void __user *)(addr + offset),
   424					   len - offset, iter);
   425		} else if (buf_type == IORING_BPF_BUF_TYPE_FIXED) {
   426			/* Fixed buffer */
   427			return io_import_reg_buf(req, iter, addr + offset,
   428						 len - offset, direction, issue_flags);
   429		}
   430	
   431		return -EINVAL;
   432	}
   433	

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

  reply	other threads:[~2025-11-07 18:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-04 16:21 [PATCH 0/5] io_uring: add IORING_OP_BPF for extending io_uring Ming Lei
2025-11-04 16:21 ` [PATCH 1/5] io_uring: prepare for extending io_uring with bpf Ming Lei
2025-12-31  1:13   ` Caleb Sander Mateos
2025-12-31  9:33     ` Ming Lei
2025-11-04 16:21 ` [PATCH 2/5] io_uring: bpf: add io_uring_ctx setup for BPF into one list Ming Lei
2025-12-31  1:13   ` Caleb Sander Mateos
2025-12-31  9:49     ` Ming Lei
2025-12-31 16:19       ` Caleb Sander Mateos
2025-11-04 16:21 ` [PATCH 3/5] io_uring: bpf: extend io_uring with bpf struct_ops Ming Lei
2025-11-07 19:02   ` kernel test robot
2025-11-08  6:53   ` kernel test robot
2025-11-13 10:32   ` Stefan Metzmacher
2025-11-13 10:59     ` Ming Lei
2025-11-13 11:19       ` Stefan Metzmacher
2025-11-14  3:00         ` Ming Lei
2025-12-08 22:45           ` Caleb Sander Mateos
2025-12-09  3:08             ` Ming Lei
2025-12-10 16:11               ` Caleb Sander Mateos
2025-11-19 14:39   ` Jonathan Corbet
2025-11-20  1:46     ` Ming Lei
2025-11-20  1:51       ` Ming Lei
2025-12-31  1:19   ` Caleb Sander Mateos
2025-12-31 10:32     ` Ming Lei
2025-12-31 16:48       ` Caleb Sander Mateos
2025-11-04 16:21 ` [PATCH 4/5] io_uring: bpf: add buffer support for IORING_OP_BPF Ming Lei
2025-11-13 10:42   ` Stefan Metzmacher
2025-11-13 11:04     ` Ming Lei
2025-11-13 11:25       ` Stefan Metzmacher
2025-12-31  1:42   ` Caleb Sander Mateos
2025-12-31 11:02     ` Ming Lei
2025-12-31 17:02       ` Caleb Sander Mateos
2025-11-04 16:21 ` [PATCH 5/5] io_uring: bpf: add io_uring_bpf_req_memcpy() kfunc Ming Lei
2025-11-07 18:51   ` kernel test robot [this message]
2025-12-31  1:42   ` Caleb Sander Mateos
2025-11-05 12:47 ` [PATCH 0/5] io_uring: add IORING_OP_BPF for extending io_uring Pavel Begunkov
2025-11-05 15:57   ` Ming Lei
2025-11-06 16:03     ` Pavel Begunkov
2025-11-07 15:54       ` Ming Lei
2025-11-11 14:07         ` Pavel Begunkov
2025-11-13  4:18           ` Ming Lei
2025-11-19 19:00             ` Pavel Begunkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202511080255.v8F8GrXF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akailash@google.com \
    --cc=ast@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bpf@vger.kernel.org \
    --cc=csander@purestorage.com \
    --cc=io-uring@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.