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]
Message-Id: <1285715225-21449-1-git-send-email-currojerez@riseup.net>
Date:	Wed, 29 Sep 2010 01:07:05 +0200
From:	Francisco Jerez <currojerez@...eup.net>
To:	linux-kernel@...r.kernel.org
Cc:	dri-devel@...ts.freedesktop.org, Dave Airlie <airlied@...ux.ie>,
	Grzesiek Sójka <pld@....pl>
Subject: [PATCH] agp/amd-k7: Allow binding user memory to the AGP GART.

TTM-based DRM drivers need to be able to bind user memory to the AGP
aperture. This patch fixes the "[TTM] AGP Bind memory failed." errors
and the subsequent fallout seen with the nouveau driver.

Reported-by: Grzesiek Sójka <pld@....pl>
Signed-off-by: Francisco Jerez <currojerez@...eup.net>
---
 drivers/char/agp/amd-k7-agp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index b6b1568..82e5189 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -303,13 +303,15 @@ static void amd_irongate_tlbflush(struct agp_memory *temp)
 
 static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
 {
+	struct agp_bridge_data *bridge = mem->bridge;
 	int i, j, num_entries;
 	unsigned long __iomem *cur_gatt;
 	unsigned long addr;
 
 	num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries;
 
-	if (type != 0 || mem->type != 0)
+	if (!bridge || type != mem->type ||
+	    bridge->driver->agp_type_to_mask_type(bridge, type))
 		return -EINVAL;
 
 	if ((pg_start + mem->page_count) > num_entries)
-- 
1.6.4.4

--
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