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>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Dec 2023 11:42:39 +0530
From:   Mukesh Ojha <quic_mojha@...cinc.com>
To:     <maz@...nel.org>, <tglx@...utronix.de>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        Mukesh Ojha <quic_mojha@...cinc.com>
Subject: [PATCH] irqchip/gic-v3-its: BUG_ON if stall bit is set

There could be various reason that stall bit could
be set due to software errors while processing
commands in command queue is being processed and
waiting for 1s is not going to help in debugging
as command processing anyways going to be timed
out and system will continue to run and may crash
after some time due to this.

So, to debug such issues what command caused the
stall bit to set, BUG_ON right away.

Signed-off-by: Mukesh Ojha <quic_mojha@...cinc.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 9a7a74239eab..8983e0a3318c 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1078,6 +1078,11 @@ static int its_wait_for_range_completion(struct its_node *its,
 		s64 delta;
 
 		rd_idx = readl_relaxed(its->base + GITS_CREADR);
+		/*
+		 * Check for stall bit as there is no point in waiting
+		 * for 1s if the stall bit is already set.
+		 */
+		BUG_ON(rd_idx & 1);
 
 		/*
 		 * Compute the read pointer progress, taking the
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ