execute_only_pkey
s16 execute_only_pkey; /* key holding execute-only protection */
extern int execute_only_pkey(struct mm_struct *mm);
mm->context.execute_only_pkey = execute_only_key;
return mm->context.execute_only_pkey;
return (vma_pkey(vma) == vma->vm_mm->context.execute_only_pkey);
pkey = execute_only_pkey(vma->vm_mm);
mm->context.execute_only_pkey = oldmm->context.execute_only_pkey;
s16 execute_only_pkey;
mm->context.execute_only_pkey = -1;
mm->context.execute_only_pkey = oldmm->context.execute_only_pkey;
if (pkey == mm->context.execute_only_pkey)
int execute_only_pkey = mm->context.execute_only_pkey;
if (execute_only_pkey == -1) {
execute_only_pkey = mm_pkey_alloc(mm);
if (execute_only_pkey < 0)
!__pkru_allows_read(read_pkru(), execute_only_pkey)) {
return execute_only_pkey;
ret = arch_set_user_pkey_access(current, execute_only_pkey,
mm_set_pkey_free(mm, execute_only_pkey);
mm->context.execute_only_pkey = execute_only_pkey;
return execute_only_pkey;
if (vma_pkey(vma) != vma->vm_mm->context.execute_only_pkey)
pkey = execute_only_pkey(vma->vm_mm);
pkey = execute_only_pkey(mm);