/[gentoo-x86]/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch
Gentoo

Contents of /x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-usercopy.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Aug 29 03:41:50 2012 UTC (22 months, 3 weeks ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
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)

1 diff -urp kernel.orig/nv.c kernel/nv.c
2 --- kernel.orig/nv.c 2011-09-24 02:32:09.000000000 +0200
3 +++ kernel/nv.c 2011-10-05 19:13:41.474242252 +0200
4 @@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi
5 NV_SPIN_LOCK_INIT(&km_lock);
6 #endif
7
8 - NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t);
9 + NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY);
10 if (nv_stack_t_cache == NULL)
11 {
12 nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
13 @@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi
14 }
15 #endif
16
17 - NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t);
18 + NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0);
19 if (nv_pte_t_cache == NULL)
20 {
21 rc = -ENOMEM;
22 @@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi
23 }
24
25 NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t",
26 - nvidia_p2p_page_t);
27 + nvidia_p2p_page_t, 0);
28 if (nvidia_p2p_page_t_cache == NULL)
29 {
30 rc = -ENOMEM;
31 diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h
32 --- kernel.orig/nv-linux.h 2011-09-24 02:32:09.000000000 +0200
33 +++ kernel/nv-linux.h 2011-10-05 19:14:42.522238996 +0200
34 @@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock;
35
36 #if defined(NV_KMEM_CACHE_CREATE_PRESENT)
37 #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6)
38 -#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
39 +#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
40 { \
41 kmem_cache = kmem_cache_create(name, sizeof(type), \
42 - 0, 0, NULL, NULL); \
43 + 0, flags, NULL, NULL); \
44 }
45 #elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
46 -#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
47 +#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
48 { \
49 kmem_cache = kmem_cache_create(name, sizeof(type), \
50 - 0, 0, NULL); \
51 + 0, flags, NULL); \
52 }
53 #else
54 #error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"

  ViewVC Help
Powered by ViewVC 1.1.20