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>] [day] [month] [year] [list]
Message-Id: <20240605230954.22911-1-jain.abhinav177@gmail.com>
Date: Wed,  5 Jun 2024 23:09:54 +0000
From: Abhinav Jain <jain.abhinav177@...il.com>
To: mahesh@...ux.ibm.com,
	oohall@...il.com,
	bhelgaas@...gle.com,
	linuxppc-dev@...ts.ozlabs.org,
	linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: skhan@...uxfoundation.org,
	javier.carrasco.cruz@...il.com,
	jain.abhinav177@...il.com
Subject: [PATCH v3] PCI/AER: Log error message if there are too many PCI devices with errors

Added pci_err() to log PCI device information on which iteration fails.
Added pci_err() to log note if there are too many failed devices.

Signed-off-by: Abhinav Jain <jain.abhinav177@...il.com>
---

PATCH v2:
https://lore.kernel.org/all/20240605212344.21808-1-jain.abhinav177@gmail.com/

Changes since v2:
 - Switched to pci_err() to log failing PCI device
 - Included the historical note below the "---" line
 - Fixed other style changes in the patch
---
 drivers/pci/pcie/aer.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 8b820a74dd6b..0bca83827ac1 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -882,11 +882,13 @@ static int find_device_iter(struct pci_dev *dev, void *data)
 	struct aer_err_info *e_info = (struct aer_err_info *)data;
 
 	if (is_error_source(dev, e_info)) {
+		/* Log error for the device */
+		pci_err(dev, "Error detected on device: %s\n", pci_name(dev));
+
 		/* List this device */
 		if (add_error_device(e_info, dev)) {
 			/* We cannot handle more... Stop iteration */
-			pr_notice("%s: Cannot handle more devices - iteration stopped\n",
-					__func__);
+			pci_err(dev, "Too many error devices encountered. Stopping iteration.\n");
 			return 1;
 		}
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ