Lines Matching refs:newflags
577 unsigned long start, unsigned long end, unsigned long newflags) in mprotect_fixup() argument
587 if (newflags == oldflags) { in mprotect_fixup()
599 (newflags & VM_ACCESS_FLAGS) == 0) { in mprotect_fixup()
600 pgprot_t new_pgprot = vm_get_page_prot(newflags); in mprotect_fixup()
614 if (newflags & VM_WRITE) { in mprotect_fixup()
616 if (!may_expand_vm(mm, newflags, nrpages) && in mprotect_fixup()
624 newflags |= VM_ACCOUNT; in mprotect_fixup()
632 *pprev = vma_merge(vmi, mm, *pprev, start, end, newflags, in mprotect_fixup()
637 VM_WARN_ON((vma->vm_flags ^ newflags) & ~VM_SOFTDIRTY); in mprotect_fixup()
661 vm_flags_reset(vma, newflags); in mprotect_fixup()
673 (newflags & VM_WRITE)) { in mprotect_fixup()
678 vm_stat_account(mm, newflags, nrpages); in mprotect_fixup()
765 unsigned long newflags; in do_mprotect_pkey() local
785 newflags = calc_vm_prot_bits(prot, new_vma_pkey); in do_mprotect_pkey()
786 newflags |= (vma->vm_flags & ~mask_off_old_flags); in do_mprotect_pkey()
789 if ((newflags & ~(newflags >> 4)) & VM_ACCESS_FLAGS) { in do_mprotect_pkey()
794 if (map_deny_write_exec(vma, newflags)) { in do_mprotect_pkey()
800 if (!arch_validate_flags(newflags)) { in do_mprotect_pkey()
814 error = vma->vm_ops->mprotect(vma, nstart, tmp, newflags); in do_mprotect_pkey()
819 error = mprotect_fixup(&vmi, &tlb, vma, &prev, nstart, tmp, newflags); in do_mprotect_pkey()