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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc8b4831-73bf-5f18-ebaa-e0fa6c3d5366@molgen.mpg.de>
Date:   Wed, 23 Jan 2019 17:44:57 +0100
From:   Paul Menzel <pmenzel@...gen.mpg.de>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     stable@...r.kernel.org, openipmi-developer@...ts.sourceforge.net,
        LKML <linux-kernel@...r.kernel.org>, it+lkml@...gen.mpg.de
Subject: [PATCH v2] ipmi:pci: Blacklist a Realtek "IPMI" device

From: Corey Minyard <cminyard@...sta.com>
Date: Thu, 15 Feb 2018 16:58:26 -0600

[ upstream commit bc48fa1b9d3b04106055b27078da824cd209865a ]

Realtek has some sort of "Virtual" IPMI device on the PCI bus as a
KCS controller, but whatever it is, it's not one.  Ignore it if seen.

Reported-by: Chris Chiu <chiu@...lessm.com>
Signed-off-by: Corey Minyard <cminyard@...sta.com>
Tested-by: Daniel Drake <drake@...lessm.com>

[ Commit 13d0b35c (ipmi_si: Move PCI setup to another file) from Linux
  4.15-rc1 has not been back ported, so the PCI code is still in
  `drivers/char/ipmi/ipmi_si_intf.c`, requiring to apply the commit
  manually.

  This fixes a 100 s boot delay on the HP EliteDesk 705 G4 MT with Linux
  4.14.94. ]

Signed-off-by: Paul Menzel <pmenzel@...gen.mpg.de>
---

v2: Use tabs. Sorry for messing that up.

 drivers/char/ipmi/ipmi_si_intf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index c04aa11f0e21..a106cf7b5ee0 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2447,6 +2447,15 @@ static int ipmi_pci_probe_regspacing(struct smi_info *info)
 	return DEFAULT_REGSPACING;
 }
 
+static struct pci_device_id ipmi_pci_blacklist[] = {
+	/*
+	 * This is a "Virtual IPMI device", whatever that is.  It appears
+	 * as a KCS device by the class, but it is not one.
+	 */
+	{ PCI_VDEVICE(REALTEK, 0x816c) },
+	{ 0, }
+};
+
 static int ipmi_pci_probe(struct pci_dev *pdev,
 				    const struct pci_device_id *ent)
 {
@@ -2454,6 +2463,9 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
 	int class_type = pdev->class & PCI_ERMC_CLASSCODE_TYPE_MASK;
 	struct smi_info *info;
 
+	if (pci_match_id(ipmi_pci_blacklist, pdev))
+		return -ENODEV;
+
 	info = smi_info_alloc();
 	if (!info)
 		return -ENOMEM;
-- 
2.17.1


Download attachment "smime.p7s" of type "application/pkcs7-signature" (5174 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ