SOURCES: NVIDIA_kernel-1.0-7174-1321905.diff (NEW) - patch that wo...
hawk
hawk at pld-linux.org
Fri Mar 3 18:19:25 CET 2006
Author: hawk Date: Fri Mar 3 17:19:25 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- patch that works around a bug in some Linux kernels' implementation of
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
---- Files affected:
SOURCES:
NVIDIA_kernel-1.0-7174-1321905.diff (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/NVIDIA_kernel-1.0-7174-1321905.diff
diff -u /dev/null SOURCES/NVIDIA_kernel-1.0-7174-1321905.diff:1.1
--- /dev/null Fri Mar 3 18:19:25 2006
+++ SOURCES/NVIDIA_kernel-1.0-7174-1321905.diff Fri Mar 3 18:19:20 2006
@@ -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;
================================================================
More information about the pld-cvs-commit
mailing list