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