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]
Message-ID: <20241117234843.19236-1-dullfire@yahoo.com>
Date: Sun, 17 Nov 2024 17:48:41 -0600
From: dullfire@...oo.com
To: "David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Simon Horman <horms@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mostafa Saleh <smostafa@...gle.com>,
	Marc Zyngier <maz@...nel.org>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org
Cc: Jonathan Currier <dullfire@...oo.com>
Subject: [PATCH 0/2] Fix kernel panic on niu bind

From: Jonathan Currier <dullfire@...oo.com>

Currently, the niu module causes a fatal trap (tested on SPARC system)
when setting up it's MSIX interrupt vectors. A simple write to each
MSIX's vector table entries' ENTRY_DATA register is sufficient to work
around the issue for the current power cycle (note: this means booting a
working kernel, and then rebooting without power cycling will allow a
kernel without this fix to boot and work).

This series implements a struct pci_dev flag indicating ENTRY_DATA must be
written to before reads, and then sets the flag in the niu driver.

This series is based off of and tested on v6.11.5. 

Testing on next-20241115 was also done successfully with the following
caveats: On my test case (SPARC T2),
commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed before the PCI client drivers")
prevented all PCIe drivers from binding, including niu.
For my test case I disabled 03cfe0e05650's device_link_add().

Original mailing list discussion:
Link: https://lore.kernel.org/sparclinux/7de14cca-e2fa-49f7-b83e-5f8322cc9e56@yahoo.com/T/

Jonathan Currier (2):
  PCI/MSI: Add MSIX option to write to ENTRY_DATA before any reads
  net/niu: niu requires MSIX ENTRY_DATA fields touch before entry reads

 drivers/net/ethernet/sun/niu.c | 2 ++
 drivers/pci/msi/msi.c          | 2 ++
 include/linux/pci.h            | 2 ++
 3 files changed, 6 insertions(+)


base-commit: 05b1367d372aca98a4e09c1a0e7ff0b9d721b2bc
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ