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:   Fri, 15 Apr 2022 23:33:32 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jgunthorpe:vfio_kvm_no_group 2/11]
 arch/x86/kvm/../../../virt/kvm/vfio.c:356:58: warning: cast to pointer from
 integer of different size

tree:   https://github.com/jgunthorpe/linux vfio_kvm_no_group
head:   0a779a04652d97c98d71a1538a37f89145dba9ed
commit: c068aae365aaf0ecde7abf0842298c59d7ed0d9c [2/11] kvm/vfio: Reduce the scope of PPC #ifdefs
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220415/202204152347.iVwF28RC-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/jgunthorpe/linux/commit/c068aae365aaf0ecde7abf0842298c59d7ed0d9c
        git remote add jgunthorpe https://github.com/jgunthorpe/linux
        git fetch --no-tags jgunthorpe vfio_kvm_no_group
        git checkout c068aae365aaf0ecde7abf0842298c59d7ed0d9c
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   arch/x86/kvm/../../../virt/kvm/vfio.c: In function 'kvm_vfio_set_group':
>> arch/x86/kvm/../../../virt/kvm/vfio.c:356:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     356 |                 return kvm_vfio_group_set_spapr_tce(dev, (void __user *)arg);
         |                                                          ^


vim +356 arch/x86/kvm/../../../virt/kvm/vfio.c

26d16e3ba7292b Jason Gunthorpe 2022-03-30  338  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  339  static int kvm_vfio_set_group(struct kvm_device *dev, long attr, u64 arg)
26d16e3ba7292b Jason Gunthorpe 2022-03-30  340  {
26d16e3ba7292b Jason Gunthorpe 2022-03-30  341  	int32_t __user *argp = (int32_t __user *)(unsigned long)arg;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  342  	int32_t fd;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  343  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  344  	switch (attr) {
26d16e3ba7292b Jason Gunthorpe 2022-03-30  345  	case KVM_DEV_VFIO_GROUP_ADD:
26d16e3ba7292b Jason Gunthorpe 2022-03-30  346  		if (get_user(fd, argp))
26d16e3ba7292b Jason Gunthorpe 2022-03-30  347  			return -EFAULT;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  348  		return kvm_vfio_group_add(dev, fd);
26d16e3ba7292b Jason Gunthorpe 2022-03-30  349  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  350  	case KVM_DEV_VFIO_GROUP_DEL:
26d16e3ba7292b Jason Gunthorpe 2022-03-30  351  		if (get_user(fd, argp))
26d16e3ba7292b Jason Gunthorpe 2022-03-30  352  			return -EFAULT;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  353  		return kvm_vfio_group_del(dev, fd);
26d16e3ba7292b Jason Gunthorpe 2022-03-30  354  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  355  	case KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE:
26d16e3ba7292b Jason Gunthorpe 2022-03-30 @356  		return kvm_vfio_group_set_spapr_tce(dev, (void __user *)arg);
ec53500fae421e Alex Williamson 2013-10-30  357  	}
ec53500fae421e Alex Williamson 2013-10-30  358  
ec53500fae421e Alex Williamson 2013-10-30  359  	return -ENXIO;
ec53500fae421e Alex Williamson 2013-10-30  360  }
ec53500fae421e Alex Williamson 2013-10-30  361  

:::::: The code at line 356 was first introduced by commit
:::::: 26d16e3ba7292b7fce26d25a2ba8f44b8c28ffe3 kvm/vfio: Move KVM_DEV_VFIO_GROUP_* ioctls into functions

:::::: TO: Jason Gunthorpe <jgg@...dia.com>
:::::: CC: Jason Gunthorpe <jgg@...dia.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ