public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness
@ 2025-12-22 10:22 Lorenzo Pieralisi
  2025-12-22 10:42 ` Marc Zyngier
  2026-01-09 15:11 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2025-12-22 10:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, kernel test robot, Thomas Gleixner,
	Marc Zyngier

Kbuild bot (through sparse) reported that the ITTE read to carry out
a valid check in gicv5_its_map_event() lacks proper endianness handling.

Fix it.

Fixes: 57d72196dfc8 ("irqchip/gic-v5: Add GICv5 ITS support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512131849.30ZRTBeR-lkp@intel.com/
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-gic-v5-its.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
index 554485f0be1f..8e22134b9f48 100644
--- a/drivers/irqchip/irq-gic-v5-its.c
+++ b/drivers/irqchip/irq-gic-v5-its.c
@@ -849,7 +849,7 @@ static int gicv5_its_map_event(struct gicv5_its_dev *its_dev, u16 event_id, u32
 
 	itte = gicv5_its_device_get_itte_ref(its_dev, event_id);
 
-	if (FIELD_GET(GICV5_ITTL2E_VALID, *itte))
+	if (FIELD_GET(GICV5_ITTL2E_VALID, le64_to_cpu(*itte)))
 		return -EEXIST;
 
 	itt_entry = FIELD_PREP(GICV5_ITTL2E_LPI_ID, lpi) |
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness
  2025-12-22 10:22 [PATCH] irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness Lorenzo Pieralisi
@ 2025-12-22 10:42 ` Marc Zyngier
  2026-01-09 15:11 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2025-12-22 10:42 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: linux-kernel, linux-arm-kernel, kernel test robot,
	Thomas Gleixner

On Mon, 22 Dec 2025 10:22:50 +0000,
Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
> 
> Kbuild bot (through sparse) reported that the ITTE read to carry out
> a valid check in gicv5_its_map_event() lacks proper endianness handling.
> 
> Fix it.
> 
> Fixes: 57d72196dfc8 ("irqchip/gic-v5: Add GICv5 ITS support")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512131849.30ZRTBeR-lkp@intel.com/
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Marc Zyngier <maz@kernel.org>
> ---
>  drivers/irqchip/irq-gic-v5-its.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
> index 554485f0be1f..8e22134b9f48 100644
> --- a/drivers/irqchip/irq-gic-v5-its.c
> +++ b/drivers/irqchip/irq-gic-v5-its.c
> @@ -849,7 +849,7 @@ static int gicv5_its_map_event(struct gicv5_its_dev *its_dev, u16 event_id, u32
>  
>  	itte = gicv5_its_device_get_itte_ref(its_dev, event_id);
>  
> -	if (FIELD_GET(GICV5_ITTL2E_VALID, *itte))
> +	if (FIELD_GET(GICV5_ITTL2E_VALID, le64_to_cpu(*itte)))
>  		return -EEXIST;
>  
>  	itt_entry = FIELD_PREP(GICV5_ITTL2E_LPI_ID, lpi) |

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: irq/urgent] irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness
  2025-12-22 10:22 [PATCH] irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness Lorenzo Pieralisi
  2025-12-22 10:42 ` Marc Zyngier
@ 2026-01-09 15:11 ` tip-bot2 for Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Lorenzo Pieralisi @ 2026-01-09 15:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kernel test robot, Lorenzo Pieralisi, Thomas Gleixner,
	Marc Zyngier, x86, linux-kernel

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     1690eeb0cb2bb77096cb6c826b6849ef05013e34
Gitweb:        https://git.kernel.org/tip/1690eeb0cb2bb77096cb6c826b6849ef05013e34
Author:        Lorenzo Pieralisi <lpieralisi@kernel.org>
AuthorDate:    Mon, 22 Dec 2025 11:22:50 +01:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Fri, 09 Jan 2026 16:10:04 +01:00

irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness

Kbuild bot (through sparse) reported that the ITTE read to carry out
a valid check in gicv5_its_map_event() lacks proper endianness handling.

Add the missing endianess conversion.

Fixes: 57d72196dfc8 ("irqchip/gic-v5: Add GICv5 ITS support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://patch.msgid.link/20251222102250.435460-1-lpieralisi@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202512131849.30ZRTBeR-lkp@intel.com/
---
 drivers/irqchip/irq-gic-v5-its.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
index 554485f..8e22134 100644
--- a/drivers/irqchip/irq-gic-v5-its.c
+++ b/drivers/irqchip/irq-gic-v5-its.c
@@ -849,7 +849,7 @@ static int gicv5_its_map_event(struct gicv5_its_dev *its_dev, u16 event_id, u32 
 
 	itte = gicv5_its_device_get_itte_ref(its_dev, event_id);
 
-	if (FIELD_GET(GICV5_ITTL2E_VALID, *itte))
+	if (FIELD_GET(GICV5_ITTL2E_VALID, le64_to_cpu(*itte)))
 		return -EEXIST;
 
 	itt_entry = FIELD_PREP(GICV5_ITTL2E_LPI_ID, lpi) |

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-09 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22 10:22 [PATCH] irqchip/gic-v5: Fix gicv5_its_map_event() ITTE read endianness Lorenzo Pieralisi
2025-12-22 10:42 ` Marc Zyngier
2026-01-09 15:11 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox