Tighten permissions on some buffer manager ioctls.
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thu, 25 Oct 2007 08:29:15 +0000 (10:29 +0200)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thu, 25 Oct 2007 08:29:15 +0000 (10:29 +0200)
Set bo init minor to 0.
Add the version function to header.

libdrm/xf86mm.h
linux-core/drm_drv.c
shared-core/drm.h

index b092344..49ae2c0 100644 (file)
@@ -179,6 +179,9 @@ extern int drmBOSetStatus(int fd, drmBO *buf,
                          unsigned int hint, 
                          unsigned int desired_tile_stride,
                          unsigned int tile_info);
+extern int drmBOVersion(int fd, unsigned int *major,
+                       unsigned int *minor,
+                       unsigned int *patchlevel);
 
 
 #endif
index 330566b..fe2b120 100644 (file)
@@ -123,10 +123,14 @@ static struct drm_ioctl_desc drm_ioctls[] = {
        DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_update_drawable_info, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 
 
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_INIT, drm_mm_init_ioctl, DRM_AUTH),
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_TAKEDOWN, drm_mm_takedown_ioctl, DRM_AUTH),
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_LOCK, drm_mm_lock_ioctl, DRM_AUTH),
-       DRM_IOCTL_DEF(DRM_IOCTL_MM_UNLOCK, drm_mm_unlock_ioctl, DRM_AUTH),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_INIT, drm_mm_init_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_TAKEDOWN, drm_mm_takedown_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_LOCK, drm_mm_lock_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF(DRM_IOCTL_MM_UNLOCK, drm_mm_unlock_ioctl, 
+                     DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 
        DRM_IOCTL_DEF(DRM_IOCTL_FENCE_CREATE, drm_fence_create_ioctl, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_IOCTL_FENCE_REFERENCE, drm_fence_reference_ioctl, DRM_AUTH),
index a48f347..ae88ce6 100644 (file)
@@ -759,7 +759,7 @@ struct drm_fence_arg {
 
 #define DRM_BO_INIT_MAGIC 0xfe769812
 #define DRM_BO_INIT_MAJOR 1
-#define DRM_BO_INIT_MINOR 1
+#define DRM_BO_INIT_MINOR 0
 #define DRM_BO_INIT_PATCH 0