Skip to content

Commit dee2003

Browse files
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: [email protected] Signed-off-by: Richard Weinberger <[email protected]>
1 parent 3179ce7 commit dee2003

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/um/kernel/skas/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void uml_setup_stubs(struct mm_struct *mm)
123123
/* dup_mmap already holds mmap_sem */
124124
err = install_special_mapping(mm, STUB_START, STUB_END - STUB_START,
125125
VM_READ | VM_MAYREAD | VM_EXEC |
126-
VM_MAYEXEC | VM_DONTCOPY,
126+
VM_MAYEXEC | VM_DONTCOPY | VM_PFNMAP,
127127
mm->context.stub_pages);
128128
if (err) {
129129
printk(KERN_ERR "install_special_mapping returned %d\n", err);

0 commit comments

Comments
 (0)