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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205211740.XMg1JXoD-lkp@intel.com>
Date:   Sat, 21 May 2022 17:54:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     João Mário Domingos 
        <joao.mario@...nico.ulisboa.pt>
Cc:     kbuild-all@...ts.01.org, Atish Patra <Atish.Patra@....com>,
        linux-kernel@...r.kernel.org, Atish Patra <atishp@...osinc.com>
Subject: [atishp04:unmatched_pmu 1/4] drivers/perf/riscv_pmu_sbi.c:709:41:
 warning: right shift count >= width of type

tree:   https://github.com/atishp04/linux unmatched_pmu
head:   7b75dbb7c4c01dceb7a974c352945fd86eb88c25
commit: 04bc56e83a7e6e851694e34da95f26c57abc7132 [1/4] RISC-V: Create unique identification for SoC PMU
config: riscv-randconfig-r001-20220519 (https://download.01.org/0day-ci/archive/20220521/202205211740.XMg1JXoD-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.3.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/atishp04/linux/commit/04bc56e83a7e6e851694e34da95f26c57abc7132
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 unmatched_pmu
        git checkout 04bc56e83a7e6e851694e34da95f26c57abc7132
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/perf/

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 >>):

   drivers/perf/riscv_pmu_sbi.c: In function 'pmu_sbi_get_pmu_id':
>> drivers/perf/riscv_pmu_sbi.c:709:41: warning: right shift count >= width of type [-Wshift-count-overflow]
     709 |         pmuid.arch = (sbi_get_marchid() >> (63 - 15) & (1 << 15)) | (sbi_get_marchid() & 0x7FFF);
         |                                         ^~


vim +709 drivers/perf/riscv_pmu_sbi.c

   695	
   696	static uint64_t pmu_sbi_get_pmu_id(void)
   697	{
   698		union sbi_pmu_id {
   699			uint64_t value;
   700			struct {
   701				uint16_t imp:16;
   702				uint16_t arch:16;
   703				uint32_t vendor:32;
   704			};
   705		} pmuid;
   706	
   707		pmuid.value = 0;
   708		pmuid.vendor = (uint32_t) sbi_get_mvendorid();
 > 709		pmuid.arch = (sbi_get_marchid() >> (63 - 15) & (1 << 15)) | (sbi_get_marchid() & 0x7FFF);
   710		pmuid.imp = (sbi_get_mimpid() >> 16);
   711	
   712		return pmuid.value;
   713	}
   714	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ