lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Jan 2022 08:17:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: drivers/cxl/core/mbox.c:330:6: error: unexpected token, expected
 comma

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1d1df41c5a33359a00e919d54eaebfb789711fdc
commit: 4faf31b43468c58e2c8c91cc5fa26f08a6b733be cxl/mbox: Move mailbox and other non-PCI specific infrastructure to the core
date:   4 months ago
config: mips-randconfig-r003-20220118 (https://download.01.org/0day-ci/archive/20220120/202201200842.QCcshg1P-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f782d25a742302d25ef3c8b84b54f7483c2deb9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4faf31b43468c58e2c8c91cc5fa26f08a6b733be
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 4faf31b43468c58e2c8c91cc5fa26f08a6b733be
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/cxl/core/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/cxl/core/mbox.c:330:6: error: unexpected token, expected comma
           if (get_user(n_commands, &q->n_commands))
               ^
   arch/mips/include/asm/uaccess.h:138:33: note: expanded from macro 'get_user'
           access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) :           \
                                          ^
   arch/mips/include/asm/uaccess.h:224:23: note: expanded from macro '__get_user'
                   __get_data_asm((x), user_lw, __gu_ptr);                 \
                                       ^
   <inline asm>:3:10: note: instantiated into assembly here
           .set    eva
                      ^
>> drivers/cxl/core/mbox.c:330:6: error: invalid operand for instruction
           if (get_user(n_commands, &q->n_commands))
               ^
   arch/mips/include/asm/uaccess.h:138:33: note: expanded from macro 'get_user'
           access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) :           \
                                          ^
   arch/mips/include/asm/uaccess.h:224:23: note: expanded from macro '__get_user'
                   __get_data_asm((x), user_lw, __gu_ptr);                 \
                                       ^
   <inline asm>:4:10: note: instantiated into assembly here
           lwe $4, 0($16)
                   ^
   drivers/cxl/core/mbox.c:335:10: error: unexpected token, expected comma
                   return put_user(cxl_cmd_count, &q->n_commands);
                          ^
   arch/mips/include/asm/uaccess.h:112:33: note: expanded from macro 'put_user'
           access_ok(__p, sizeof(*__p)) ? __put_user((x), __p) : -EFAULT;  \
                                          ^
   arch/mips/include/asm/uaccess.h:177:18: note: expanded from macro '__put_user'
                   __put_data_asm(user_sw, __pu_ptr);                      \
                                  ^
   <inline asm>:3:10: note: instantiated into assembly here
           .set    eva
                      ^
   drivers/cxl/core/mbox.c:335:10: error: invalid operand for instruction
                   return put_user(cxl_cmd_count, &q->n_commands);
                          ^
   arch/mips/include/asm/uaccess.h:112:33: note: expanded from macro 'put_user'
           access_ok(__p, sizeof(*__p)) ? __put_user((x), __p) : -EFAULT;  \
                                          ^
   arch/mips/include/asm/uaccess.h:177:18: note: expanded from macro '__put_user'
                   __put_data_asm(user_sw, __pu_ptr);                      \
                                  ^
   <inline asm>:4:10: note: instantiated into assembly here
           swe $3, 0($16)
                   ^
   4 errors generated.


vim +330 drivers/cxl/core/mbox.c

   319	
   320	int cxl_query_cmd(struct cxl_memdev *cxlmd,
   321			  struct cxl_mem_query_commands __user *q)
   322	{
   323		struct device *dev = &cxlmd->dev;
   324		struct cxl_mem_command *cmd;
   325		u32 n_commands;
   326		int j = 0;
   327	
   328		dev_dbg(dev, "Query IOCTL\n");
   329	
 > 330		if (get_user(n_commands, &q->n_commands))
   331			return -EFAULT;
   332	
   333		/* returns the total number if 0 elements are requested. */
   334		if (n_commands == 0)
   335			return put_user(cxl_cmd_count, &q->n_commands);
   336	
   337		/*
   338		 * otherwise, return max(n_commands, total commands) cxl_command_info
   339		 * structures.
   340		 */
   341		cxl_for_each_cmd(cmd) {
   342			const struct cxl_command_info *info = &cmd->info;
   343	
   344			if (copy_to_user(&q->commands[j++], info, sizeof(*info)))
   345				return -EFAULT;
   346	
   347			if (j == n_commands)
   348				break;
   349		}
   350	
   351		return 0;
   352	}
   353	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ