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]
Message-ID: <202209201253.FRw5oo2x-lkp@intel.com>
Date:   Tue, 20 Sep 2022 12:49:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Ben Widawsky <bwidawsk@...nel.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: kernel/resource.c:1795:23: sparse: sparse: cast truncates bits from
 constant value (fffffffff becomes ffffffff)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   521a547ced6477c54b4b0cc206000406c221b4d6
commit: 23a22cd1c98be518774fe7f7e8a5203af050525a cxl/region: Allocate HPA capacity to regions
date:   8 weeks ago
config: arm-randconfig-s042-20220919 (https://download.01.org/0day-ci/archive/20220920/202209201253.FRw5oo2x-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=23a22cd1c98be518774fe7f7e8a5203af050525a
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 23a22cd1c98be518774fe7f7e8a5203af050525a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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

sparse warnings: (new ones prefixed by >>)
>> kernel/resource.c:1795:23: sparse: sparse: cast truncates bits from constant value (fffffffff becomes ffffffff)
   kernel/resource.c:1813:24: sparse: sparse: cast truncates bits from constant value (fffffffff becomes ffffffff)

vim +1795 kernel/resource.c

14b80582c43e4f Dan Williams 2022-05-20  1788  
14b80582c43e4f Dan Williams 2022-05-20  1789  static resource_size_t gfr_start(struct resource *base, resource_size_t size,
14b80582c43e4f Dan Williams 2022-05-20  1790  				 resource_size_t align, unsigned long flags)
14b80582c43e4f Dan Williams 2022-05-20  1791  {
14b80582c43e4f Dan Williams 2022-05-20  1792  	if (flags & GFR_DESCENDING) {
14b80582c43e4f Dan Williams 2022-05-20  1793  		resource_size_t end;
14b80582c43e4f Dan Williams 2022-05-20  1794  
14b80582c43e4f Dan Williams 2022-05-20 @1795  		end = min_t(resource_size_t, base->end,
14b80582c43e4f Dan Williams 2022-05-20  1796  			    (1ULL << MAX_PHYSMEM_BITS) - 1);
14b80582c43e4f Dan Williams 2022-05-20  1797  		return end - size + 1;
14b80582c43e4f Dan Williams 2022-05-20  1798  	}
14b80582c43e4f Dan Williams 2022-05-20  1799  
14b80582c43e4f Dan Williams 2022-05-20  1800  	return ALIGN(base->start, align);
14b80582c43e4f Dan Williams 2022-05-20  1801  }
14b80582c43e4f Dan Williams 2022-05-20  1802  

:::::: The code at line 1795 was first introduced by commit
:::::: 14b80582c43e4f550acfd93c2b2cadbe36ea0874 resource: Introduce alloc_free_mem_region()

:::::: TO: Dan Williams <dan.j.williams@...el.com>
:::::: CC: Dan Williams <dan.j.williams@...el.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ