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: <aUUqYjLtLKWA4bHq@lpieralisi>
Date: Fri, 19 Dec 2025 11:35:14 +0100
From: Lorenzo Pieralisi <lpieralisi@...nel.org>
To: kernel test robot <lkp@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Marc Zyngier <maz@...nel.org>
Subject: Re: drivers/irqchip/irq-gic-v5-its.c:854:13: sparse: sparse:
 restricted __le64 degrades to integer

On Sat, Dec 13, 2025 at 06:56:34PM +0800, kernel test robot wrote:
> Hi Lorenzo,
> 
> First bad commit (maybe != root cause):
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   a859eca0e4cc96f63ff125dbe5388d961558b0e9
> commit: 53bb952a625fd3247647c7a28366ce990a579415 arm64: Kconfig: Enable GICv5
> date:   5 months ago
> config: arm64-randconfig-r113-20251213 (https://download.01.org/0day-ci/archive/20251213/202512131849.30ZRTBeR-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 12.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512131849.30ZRTBeR-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/202512131849.30ZRTBeR-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
>    drivers/irqchip/irq-gic-v5-its.c:854:13: sparse: sparse: cast to restricted __le64
> >> drivers/irqchip/irq-gic-v5-its.c:854:13: sparse: sparse: restricted __le64 degrades to integer
> >> drivers/irqchip/irq-gic-v5-its.c:854:13: sparse: sparse: restricted __le64 degrades to integer
> 
> vim +854 drivers/irqchip/irq-gic-v5-its.c
> 
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  845  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  846  static int gicv5_its_map_event(struct gicv5_its_dev *its_dev, u16 event_id, u32 lpi)
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  847  {
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  848  	struct gicv5_its_chip_data *its = its_dev->its_node;
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  849  	u64 itt_entry;
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  850  	__le64 *itte;
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  851  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  852  	itte = gicv5_its_device_get_itte_ref(its_dev, event_id);
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  853  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03 @854  	if (FIELD_GET(GICV5_ITTL2E_VALID, *itte))
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  855  		return -EEXIST;

Yep, that missed an le64_to_cpu() on the *itte value, fixed, will post the fix
shortly.

Thanks,
Lorenzo

> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  856  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  857  	itt_entry = FIELD_PREP(GICV5_ITTL2E_LPI_ID, lpi) |
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  858  		    FIELD_PREP(GICV5_ITTL2E_VALID, 0x1);
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  859  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  860  	its_write_table_entry(its, itte, itt_entry);
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  861  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  862  	gicv5_its_itt_cache_inv(its, its_dev->device_id, event_id);
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  863  
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  864  	return 0;
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  865  }
> 57d72196dfc850 Lorenzo Pieralisi 2025-07-03  866  
> 
> :::::: The code at line 854 was first introduced by commit
> :::::: 57d72196dfc8502b7e376ecdffb11c4f8766f26d irqchip/gic-v5: Add GICv5 ITS support
> 
> :::::: TO: Lorenzo Pieralisi <lpieralisi@...nel.org>
> :::::: CC: Marc Zyngier <maz@...nel.org>
> 
> -- 
> 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