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:   Sun, 30 Jan 2022 16:53:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     Pavel Begunkov <asml.silence@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Jens Axboe <axboe@...nel.dk>
Subject: arch/powerpc/kernel/eeh_driver.c:43:17: sparse: sparse: cast from
 restricted pci_ers_result_t

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f8c7e4ede46fe63ff10000669652648aab09d112
commit: 791f3465c4afde02d7f16cf7424ca87070b69396 io_uring: fix UAF due to missing POLLFREE handling
date:   2 weeks ago
config: powerpc64-randconfig-s032-20220130 (https://download.01.org/0day-ci/archive/20220130/202201301501.QOFGw42Q-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=791f3465c4afde02d7f16cf7424ca87070b69396
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 791f3465c4afde02d7f16cf7424ca87070b69396
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kernel/eeh_driver.c:43:17: sparse: sparse: cast from restricted pci_ers_result_t
   arch/powerpc/kernel/eeh_driver.c:64:17: sparse: sparse: cast from restricted pci_ers_result_t

vim +43 arch/powerpc/kernel/eeh_driver.c

67086e32b56481 Wei Yang    2016-03-04  26  
30424e386a30d1 Sam Bobroff 2018-05-25  27  static int eeh_result_priority(enum pci_ers_result result)
30424e386a30d1 Sam Bobroff 2018-05-25  28  {
30424e386a30d1 Sam Bobroff 2018-05-25  29  	switch (result) {
30424e386a30d1 Sam Bobroff 2018-05-25  30  	case PCI_ERS_RESULT_NONE:
30424e386a30d1 Sam Bobroff 2018-05-25  31  		return 1;
30424e386a30d1 Sam Bobroff 2018-05-25  32  	case PCI_ERS_RESULT_NO_AER_DRIVER:
30424e386a30d1 Sam Bobroff 2018-05-25  33  		return 2;
30424e386a30d1 Sam Bobroff 2018-05-25  34  	case PCI_ERS_RESULT_RECOVERED:
30424e386a30d1 Sam Bobroff 2018-05-25  35  		return 3;
30424e386a30d1 Sam Bobroff 2018-05-25  36  	case PCI_ERS_RESULT_CAN_RECOVER:
30424e386a30d1 Sam Bobroff 2018-05-25  37  		return 4;
30424e386a30d1 Sam Bobroff 2018-05-25  38  	case PCI_ERS_RESULT_DISCONNECT:
30424e386a30d1 Sam Bobroff 2018-05-25  39  		return 5;
30424e386a30d1 Sam Bobroff 2018-05-25  40  	case PCI_ERS_RESULT_NEED_RESET:
30424e386a30d1 Sam Bobroff 2018-05-25  41  		return 6;
30424e386a30d1 Sam Bobroff 2018-05-25  42  	default:
30424e386a30d1 Sam Bobroff 2018-05-25 @43  		WARN_ONCE(1, "Unknown pci_ers_result value: %d\n", (int)result);
30424e386a30d1 Sam Bobroff 2018-05-25  44  		return 0;
30424e386a30d1 Sam Bobroff 2018-05-25  45  	}
30424e386a30d1 Sam Bobroff 2018-05-25  46  };
30424e386a30d1 Sam Bobroff 2018-05-25  47  

:::::: The code at line 43 was first introduced by commit
:::::: 30424e386a30d1160a0fdf47beafe8b116d0a8f7 powerpc/eeh: Clean up pci_ers_result handling

:::::: TO: Sam Bobroff <sbobroff@...ux.ibm.com>
:::::: CC: Michael Ellerman <mpe@...erman.id.au>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ