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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202501261727.x0aztept-lkp@intel.com>
Date: Sun, 26 Jan 2025 17:59:44 +0800
From: kernel test robot <lkp@...el.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
	Rob Herring <robh@...nel.org>,
	Saravana Kannan <saravanak@...gle.com>
Cc: oe-kbuild-all@...ts.linux.dev,
	Basharath Hussain Khaja <basharath@...thit.com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: Re: [PATCH 2/2] of: address: Add kunit test for
 __of_address_resource_bounds()

Hi Thomas,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ffd294d346d185b70e28b1a28abe367bbfe53c04]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Wei-schuh/of-address-Fix-empty-resource-handling-in-__of_address_resource_bounds/20250120-221141
base:   ffd294d346d185b70e28b1a28abe367bbfe53c04
patch link:    https://lore.kernel.org/r/20250120-of-address-overflow-v1-2-dd68dbf47bce%40linutronix.de
patch subject: [PATCH 2/2] of: address: Add kunit test for __of_address_resource_bounds()
config: arc-randconfig-r121-20250126 (https://download.01.org/0day-ci/archive/20250126/202501261727.x0aztept-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250126/202501261727.x0aztept-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501261727.x0aztept-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/of/of_test.c:130:47: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
   drivers/of/of_test.c:131:45: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
>> drivers/of/of_test.c:138:45: sparse: sparse: cast truncates bits from constant value (100000ffe becomes ffe)

vim +130 drivers/of/of_test.c

    72	
    73	static const struct of_address_resource_bounds_case of_address_resource_bounds_cases[] = {
    74		{
    75			.start = 0,
    76			.size = 0,
    77			.ret = 0,
    78			.res_start = 0,
    79			.res_end = -1,
    80		},
    81		{
    82			.start = 0,
    83			.size = 0x1000,
    84			.ret = 0,
    85			.res_start = 0,
    86			.res_end = 0xfff,
    87		},
    88		{
    89			.start = 0x1000,
    90			.size = 0,
    91			.ret = 0,
    92			.res_start = 0x1000,
    93			.res_end = 0xfff,
    94		},
    95		{
    96			.start = 0x1000,
    97			.size = 0x1000,
    98			.ret = 0,
    99			.res_start = 0x1000,
   100			.res_end = 0x1fff,
   101		},
   102		{
   103			.start = 1,
   104			.size = RESOURCE_SIZE_MAX,
   105			.ret = 0,
   106			.res_start = 1,
   107			.res_end = RESOURCE_SIZE_MAX,
   108		},
   109		{
   110			.start = RESOURCE_SIZE_MAX,
   111			.size = 1,
   112			.ret = 0,
   113			.res_start = RESOURCE_SIZE_MAX,
   114			.res_end = RESOURCE_SIZE_MAX,
   115		},
   116		{
   117			.start = 2,
   118			.size = RESOURCE_SIZE_MAX,
   119			.ret = -EOVERFLOW,
   120		},
   121		{
   122			.start = RESOURCE_SIZE_MAX,
   123			.size = 2,
   124			.ret = -EOVERFLOW,
   125		},
   126		{
   127			.start = 0x100000000ULL,
   128			.size = 1,
   129			.ret = sizeof(resource_size_t) > sizeof(u32) ? 0 : -EOVERFLOW,
 > 130			.res_start = (resource_size_t)0x100000000,
   131			.res_end = (resource_size_t)0x100000000,
   132		},
   133		{
   134			.start = 0x1000,
   135			.size = 0xffffffff,
   136			.ret = sizeof(resource_size_t) > sizeof(u32) ? 0 : -EOVERFLOW,
   137			.res_start = (resource_size_t)0x1000,
 > 138			.res_end = (resource_size_t)0x100000ffe,
   139		},
   140	};
   141	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ