]> git.pld-linux.org Git - packages/X11-driver-nvidia-legacy.git/commitdiff
- patch that works around a bug in some Linux kernels' implementation of
authorhawk <hawk@pld-linux.org>
Fri, 3 Mar 2006 17:19:20 +0000 (17:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  the change_page_attr() interface function with respect to the handling of
  large pages and the no-execute page protection feature. This bug can lead
  to system reboots

Changed files:
    NVIDIA_kernel-1.0-7174-1321905.diff -> 1.1

NVIDIA_kernel-1.0-7174-1321905.diff [new file with mode: 0644]

diff --git a/NVIDIA_kernel-1.0-7174-1321905.diff b/NVIDIA_kernel-1.0-7174-1321905.diff
new file mode 100644 (file)
index 0000000..67a1c0a
--- /dev/null
@@ -0,0 +1,24 @@
+diff -ru usr/src/nv/nv-vm.c usr/src/nv.1321905/nv-vm.c
+--- usr/src/nv/nv-vm.c 2005-03-22 16:19:09.000000000 +0100
++++ usr/src/nv.1321905/nv-vm.c 2005-10-23 15:43:12.860170440 +0200
+@@ -248,6 +248,20 @@
+         /* lock the page for dma purposes */
+         SetPageReserved(NV_GET_PAGE_STRUCT(phys_addr));
++#if defined(_PAGE_NX)
++        if ((_PAGE_NX & pgprot_val(PAGE_KERNEL)) != 0 && phys_addr < 0x400000) {
++            // Until a bug in change_page_attr() is fixed
++            // we avoid pages with physaddr < 0x400000,
++            // since splitting "jumbo" mappings results
++            // in kernel pages being mapped as PAGE_KERNEL, which
++            // may include _PAGE_NX, effectively making much of the
++            // kernel code non-executable.
++            nv_printf(NV_DBG_MEMINFO, "NVRM: nv_vm_malloc discarding page @%08x\n", phys_addr);
++            --i;
++            continue;
++        }
++#endif
++
+         page_ptr = at->page_table[i];
+         page_ptr->phys_addr = phys_addr;
+         page_ptr->virt_addr = virt_addr;
This page took 0.061425 seconds and 4 git commands to generate.