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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212012140.jKRX8Ss7-lkp@intel.com>
Date:   Thu, 1 Dec 2022 21:29:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, alex.williamson@...hat.com,
        jgg@...dia.com, yishaih@...dia.com, kevin.tian@...el.com,
        linuxarm@...wei.com, liulongfang@...wei.com,
        prime.zeng@...ilicon.com
Subject: Re: [PATCH 1/4] hisi_acc_vfio_pci: Add support for precopy IOCTL

Hi Shameer,

I love your patch! Yet something to improve:

[auto build test ERROR on awilliam-vfio/for-linus]
[also build test ERROR on linus/master v6.1-rc7 next-20221201]
[cannot apply to awilliam-vfio/next]
[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/Shameer-Kolothum/hisi_acc_vfio_pci-Add-PRE_COPY-migration-feature-support/20221123-193542
base:   https://github.com/awilliam/linux-vfio.git for-linus
patch link:    https://lore.kernel.org/r/20221123113236.896-2-shameerali.kolothum.thodi%40huawei.com
patch subject: [PATCH 1/4] hisi_acc_vfio_pci: Add support for precopy IOCTL
config: ia64-allmodconfig
compiler: ia64-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/7ac2dded048e6633c89d0e330dad983a81705eb2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Shameer-Kolothum/hisi_acc_vfio_pci-Add-PRE_COPY-migration-feature-support/20221123-193542
        git checkout 7ac2dded048e6633c89d0e330dad983a81705eb2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/vfio/pci/hisilicon/

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

All errors (new ones prefixed by >>):

   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vf_precopy_ioctl':
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:777:34: error: storage size of 'info' isn't known
     777 |         struct vfio_precopy_info info;
         |                                  ^~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:781:20: error: 'VFIO_MIG_GET_PRECOPY_INFO' undeclared (first use in this function)
     781 |         if (cmd != VFIO_MIG_GET_PRECOPY_INFO)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:781:20: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/uapi/linux/posix_types.h:5,
                    from include/uapi/linux/types.h:14,
                    from include/linux/types.h:6,
                    from include/linux/kasan-checks.h:5,
                    from include/asm-generic/rwonce.h:26,
                    from ./arch/ia64/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:246,
                    from include/linux/dev_printk.h:14,
                    from include/linux/device.h:15,
                    from drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:6:
>> include/linux/stddef.h:16:33: error: invalid use of undefined type 'struct vfio_precopy_info'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:33:10: note: in expansion of macro 'offsetof'
      33 |         (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
         |          ^~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:784:17: note: in expansion of macro 'offsetofend'
     784 |         minsz = offsetofend(struct vfio_precopy_info, dirty_bytes);
         |                 ^~~~~~~~~~~
   include/linux/stddef.h:24:55: error: invalid use of undefined type 'struct vfio_precopy_info'
      24 | #define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
         |                                                       ^~
   include/linux/stddef.h:33:35: note: in expansion of macro 'sizeof_field'
      33 |         (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
         |                                   ^~~~~~~~~~~~
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:784:17: note: in expansion of macro 'offsetofend'
     784 |         minsz = offsetofend(struct vfio_precopy_info, dirty_bytes);
         |                 ^~~~~~~~~~~
>> drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:792:41: error: 'VFIO_DEVICE_STATE_PRE_COPY' undeclared (first use in this function); did you mean 'VFIO_DEVICE_STATE_STOP_COPY'?
     792 |         if (hisi_acc_vdev->mig_state != VFIO_DEVICE_STATE_PRE_COPY) {
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                         VFIO_DEVICE_STATE_STOP_COPY
   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:777:34: warning: unused variable 'info' [-Wunused-variable]
     777 |         struct vfio_precopy_info info;
         |                                  ^~~~


vim +16 include/linux/stddef.h

6e218287432472 Richard Knutsson 2006-09-30  14  
^1da177e4c3f41 Linus Torvalds   2005-04-16  15  #undef offsetof
14e83077d55ff4 Rasmus Villemoes 2022-03-23 @16  #define offsetof(TYPE, MEMBER)	__builtin_offsetof(TYPE, MEMBER)
3876488444e712 Denys Vlasenko   2015-03-09  17  

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

View attachment "config" of type "text/plain" (286873 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ