Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/nvidia-drivers/files: nvidia-drivers-346.16-pax-usercopy.patch nvidia-drivers-346.16-pax-constify.patch
Date: Mon, 01 Dec 2014 12:47:49
Message-Id: 20141201124746.10560B496@oystercatcher.gentoo.org
1 jer 14/12/01 12:47:46
2
3 Added: nvidia-drivers-346.16-pax-usercopy.patch
4 nvidia-drivers-346.16-pax-constify.patch
5 Log:
6 Add new PaX patches (bug #529633).
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key A792A613)
9
10 Revision Changes Path
11 1.1 x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-usercopy.patch?rev=1.1&content-type=text/plain
15
16 Index: nvidia-drivers-346.16-pax-usercopy.patch
17 ===================================================================
18 --- a/kernel/nv.c
19 +++ b/kernel/nv.c
20 @@ -705,7 +705,7 @@ int __init nvidia_init_module(void)
21 #endif
22
23 nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name,
24 - nvidia_stack_t);
25 + nvidia_stack_t, SLAB_USERCOPY);
26 if (nvidia_stack_t_cache == NULL)
27 {
28 nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
29 @@ -846,7 +846,7 @@ int __init nvidia_init_module(void)
30 nv_lock_init_locks(nv);
31
32 nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name,
33 - nvidia_pte_t);
34 + nvidia_pte_t, 0);
35 if (nvidia_pte_t_cache == NULL)
36 {
37 rc = -ENOMEM;
38 @@ -857,7 +857,7 @@ int __init nvidia_init_module(void)
39 if (!nv_multiple_kernel_modules)
40 {
41 nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name,
42 - nvidia_p2p_page_t);
43 + nvidia_p2p_page_t, 0);
44 if (nvidia_p2p_page_t_cache == NULL)
45 {
46 rc = -ENOMEM;
47 --- a/kernel/nv-linux.h
48 +++ b/kernel/nv-linux.h
49 @@ -1431,11 +1431,11 @@ extern void *nvidia_stack_t_cache;
50
51 #if !defined(NV_VMWARE)
52 #if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
53 -#define NV_KMEM_CACHE_CREATE(name, type) \
54 - kmem_cache_create(name, sizeof(type), 0, 0, NULL)
55 +#define NV_KMEM_CACHE_CREATE(name, type, flags) \
56 + kmem_cache_create(name, sizeof(type), 0, flags, NULL)
57 #else
58 -#define NV_KMEM_CACHE_CREATE(name, type) \
59 - kmem_cache_create(name, sizeof(type), 0, 0, NULL, \
60 +#define NV_KMEM_CACHE_CREATE(name, type, flags) \
61 + kmem_cache_create(name, sizeof(type), 0, flags, NULL, \
62 NULL)
63 #endif
64 #define NV_KMEM_CACHE_DESTROY(kmem_cache) \
65
66
67
68 1.1 x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch
69
70 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-drivers-346.16-pax-constify.patch?rev=1.1&content-type=text/plain
72
73 Index: nvidia-drivers-346.16-pax-constify.patch
74 ===================================================================
75 --- a/kernel/uvm/uvm_common.c
76 +++ b/kernel/uvm/uvm_common.c
77 @@ -95,7 +95,6 @@ static RM_STATUS uvmnext_gpu_event_stop_
78 #endif // NVIDIA_UVM_NEXT_ENABLED
79
80 static dev_t g_uvmBaseDev;
81 -struct UvmOpsUvmEvents g_exportedUvmOps;
82
83 // TODO: This would be easier if RM allowed for multiple registrations, since we
84 // could register UVM-Lite and UVM-Next separately (bug 1372835).
85 @@ -147,9 +146,11 @@ static RM_STATUS uvmSetupGpuProvider(voi
86 RM_STATUS status = RM_OK;
87
88 #ifdef NVIDIA_UVM_RM_ENABLED
89 - g_exportedUvmOps.startDevice = uvm_gpu_event_start_device;
90 - g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device;
91 - g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half;
92 + static struct UvmOpsUvmEvents g_exportedUvmOps = {
93 + .startDevice = uvm_gpu_event_start_device,
94 + .stopDevice = uvm_gpu_event_stop_device,
95 + .isrTopHalf = uvmnext_isr_top_half,
96 + };
97
98 // call RM to exchange the function pointers.
99 status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps);