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  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:   Tue, 11 Aug 2020 02:32:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     John Garry <john.garry@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Wei Xu <xuwei5@...ilicon.com>
Subject: drivers/pci/pci.c:3911 pci_pio_to_address() warn: always true
 condition '(pio >= (0 - 0)) => (0-u64max >= 0)'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: b8104fda1fff0882e43b7e98832a76d7e98eb3e9 logic_pio: Define PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO
date:   9 months ago
config: s390-randconfig-m031-20200810 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0

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

New smatch warnings:
drivers/pci/pci.c:3911 pci_pio_to_address() warn: always true condition '(pio >= (0 - 0)) => (0-u64max >= 0)'

Old smatch warnings:
drivers/pci/pci.c:5982 pci_specified_resource_alignment() warn: should '1 << align_order' be a 64 bit type?

vim +3911 drivers/pci/pci.c

c5076cfe768998 Tomasz Nowicki 2016-05-11  3905  
c5076cfe768998 Tomasz Nowicki 2016-05-11  3906  phys_addr_t pci_pio_to_address(unsigned long pio)
c5076cfe768998 Tomasz Nowicki 2016-05-11  3907  {
c5076cfe768998 Tomasz Nowicki 2016-05-11  3908  	phys_addr_t address = (phys_addr_t)OF_BAD_ADDR;
c5076cfe768998 Tomasz Nowicki 2016-05-11  3909  
c5076cfe768998 Tomasz Nowicki 2016-05-11  3910  #ifdef PCI_IOBASE
5745392e0c2b78 Zhichang Yuan  2018-03-15 @3911  	if (pio >= MMIO_UPPER_LIMIT)
c5076cfe768998 Tomasz Nowicki 2016-05-11  3912  		return address;
c5076cfe768998 Tomasz Nowicki 2016-05-11  3913  
5745392e0c2b78 Zhichang Yuan  2018-03-15  3914  	address = logic_pio_to_hwaddr(pio);
c5076cfe768998 Tomasz Nowicki 2016-05-11  3915  #endif
c5076cfe768998 Tomasz Nowicki 2016-05-11  3916  
c5076cfe768998 Tomasz Nowicki 2016-05-11  3917  	return address;
c5076cfe768998 Tomasz Nowicki 2016-05-11  3918  }
c5076cfe768998 Tomasz Nowicki 2016-05-11  3919  

:::::: The code at line 3911 was first introduced by commit
:::::: 5745392e0c2b78e0d73203281d5c42cbd6993194 PCI: Apply the new generic I/O management on PCI IO hosts

:::::: TO: Zhichang Yuan <yuanzhichang@...ilicon.com>
:::::: CC: Bjorn Helgaas <helgaas@...nel.org>

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

Download attachment ".config.gz" of type "application/gzip" (18970 bytes)

Powered by blists - more mailing lists