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  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:	Fri, 18 Jul 2014 11:12:55 +0400
Cc:,,,,, "Matwey V. Kornilov" <>
Subject: [PATCHv4 2/2] parport: parport_pc: Implement CPU model check to cut off false-positives

From: "Matwey V. Kornilov" <>

The code in intel_bug_present is known to produce much false-positives.
It is believed that the affected by the bug hardware are used with either Intel 80486 or Pentium.

Perform the check only when the kernel configured as CONFIG_X86_32,
then use cpuinfo_x86 of the first available CPU to check the model
and run initial check code.

Suggested-by: One Thousand Gnomes <>
Tested-by: Heiko Andreas Sommer <>
Signed-off-by: Matwey V. Kornilov <>
 drivers/parport/parport_pc.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index a6eaafb..6b28f9f 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -65,6 +65,7 @@
 #include <linux/parport_pc.h>
 #include <linux/via.h>
 #include <asm/parport.h>
+#include <asm/processor.h>
@@ -1702,7 +1703,11 @@ static int parport_ECP_supported(struct parport *pb)
-static int intel_bug_present(struct parport *pb)
+/*  It is believed that CPU model correlates with buggy LPT chipset model.
+    Here we check that or CPU is elder than Pentium Pro: either 80486 or Pentium.
+    If it is then we perform The Check. */
+#ifdef CONFIG_X86_32
+static int intel_bug_present_check_epp(struct parport *pb)
 	const struct parport_pc_private *priv = pb->private_data;
 	int bug_present = 0;
@@ -1725,6 +1730,20 @@ static int intel_bug_present(struct parport *pb)
 	return bug_present;
+static int intel_bug_present(struct parport *pb)
+	struct cpuinfo_x86 *c = &cpu_data(0);
+	if (c->x86_vendor == X86_VENDOR_INTEL && (c->x86 == 4 || c->x86 == 5))
+		return intel_bug_present_check_epp(pb);
+	return 0;
+static int intel_bug_present(struct parport *pb)
+	return 0;
 static int parport_ECPPS2_supported(struct parport *pb)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists