aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-05-12 17:26:03 -0400
committerRichard Weinberger <richard@nod.at>2013-07-19 04:45:17 -0400
commitdee20035b42d569984d2c16041b51e4d75e233b5 (patch)
tree0364591da4cc991dff5f49feee8fff710a2ab458
parent3179ce7254ffa43f3ba4409f31a954ecc4a8d408 (diff)
um: Mark stub pages mapping with VM_PFNMAP
Ensure that a process cannot destroy his stub pages with using MADV_DONTNEED and friends. Reported-by: toralf.foerster@gmx.de Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/kernel/skas/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index ff03067a3b14..007d5503f49b 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -123,7 +123,7 @@ void uml_setup_stubs(struct mm_struct *mm)
123 /* dup_mmap already holds mmap_sem */ 123 /* dup_mmap already holds mmap_sem */
124 err = install_special_mapping(mm, STUB_START, STUB_END - STUB_START, 124 err = install_special_mapping(mm, STUB_START, STUB_END - STUB_START,
125 VM_READ | VM_MAYREAD | VM_EXEC | 125 VM_READ | VM_MAYREAD | VM_EXEC |
126 VM_MAYEXEC | VM_DONTCOPY, 126 VM_MAYEXEC | VM_DONTCOPY | VM_PFNMAP,
127 mm->context.stub_pages); 127 mm->context.stub_pages);
128 if (err) { 128 if (err) {
129 printk(KERN_ERR "install_special_mapping returned %d\n", err); 129 printk(KERN_ERR "install_special_mapping returned %d\n", err);