Hi Avihai, kernel test robot noticed the following build errors: [auto build test ERROR on awilliam-vfio/next] [also build test ERROR on linus/master awilliam-vfio/for-linus v6.12 next-20241122] [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/Avihai-Horon/vfio-pci-Properly-hide-first-in-list-PCIe-extended-capability/20241121-220249 base: https://github.com/awilliam/linux-vfio.git next patch link: https://lore.kernel.org/r/20241121140057.25157-1-avihaih%40nvidia.com patch subject: [PATCH v2] vfio/pci: Properly hide first-in-list PCIe extended capability config: s390-randconfig-r053-20241122 (https://download.01.org/0day-ci/archive/20241123/202411230727.abAsDI8W-lkp@xxxxxxxxx/config) compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241123/202411230727.abAsDI8W-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202411230727.abAsDI8W-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from drivers/vfio/pci/vfio_pci_config.c:24: In file included from include/linux/pci.h:39: In file included from include/linux/io.h:14: In file included from arch/s390/include/asm/io.h:95: include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^ In file included from drivers/vfio/pci/vfio_pci_config.c:24: In file included from include/linux/pci.h:39: In file included from include/linux/io.h:14: In file included from arch/s390/include/asm/io.h:95: include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) ^ In file included from drivers/vfio/pci/vfio_pci_config.c:24: In file included from include/linux/pci.h:39: In file included from include/linux/io.h:14: In file included from arch/s390/include/asm/io.h:95: include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> drivers/vfio/pci/vfio_pci_config.c:322:27: error: initializer element is not a compile-time constant [0 ... PCI_CAP_ID_MAX] = direct_ro_perms ^~~~~~~~~~~~~~~ drivers/vfio/pci/vfio_pci_config.c:325:31: error: initializer element is not a compile-time constant [0 ... PCI_EXT_CAP_ID_MAX] = direct_ro_perms ^~~~~~~~~~~~~~~ 12 warnings and 2 errors generated. vim +322 drivers/vfio/pci/vfio_pci_config.c 319 320 /* Default capability regions to read-only, no-virtualization */ 321 static struct perm_bits cap_perms[PCI_CAP_ID_MAX + 1] = { > 322 [0 ... PCI_CAP_ID_MAX] = direct_ro_perms 323 }; 324 static struct perm_bits ecap_perms[PCI_EXT_CAP_ID_MAX + 1] = { 325 [0 ... PCI_EXT_CAP_ID_MAX] = direct_ro_perms 326 }; 327 /* 328 * Default unassigned regions to raw read-write access. Some devices 329 * require this to function as they hide registers between the gaps in 330 * config space (be2net). Like MMIO and I/O port registers, we have 331 * to trust the hardware isolation. 332 */ 333 static struct perm_bits unassigned_perms = { 334 .readfn = vfio_raw_config_read, 335 .writefn = vfio_raw_config_write 336 }; 337 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki