Lines Matching refs:pkey
39 int pkey_free(int pkey);
41 unsigned long prot, int pkey);
43 Before a pkey can be used, it must first be allocated with
51 pkey = pkey_alloc(0, PKEY_DISABLE_WRITE);
53 ret = pkey_mprotect(ptr, PAGE_SIZE, real_prot, pkey);
59 pkey_set(pkey, 0); // clear PKEY_DISABLE_WRITE
61 pkey_set(pkey, PKEY_DISABLE_WRITE); // set PKEY_DISABLE_WRITE again
63 Now when it frees the memory, it will also free the pkey since it
67 pkey_free(pkey);
84 pkey = pkey_alloc(0, PKEY_DISABLE_WRITE | PKEY_DISABLE_READ);
85 pkey_mprotect(ptr, size, PROT_READ|PROT_WRITE, pkey);