mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>
Subject: arch/powerpc/kernel/eeh_driver.c:43:17: sparse: sparse: cast from restricted pci_ers_result_t
Date: Sun, 30 Jan 2022 16:53:29 +0800	[thread overview]
Message-ID: <202201301501.QOFGw42Q-lkp@intel.com> (raw)

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@intel.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@linux.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>

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

                 reply	other threads:[~2022-01-30  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202201301501.QOFGw42Q-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome