From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EFD9F138010 for ; Wed, 29 Aug 2012 03:42:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B46F2E0566; Wed, 29 Aug 2012 03:41:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 770C2E0566 for ; Wed, 29 Aug 2012 03:41:53 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5FB2633D8C1 for ; Wed, 29 Aug 2012 03:41:52 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 543) id 1300020AD5; Wed, 29 Aug 2012 03:41:51 +0000 (UTC) From: "Doug Goldstein (cardoe)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, cardoe@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/nvidia-drivers/files: nvidia-drivers-pax-usercopy.patch nvidia-drivers-pax-const.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: nvidia-drivers-pax-usercopy.patch nvidia-drivers-pax-const.patch X-VCS-Directories: x11-drivers/nvidia-drivers/files X-VCS-Committer: cardoe X-VCS-Committer-Name: Doug Goldstein Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20120829034151.1300020AD5@flycatcher.gentoo.org> Date: Wed, 29 Aug 2012 03:41:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: efffefdc-3596-4001-8e38-f9371d1fddb4 X-Archives-Hash: b593aef8abb7b0e6826e4176b2a10102 cardoe 12/08/29 03:41:51 Added: nvidia-drivers-pax-usercopy.patch nvidia-drivers-pax-const.patch Log: Use Stefan Reimer 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,