Lines Matching refs:newflags
590 unsigned long start, unsigned long end, unsigned long newflags) in mprotect_fixup() argument
600 if (newflags == oldflags) { in mprotect_fixup()
612 (newflags & VM_ACCESS_FLAGS) == 0) { in mprotect_fixup()
613 pgprot_t new_pgprot = vm_get_page_prot(newflags); in mprotect_fixup()
627 if (newflags & VM_WRITE) { in mprotect_fixup()
629 if (!may_expand_vm(mm, newflags, nrpages) && in mprotect_fixup()
637 newflags |= VM_ACCOUNT; in mprotect_fixup()
645 *pprev = vma_merge(vmi, mm, *pprev, start, end, newflags, in mprotect_fixup()
650 VM_WARN_ON((vma->vm_flags ^ newflags) & ~VM_SOFTDIRTY); in mprotect_fixup()
673 vm_flags_reset(vma, newflags); in mprotect_fixup()
685 (newflags & VM_WRITE)) { in mprotect_fixup()
690 vm_stat_account(mm, newflags, nrpages); in mprotect_fixup()
777 unsigned long newflags; in do_mprotect_pkey() local
797 newflags = calc_vm_prot_bits(prot, new_vma_pkey); in do_mprotect_pkey()
798 newflags |= (vma->vm_flags & ~mask_off_old_flags); in do_mprotect_pkey()
801 if ((newflags & ~(newflags >> 4)) & VM_ACCESS_FLAGS) { in do_mprotect_pkey()
806 if (map_deny_write_exec(vma, newflags)) { in do_mprotect_pkey()
812 if (!arch_validate_flags(newflags)) { in do_mprotect_pkey()
826 error = vma->vm_ops->mprotect(vma, nstart, tmp, newflags); in do_mprotect_pkey()
831 error = mprotect_fixup(&vmi, &tlb, vma, &prev, nstart, tmp, newflags); in do_mprotect_pkey()