[Pkg-fglrx-devel] r477 - in fglrx-driver/trunk/debian: . patches
Michael Gilbert
gilbert-guest at alioth.debian.org
Tue Sep 21 05:09:36 UTC 2010
Author: gilbert-guest
Date: 2010-09-21 05:09:28 +0000 (Tue, 21 Sep 2010)
New Revision: 477
Added:
fglrx-driver/trunk/debian/patches/04-dkms-compat_alloc_user_space-rename.patch
Removed:
fglrx-driver/trunk/debian/patches/04-compate-rename.patch
Modified:
fglrx-driver/trunk/debian/changelog
fglrx-driver/trunk/debian/patches/series
Log:
apply a more robust fix for the compat_alloc_user_space rename
Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog 2010-09-20 03:08:39 UTC (rev 476)
+++ fglrx-driver/trunk/debian/changelog 2010-09-21 05:09:28 UTC (rev 477)
@@ -1,7 +1,8 @@
fglrx-driver (1:10-9-2) UNRELEASED; urgency=low
* Use arch_compat_alloc_user_space in place of the now unavailable
- comat_alloc_user_space function (closes: #597478).
+ comat_alloc_user_space function in newer kernels (closes: #597478).
+ - Thanks to Ubuntu (Evan Broder) for the inspiration for a more robust fix.
-- Michael Gilbert <michael.s.gilbert at gmail.com> Sun, 19 Sep 2010 22:53:35 -0400
Deleted: fglrx-driver/trunk/debian/patches/04-compate-rename.patch
===================================================================
--- fglrx-driver/trunk/debian/patches/04-compate-rename.patch 2010-09-20 03:08:39 UTC (rev 476)
+++ fglrx-driver/trunk/debian/patches/04-compate-rename.patch 2010-09-21 05:09:28 UTC (rev 477)
@@ -1,15 +0,0 @@
-Description: Use arch_compat_alloc_user_space in place of the now unavailable
- comat_alloc_user_space function.
-Author: Michael Gilbert <michael.s.gilbert at gmail.com>
-Bug-Debian: http://bugs.debian.org/597478
---- fglrx-driver-10-9.orig/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
-+++ fglrx-driver-10-9/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
-@@ -193,7 +193,7 @@ void ATI_API_CALL KCL_IOCTL_UnregisterCo
- */
- void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
- {
-- return compat_alloc_user_space(size);
-+ return arch_compat_alloc_user_space(size);
- }
-
- #endif // __x86_64__
Added: fglrx-driver/trunk/debian/patches/04-dkms-compat_alloc_user_space-rename.patch
===================================================================
--- fglrx-driver/trunk/debian/patches/04-dkms-compat_alloc_user_space-rename.patch (rev 0)
+++ fglrx-driver/trunk/debian/patches/04-dkms-compat_alloc_user_space-rename.patch 2010-09-21 05:09:28 UTC (rev 477)
@@ -0,0 +1,39 @@
+Description: Use arch_compat_alloc_user_space in place of the now unavailable
+ comat_alloc_user_space function in newer kernels.
+Author: Michael Gilbert <michael.s.gilbert at gmail.com>
+Bug-Debian: http://bugs.debian.org/597478
+Index: fglrx-driver-10-9/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
+===================================================================
+--- fglrx-driver-10-9.orig/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-21 00:59:36.000000000 -0400
++++ fglrx-driver-10-9/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-21 01:01:42.000000000 -0400
+@@ -193,7 +193,17 @@
+ */
+ void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
+ {
+- return compat_alloc_user_space(size);
++ void __user *space;
++#if ARCH_COMPAT_ALLOC_USER_SPACE
++ space = arch_compat_alloc_user_space(size);
++#else
++ space = compat_alloc_user_space(size);
++#endif
++ // avoid cve-2010-3081
++ if (!access_ok(VERIFY_WRITE, space, size)) {
++ return NULL;
++ }
++ return space;
+ }
+
+ #endif // __x86_64__
+Index: fglrx-driver-10-9/common/lib/modules/fglrx/build_mod/2.6.x/Makefile
+===================================================================
+--- fglrx-driver-10-9.orig/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-21 00:59:27.000000000 -0400
++++ fglrx-driver-10-9/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-21 01:02:41.000000000 -0400
+@@ -66,6 +66,7 @@
+ -DFGL_GART_RESERVED_SLOT \
+ -DFGL_LINUX253P1_VMA_API \
+ -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
++ -DARCH_COMPAT_ALLOC_USER_SPACE=$(shell if grep -q compat_alloc_user_space /usr/src/linux-headers-$(KERNELRELEASE)/Module.symvers ; then echo 1 ; else echo 0 ; fi) \
+
+ ifeq ($(KERNELRELEASE),)
+ # on first call from remote location we get into this path
Modified: fglrx-driver/trunk/debian/patches/series
===================================================================
--- fglrx-driver/trunk/debian/patches/series 2010-09-20 03:08:39 UTC (rev 476)
+++ fglrx-driver/trunk/debian/patches/series 2010-09-21 05:09:28 UTC (rev 477)
@@ -1,3 +1,3 @@
01-CONFIG_X86_XEN.diff
03-authatieventsd.sh.diff
-04-compate-rename.patch
+04-dkms-compat_alloc_user_space-rename.patch
More information about the Pkg-fglrx-devel
mailing list