mprotect.c (95d465fd750897ab32462a6702fbfe1b122cbbc0) | mprotect.c (b344e05c585406904c70865e531e02467c4c7931) |
---|---|
1/* 2 * mm/mprotect.c 3 * 4 * (C) Copyright 1994 Linus Torvalds 5 * (C) Copyright 2002 Christoph Hellwig 6 * 7 * Address space accounting code <alan@redhat.com> 8 * (C) Copyright 2002 Red Hat Inc, All Rights Reserved --- 191 unchanged lines hidden (view full) --- 200 return -ENOMEM; 201 if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) 202 return -EINVAL; 203 204 reqprot = prot; 205 /* 206 * Does the application expect PROT_READ to imply PROT_EXEC: 207 */ | 1/* 2 * mm/mprotect.c 3 * 4 * (C) Copyright 1994 Linus Torvalds 5 * (C) Copyright 2002 Christoph Hellwig 6 * 7 * Address space accounting code <alan@redhat.com> 8 * (C) Copyright 2002 Red Hat Inc, All Rights Reserved --- 191 unchanged lines hidden (view full) --- 200 return -ENOMEM; 201 if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) 202 return -EINVAL; 203 204 reqprot = prot; 205 /* 206 * Does the application expect PROT_READ to imply PROT_EXEC: 207 */ |
208 if (unlikely((prot & PROT_READ) && 209 (current->personality & READ_IMPLIES_EXEC))) | 208 if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC)) |
210 prot |= PROT_EXEC; 211 212 vm_flags = calc_vm_prot_bits(prot); 213 214 down_write(¤t->mm->mmap_sem); 215 216 vma = find_vma_prev(current->mm, start, &prev); 217 error = -ENOMEM; --- 63 unchanged lines hidden --- | 209 prot |= PROT_EXEC; 210 211 vm_flags = calc_vm_prot_bits(prot); 212 213 down_write(¤t->mm->mmap_sem); 214 215 vma = find_vma_prev(current->mm, start, &prev); 216 error = -ENOMEM; --- 63 unchanged lines hidden --- |