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-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jun 2010 10:13:52 +0200
From:	Ondrej Zary <linux@...nbow-software.org>
To:	David Airlie <airlied@...ux.ie>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] [resend] intel_agp: Don't oops with zero stolen memory

When "onboard video memory" is set do "disabled" in BIOS on Asus P4P800-VM
board (i865G), kernel oopses with memory corruption:
https://bugs.freedesktop.org/show_bug.cgi?id=28430

Fix that by cleanly aborting the initialization.

Signed-off-by: Ondrej Zary <linux@...nbow-software.org>

diff -urp linux-2.6.35-rc2-orig/drivers/char/agp/intel-gtt.c linux-2.6.35-rc2/drivers/char/agp/intel-gtt.c
--- linux-2.6.35-rc2-orig/drivers/char/agp/intel-gtt.c	2010-06-06 05:43:24.000000000 +0200
+++ linux-2.6.35-rc2/drivers/char/agp/intel-gtt.c	2010-06-14 19:14:05.000000000 +0200
@@ -797,6 +797,10 @@ static int intel_i830_create_gatt_table(
 
 	/* we have to call this as early as possible after the MMIO base address is known */
 	intel_i830_init_gtt_entries();
+	if (intel_private.gtt_entries == 0) {
+		iounmap(intel_private.registers);
+		return -ENOMEM;
+	}
 
 	agp_bridge->gatt_table = NULL;
 
@@ -1279,6 +1283,11 @@ static int intel_i915_create_gatt_table(
 
 	/* we have to call this as early as possible after the MMIO base address is known */
 	intel_i830_init_gtt_entries();
+	if (intel_private.gtt_entries == 0) {
+		iounmap(intel_private.gtt);
+		iounmap(intel_private.registers);
+		return -ENOMEM;
+	}
 
 	agp_bridge->gatt_table = NULL;
 
@@ -1387,6 +1396,11 @@ static int intel_i965_create_gatt_table(
 
 	/* we have to call this as early as possible after the MMIO base address is known */
 	intel_i830_init_gtt_entries();
+	if (intel_private.gtt_entries == 0) {
+		iounmap(intel_private.gtt);
+		iounmap(intel_private.registers);
+		return -ENOMEM;
+	}
 
 	agp_bridge->gatt_table = NULL;
 

-- 
Ondrej Zary
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ