Lines Matching refs:pkey
56 int pkey_free(int pkey);
58 unsigned long prot, int pkey);
60 Before a pkey can be used, it must first be allocated with pkey_alloc(). An
67 pkey = pkey_alloc(0, PKEY_DISABLE_WRITE);
69 ret = pkey_mprotect(ptr, PAGE_SIZE, real_prot, pkey);
75 pkey_set(pkey, 0); // clear PKEY_DISABLE_WRITE
77 pkey_set(pkey, PKEY_DISABLE_WRITE); // set PKEY_DISABLE_WRITE again
79 Now when it frees the memory, it will also free the pkey since it
83 pkey_free(pkey);
87 tools/testing/selftests/mm/pkey-{arm64,powerpc,x86}.h
100 pkey = pkey_alloc(0, PKEY_DISABLE_WRITE | PKEY_DISABLE_READ);
101 pkey_mprotect(ptr, size, PROT_READ|PROT_WRITE, pkey);