mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									3179ce7254
								
							
						
					
					
						commit
						dee20035b4
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -123,7 +123,7 @@ void uml_setup_stubs(struct mm_struct *mm)
 | 
			
		|||
	/* dup_mmap already holds mmap_sem */
 | 
			
		||||
	err = install_special_mapping(mm, STUB_START, STUB_END - STUB_START,
 | 
			
		||||
				      VM_READ | VM_MAYREAD | VM_EXEC |
 | 
			
		||||
				      VM_MAYEXEC | VM_DONTCOPY,
 | 
			
		||||
				      VM_MAYEXEC | VM_DONTCOPY | VM_PFNMAP,
 | 
			
		||||
				      mm->context.stub_pages);
 | 
			
		||||
	if (err) {
 | 
			
		||||
		printk(KERN_ERR "install_special_mapping returned %d\n", err);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue