summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/radeon_cp.c
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2005-06-24 22:21:28 +0000
committeranholt <anholt@FreeBSD.org>2005-06-24 22:21:28 +0000
commitae8af4cc10c9936ee9373103fd4f171415673362 (patch)
treeca14e68358722ebb5d4d26c02d65dfea7df09547 /sys/dev/drm/radeon_cp.c
parent23c82e526bffc119e69cab44576152ec817fa330 (diff)
downloadFreeBSD-src-ae8af4cc10c9936ee9373103fd4f171415673362.zip
FreeBSD-src-ae8af4cc10c9936ee9373103fd4f171415673362.tar.gz
Mark the permanent map for radeon registers read-only. Failure to set this flag
allowed writing to the registers by any user that can open the DRI device, and therefore ability to initiate DMA. This came in with the merge from DRI CVS on 2005-04-15. Approved by: re (scottl) Obtained from: DRM CVS
Diffstat (limited to 'sys/dev/drm/radeon_cp.c')
-rw-r--r--sys/dev/drm/radeon_cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/drm/radeon_cp.c b/sys/dev/drm/radeon_cp.c
index 48626bf..6e8b430 100644
--- a/sys/dev/drm/radeon_cp.c
+++ b/sys/dev/drm/radeon_cp.c
@@ -2032,7 +2032,8 @@ int radeon_preinit(struct drm_device *dev, unsigned long flags)
}
ret = drm_initmap(dev, drm_get_resource_start(dev, 2),
- drm_get_resource_len(dev, 2), 2, _DRM_REGISTERS, 0);
+ drm_get_resource_len(dev, 2), 2, _DRM_REGISTERS,
+ _DRM_READ_ONLY);
if (ret != 0)
return ret;
OpenPOWER on IntegriCloud