All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [norov:compat_get_cpumask 7/8] io_uring/register.c:241:42: error: passing argument 1 of 'compat_get_cpumask' from incompatible pointer type
Date: Sun, 26 Jan 2025 00:21:39 +0800	[thread overview]
Message-ID: <202501260050.iJS9eGMt-lkp@intel.com> (raw)

tree:   https://github.com/norov/linux compat_get_cpumask
head:   b7162e407638adc57cdf6d6f1acea90f9d84a638
commit: bba742e7f4aab4b879cc1620c1b57be76607bff8 [7/8] io_uring/register.c: use compat_get_cpumask
config: x86_64-randconfig-004-20250125 (https://download.01.org/0day-ci/archive/20250126/202501260050.iJS9eGMt-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250126/202501260050.iJS9eGMt-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/202501260050.iJS9eGMt-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/ia32.h:7,
                    from arch/x86/include/asm/elf.h:10,
                    from include/linux/elf.h:6,
                    from include/linux/module.h:19,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/static_call.h:135,
                    from include/linux/tracepoint.h:22,
                    from include/trace/syscall.h:5,
                    from include/linux/syscalls.h:94,
                    from io_uring/register.c:9:
   include/linux/compat.h:955:32: warning: 'struct cpumask_t' declared inside parameter list will not be visible outside of this definition or declaration
     955 | long compat_get_cpumask(struct cpumask_t *cpumask, const compat_ulong_t __user *umask,
         |                                ^~~~~~~~~
   io_uring/register.c: In function 'io_register_iowq_aff':
>> io_uring/register.c:241:42: error: passing argument 1 of 'compat_get_cpumask' from incompatible pointer type [-Werror=incompatible-pointer-types]
     241 |                 ret = compat_get_cpumask(new_mask, (const compat_ulong_t __user *)arg, len);
         |                                          ^~~~~~~~
         |                                          |
         |                                          struct cpumask *
   In file included from arch/x86/include/asm/ia32.h:7,
                    from arch/x86/include/asm/elf.h:10,
                    from include/linux/elf.h:6,
                    from include/linux/module.h:19,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/static_call.h:135,
                    from include/linux/tracepoint.h:22,
                    from include/trace/syscall.h:5,
                    from include/linux/syscalls.h:94,
                    from io_uring/register.c:9:
   include/linux/compat.h:955:43: note: expected 'struct cpumask_t *' but argument is of type 'struct cpumask *'
     955 | long compat_get_cpumask(struct cpumask_t *cpumask, const compat_ulong_t __user *umask,
         |                         ~~~~~~~~~~~~~~~~~~^~~~~~~
   cc1: some warnings being treated as errors


vim +/compat_get_cpumask +241 io_uring/register.c

   229	
   230	static __cold int io_register_iowq_aff(struct io_ring_ctx *ctx,
   231					       void __user *arg, unsigned len)
   232	{
   233		cpumask_var_t new_mask;
   234		int ret;
   235	
   236		if (!alloc_cpumask_var(&new_mask, GFP_KERNEL))
   237			return -ENOMEM;
   238	
   239	#ifdef CONFIG_COMPAT
   240		if (in_compat_syscall())
 > 241			ret = compat_get_cpumask(new_mask, (const compat_ulong_t __user *)arg, len);
   242		else
   243	#endif
   244			ret = copy_iowq_aff_cpus(new_mask, arg, len);
   245	
   246		if (ret) {
   247			free_cpumask_var(new_mask);
   248			return -EFAULT;
   249		}
   250	
   251		ret = __io_register_iowq_aff(ctx, new_mask);
   252		free_cpumask_var(new_mask);
   253		return ret;
   254	}
   255	

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

                 reply	other threads:[~2025-01-25 16:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202501260050.iJS9eGMt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yury.norov@gmail.com \
    /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.