public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] gentoo-x86 commit in x11-drivers/nvidia-drivers/files: nvidia-drivers-pax-usercopy.patch nvidia-drivers-pax-const.patch
@ 2012-08-29  3:41 99% Doug Goldstein (cardoe)
  0 siblings, 0 replies; 1+ results
From: Doug Goldstein (cardoe) @ 2012-08-29  3:41 UTC (permalink / raw
  To: gentoo-commits

cardoe      12/08/29 03:41:51

  Added:                nvidia-drivers-pax-usercopy.patch
                        nvidia-drivers-pax-const.patch
  Log:
  Use Stefan Reimer <it@startux.de> Quark's overlay patches for PAX hacks by popular demand. bug #385837.
  
  (Portage version: 2.1.11.9/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch?rev=1.1&content-type=text/plain

Index: nvidia-drivers-pax-usercopy.patch
===================================================================
diff -urp kernel.orig/nv.c kernel/nv.c
--- kernel.orig/nv.c	2011-09-24 02:32:09.000000000 +0200
+++ kernel/nv.c	2011-10-05 19:13:41.474242252 +0200
@@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi
     NV_SPIN_LOCK_INIT(&km_lock);
 #endif
 
-    NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t);
+    NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY);
     if (nv_stack_t_cache == NULL)
     {
         nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
@@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi
     }
 #endif
 
-    NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t);
+    NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0);
     if (nv_pte_t_cache == NULL)
     {
         rc = -ENOMEM;
@@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi
     }
 
     NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t",
-            nvidia_p2p_page_t);
+            nvidia_p2p_page_t, 0);
     if (nvidia_p2p_page_t_cache == NULL)
     {
         rc = -ENOMEM;
diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h
--- kernel.orig/nv-linux.h	2011-09-24 02:32:09.000000000 +0200
+++ kernel/nv-linux.h	2011-10-05 19:14:42.522238996 +0200
@@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock;
 
 #if defined(NV_KMEM_CACHE_CREATE_PRESENT)
 #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6)
-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags)     \
     {                                                           \
         kmem_cache = kmem_cache_create(name, sizeof(type),      \
-                        0, 0, NULL, NULL);                      \
+                        0, flags, NULL, NULL);                  \
     }
 #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags)     \
     {                                                           \
         kmem_cache = kmem_cache_create(name, sizeof(type),      \
-                        0, 0, NULL);                            \
+                        0, flags, NULL);                        \
     }
 #else
 #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"



1.1                  x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch?rev=1.1&content-type=text/plain

Index: nvidia-drivers-pax-const.patch
===================================================================
Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ
diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c
--- kernel.orig/nv-procfs.c	2011-07-13 03:29:30.000000000 +0200
+++ kernel/nv-procfs.c	2011-07-19 15:45:27.982993911 +0200
@@ -707,8 +707,10 @@ int nv_register_procfs(void)
      * However, in preparation for this, we need to preserve
      * the procfs read() and write() operations.
      */
-    nv_procfs_registry_fops.read = entry->proc_fops->read;
-    nv_procfs_registry_fops.write = entry->proc_fops->write;
+    pax_open_kernel();
+    *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read;
+    *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write;
+    pax_close_kernel();
 
     entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
         nv_procfs_read_registry,





^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-08-29  3:41 99% [gentoo-commits] gentoo-x86 commit in x11-drivers/nvidia-drivers/files: nvidia-drivers-pax-usercopy.patch nvidia-drivers-pax-const.patch Doug Goldstein (cardoe)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox