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: <202301092103.lDmZmfCP-lkp@intel.com>
Date:   Mon, 9 Jan 2023 21:17:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     guo.ziliang@....com.cn, helgaas@...nel.org
Cc:     oe-kbuild-all@...ts.linux.dev, bhelgaas@...gle.com,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        chen.lin5@....com.cn
Subject: Re: 答复: [PATCH] PCI: of: Warn if bridge base/limit region overlaps with system ram region

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on helgaas-pci/for-linus linus/master v6.2-rc3 next-20230109]
[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/guo-ziliang-zte-com-cn/PATCH-PCI-of-Warn-if-bridge-base-limit-region-overlaps-with-system-ram-region/20230109-163746
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
patch link:    https://lore.kernel.org/r/202301091635256312056%40zte.com.cn
patch subject: 答复: [PATCH] PCI: of: Warn if bridge base/limit region overlaps with system ram region
config: mips-allmodconfig
compiler: mips-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/38ad87b57c5f9bea2f43674f02787ea51b4bbb20
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review guo-ziliang-zte-com-cn/PATCH-PCI-of-Warn-if-bridge-base-limit-region-overlaps-with-system-ram-region/20230109-163746
        git checkout 38ad87b57c5f9bea2f43674f02787ea51b4bbb20
        # 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=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/pci.h:37,
                    from drivers/pci/setup-bus.c:20:
   drivers/pci/setup-bus.c: In function 'check_bridge_region_overlaps_systemram':
>> drivers/pci/setup-bus.c:624:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'pci_bus_addr_t' {aka 'unsigned int'} [-Wformat=]
     624 |                 pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
     146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                             ^~~~~~~
   include/linux/pci.h:2527:41: note: in expansion of macro 'dev_warn'
    2527 | #define pci_warn(pdev, fmt, arg...)     dev_warn(&(pdev)->dev, fmt, ##arg)
         |                                         ^~~~~~~~
   drivers/pci/setup-bus.c:624:17: note: in expansion of macro 'pci_warn'
     624 |                 pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
         |                 ^~~~~~~~
   drivers/pci/setup-bus.c:624:42: note: format string is defined here
     624 |                 pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
         |                                   ~~~~~~~^
         |                                          |
         |                                          long long unsigned int
         |                                   %#012x
   drivers/pci/setup-bus.c:624:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'pci_bus_addr_t' {aka 'unsigned int'} [-Wformat=]
     624 |                 pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
     146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                             ^~~~~~~
   include/linux/pci.h:2527:41: note: in expansion of macro 'dev_warn'
    2527 | #define pci_warn(pdev, fmt, arg...)     dev_warn(&(pdev)->dev, fmt, ##arg)
         |                                         ^~~~~~~~
   drivers/pci/setup-bus.c:624:17: note: in expansion of macro 'pci_warn'
     624 |                 pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
         |                 ^~~~~~~~
   drivers/pci/setup-bus.c:624:52: note: format string is defined here
     624 |                 pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
         |                                             ~~~~~~~^
         |                                                    |
         |                                                    long long unsigned int
         |                                             %#012x


vim +624 drivers/pci/setup-bus.c

   610	
   611	static void check_bridge_region_overlaps_systemram(struct pci_dev *bridge,
   612								struct pci_bus_region *region)
   613	{
   614		int is_ram;
   615	
   616		/*
   617		 * bridge base/limit(memory behind) region may filter out inbound
   618		 * transactions which will result in inbound(eg: dma) fail of ep.
   619		 * AER may report it if enabled, we warn it also.
   620		 */
   621		is_ram = region_intersects(region->start, region->end - region->start + 1,
   622					IORESOURCE_SYSTEM_RAM, IORES_DESC_NONE);
   623		if (is_ram == REGION_INTERSECTS) {
 > 624			pci_warn(bridge, "%#012llx..%#012llx bridge base/limit region overlaps with system ram, may result in inbound fail\n",
   625				region->start, region->end);
   626		}
   627	}
   628	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ