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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 02 Feb 2022 10:46:16 -0000
From:   "irqchip-bot for Marc Zyngier" <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     Steev Klimaszewski <steev@...i.org>, Marc Zyngier <maz@...nel.org>,
        Valentin Schneider <valentin.schneider@....com>,
        tglx@...utronix.de
Subject: [irqchip: irq/irqchip-fixes] irqchip/gic-v3-its: Skip HP notifier
 when no ITS is registered

The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

Commit-ID:     eba1e44beef88aa722f07755f79f604cd5d92290
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/eba1e44beef88aa722f07755f79f604cd5d92290
Author:        Marc Zyngier <maz@...nel.org>
AuthorDate:    Wed, 02 Feb 2022 10:34:54 
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Wed, 02 Feb 2022 10:43:10 

irqchip/gic-v3-its: Skip HP notifier when no ITS is registered

We have some systems out there that have both LPI support and an
ITS, but that don't expose the ITS in their firmware tables
(either because it is broken or because they run under a hypervisor
that hides it...).

Is such a configuration, we still register the HP notifier to free
the allocated tables if needed, resulting in a warning as there is
no memory to free (nothing was allocated the first place).

Fix it by keying the HP notifier on the presence of at least one
sucessfully probed ITS.

Fixes: d23bc2bc1d63 ("irqchip/gic-v3-its: Postpone LPI pending table freeing and memreserve")
Reported-by: Steev Klimaszewski <steev@...i.org>
Tested-by: Steev Klimaszewski <steev@...i.org>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Cc: Valentin Schneider <valentin.schneider@....com>
Link: https://lore.kernel.org/r/20220202103454.2480465-1-maz@kernel.org
---
 drivers/irqchip/irq-gic-v3-its.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 9e93ff2..cd77297 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5517,6 +5517,9 @@ int __init its_lpi_memreserve_init(void)
 	if (!efi_enabled(EFI_CONFIG_TABLES))
 		return 0;
 
+	if (list_empty(&its_nodes))
+		return 0;
+
 	gic_rdists->cpuhp_memreserve_state = CPUHP_INVALID;
 	state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
 				  "irqchip/arm/gicv3/memreserve:online",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ