Lines Matching defs:key
5 #include "src/wasm/memory-protection-key.h"
124 // If there is support in glibc, try to allocate a new key.
126 // PKU or because there is no more key available.
136 void FreeMemoryProtectionKey(int key) {
138 // Only free the key if one was allocated.
139 if (key == kNoMemoryProtectionKey) return;
142 // the key must be {kNoMemoryProtectionKey}.
144 CHECK_EQ(/* success */ 0, pkey_free(key));
166 PageAllocator::Permission page_permissions, int key) {
183 int ret = pkey_mprotect(address, size, protection, key);
194 // If there is no runtime support for {pkey_mprotect()}, no key should have
196 DCHECK_EQ(kNoMemoryProtectionKey, key);
204 int key, MemoryProtectionKeyPermission permissions) {
206 DCHECK_NE(kNoMemoryProtectionKey, key);
208 // If a valid key was allocated, {pkey_set()} must also be available.
211 CHECK_EQ(0 /* success */, pkey_set(key, permissions));
215 MemoryProtectionKeyPermission GetMemoryProtectionKeyPermission(int key) {
217 DCHECK_NE(kNoMemoryProtectionKey, key);
219 // If a valid key was allocated, {pkey_get()} must also be available.
222 int permission = pkey_get(key);