| /tools/testing/selftests/mm/ |
| A D | protection_keys.c | 223 pkey, flags); in pkey_disable_set() 229 pkey, pkey, pkey_rights); in pkey_disable_set() 246 pkey, pkey, pkey_rights); in pkey_disable_set() 251 pkey, flags); in pkey_disable_set() 263 pkey, pkey, pkey_rights); in pkey_disable_clear() 274 pkey, pkey, pkey_rights); in pkey_disable_clear() 969 u16 pkey) in test_read_of_access_disabled_region_with_page_already_mapped() argument 974 pkey, ptr); in test_read_of_access_disabled_region_with_page_already_mapped() 986 u16 pkey) in test_write_of_write_disabled_region_with_page_already_mapped() argument 1012 u16 pkey) in test_write_of_access_disabled_region_with_page_already_mapped() argument [all …]
|
| A D | pkey-arm64.h | 74 static inline u32 pkey_bit_position(int pkey) in pkey_bit_position() argument 76 return pkey * PKEY_BITS_PER_PKEY; in pkey_bit_position() 84 static inline void expect_fault_on_read_execonly_key(void *p1, int pkey) in expect_fault_on_read_execonly_key() argument 88 static inline void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey) in malloc_pkey_with_mprotect_subpage() argument 94 static inline u64 set_pkey_bits(u64 reg, int pkey, u64 flags) in set_pkey_bits() argument 96 u32 shift = pkey_bit_position(pkey); in set_pkey_bits() 114 static inline u64 get_pkey_bits(u64 reg, int pkey) in get_pkey_bits() argument 116 u32 shift = pkey_bit_position(pkey); in get_pkey_bits() 130 static inline void aarch64_write_signal_pkey(ucontext_t *uctxt, u64 pkey) in aarch64_write_signal_pkey() argument 137 poe_ctx->por_el0 = pkey; in aarch64_write_signal_pkey()
|
| A D | pkey_util.c | 16 int sys_pkey_free(unsigned long pkey) in sys_pkey_free() argument 18 int ret = syscall(SYS_pkey_free, pkey); in sys_pkey_free() 19 dprintf1("%s(pkey=%ld) syscall ret: %d\n", __func__, pkey, ret); in sys_pkey_free() 24 unsigned long pkey) in sys_mprotect_pkey() argument 29 ptr, size, orig_prot, pkey); in sys_mprotect_pkey() 32 sret = syscall(__NR_pkey_mprotect, ptr, size, orig_prot, pkey); in sys_mprotect_pkey()
|
| A D | pkey-powerpc.h | 39 static inline u32 pkey_bit_position(int pkey) in pkey_bit_position() argument 41 return (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY; in pkey_bit_position() 96 static inline void expect_fault_on_read_execonly_key(void *p1, int pkey) in expect_fault_on_read_execonly_key() argument 120 static inline void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey) in malloc_pkey_with_mprotect_subpage() argument 126 size, prot, pkey); in malloc_pkey_with_mprotect_subpage() 127 pkey_assert(pkey < NR_PKEYS); in malloc_pkey_with_mprotect_subpage() 137 ret = mprotect_pkey((void *)ptr, PAGE_SIZE, prot, pkey); in malloc_pkey_with_mprotect_subpage() 141 dprintf1("%s() for pkey %d @ %p\n", __func__, pkey, ptr); in malloc_pkey_with_mprotect_subpage()
|
| A D | pkey-helpers.h | 92 int sys_pkey_free(unsigned long pkey); 94 unsigned long pkey); 98 void expected_pkey_fault(int pkey); 100 unsigned long pkey); 125 static inline u64 set_pkey_bits(u64 reg, int pkey, u64 flags) in set_pkey_bits() argument 127 u32 shift = pkey_bit_position(pkey); in set_pkey_bits() 137 static inline u64 get_pkey_bits(u64 reg, int pkey) in get_pkey_bits() argument 139 u32 shift = pkey_bit_position(pkey); in get_pkey_bits()
|
| A D | pkey-x86.h | 107 static inline u32 pkey_bit_position(int pkey) in pkey_bit_position() argument 109 return pkey * PKEY_BITS_PER_PKEY; in pkey_bit_position() 151 static inline void expect_fault_on_read_execonly_key(void *p1, int pkey) in expect_fault_on_read_execonly_key() argument 157 expected_pkey_fault(pkey); in expect_fault_on_read_execonly_key() 160 static inline void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey) in malloc_pkey_with_mprotect_subpage() argument
|
| A D | pkey_sighandler_tests.c | 287 int pkey; in test_sigsegv_handler_with_different_pkey_for_stack() local 314 pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED); in test_sigsegv_handler_with_different_pkey_for_stack() 315 sys_mprotect_pkey(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey); in test_sigsegv_handler_with_different_pkey_for_stack() 443 int pkey; in test_pkru_sigreturn() local 487 pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED); in test_pkru_sigreturn() 488 sys_mprotect_pkey(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey); in test_pkru_sigreturn()
|
| A D | mseal_test.c | 75 unsigned long pkey) in sys_mprotect_pkey() argument 146 static unsigned long pkey_bit_position(int pkey) in pkey_bit_position() argument 148 return pkey * PKEY_BITS_PER_PKEY; in pkey_bit_position() 153 unsigned long shift = pkey_bit_position(pkey); in set_pkey_bits() 221 int pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED); in pkey_supported() local 223 if (pkey > 0) in pkey_supported() 1667 int pkey; in test_seal_discard_ro_anon_on_pkey() local 1674 pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED); in test_seal_discard_ro_anon_on_pkey() 1675 FAIL_TEST_IF_FALSE(pkey > 0); in test_seal_discard_ro_anon_on_pkey() 1686 set_pkey(pkey, PKEY_UNRESTRICTED); in test_seal_discard_ro_anon_on_pkey() [all …]
|
| A D | run_vmtests.sh | 60 - pkey
|
| /tools/testing/selftests/powerpc/include/ |
| A D | pkeys.h | 51 #define pkeyshift(pkey) (PKEY_REG_BITS - ((pkey + 1) * AMR_BITS_PER_PKEY)) argument 63 void pkey_set_rights(int pkey, unsigned long rights) in pkey_set_rights() argument 67 shift = (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY; in pkey_set_rights() 74 int sys_pkey_mprotect(void *addr, size_t len, int prot, int pkey) in sys_pkey_mprotect() argument 76 return syscall(__NR_pkey_mprotect, addr, len, prot, pkey); in sys_pkey_mprotect() 84 int sys_pkey_free(int pkey) in sys_pkey_free() argument 86 return syscall(__NR_pkey_free, pkey); in sys_pkey_free() 92 int pkey; in pkeys_unsupported() local 99 pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED); in pkeys_unsupported() 100 SKIP_IF(pkey < 0); in pkeys_unsupported() [all …]
|
| /tools/testing/selftests/powerpc/mm/ |
| A D | pkey_exec_prot.c | 106 int pkey, ret, i; in test() local 155 pkey = sys_pkey_alloc(0, rights); in test() 156 FAIL_IF(pkey < 0); in test() 205 fault_pkey = pkey; in test() 217 pkey_set_rights(pkey, rights); in test() 234 pkey_set_rights(pkey, rights); in test() 241 sys_pkey_free(pkey); in test() 249 pkey = sys_pkey_alloc(0, rights); in test() 250 FAIL_IF(pkey < 0); in test() 262 fault_pkey = pkey; in test() [all …]
|
| A D | pkey_siginfo.c | 39 int pkey; in segv_handler() local 41 pkey = siginfo_pkey(sinfo); in segv_handler() 56 if (pkey != rest_pkey) { in segv_handler() 86 pkey_set_rights(pkey, PKEY_UNRESTRICTED); in segv_handler()
|
| /tools/testing/selftests/powerpc/ptrace/ |
| A D | Makefile | 12 TESTS_64 += core-pkey 16 TESTS_64 += ptrace-pkey 41 $(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
|
| A D | .gitignore | 14 core-pkey 15 ptrace-pkey
|
| /tools/perf/util/ |
| A D | expr.c | 85 zfree(&cur->pkey); in ids__free() 235 if (expr__get_id(haystack, cur->pkey, &data)) in expr__subset_of_ids() 313 zfree(&cur->pkey); in expr__ctx_clear() 329 zfree(&cur->pkey); in expr__ctx_free()
|
| A D | hashmap.h | 63 const void *pkey; member
|
| A D | metricgroup.c | 562 const char *sep, *rsep, *id = cur->pkey; in metricgroup__build_event_string() 755 if (pmu_metrics_table__find_metric(table, pmu, cur->pkey, in resolve_metric() 764 pending[pending_cnt].key = cur->pkey; in resolve_metric() 1219 dup = strdup(cur->pkey); in build_combined_expr_ctx()
|
| A D | evsel.c | 3917 zfree(&cur->pkey); in evsel__zero_per_pkg()
|
| /tools/lib/bpf/ |
| A D | hashmap.h | 63 const void *pkey; member
|
| A D | btf_dump.c | 234 free((void *)cur->pkey); in btf_dump_free_names()
|
| /tools/perf/tests/ |
| A D | pmu-events.c | 980 expr__add_id_val(ctx, strdup(cur->pkey), i++); in metric_parse_fake() 983 if (check_parse_fake(cur->pkey)) { in metric_parse_fake() 997 expr__add_id_val(ctx, strdup(cur->pkey), i--); in metric_parse_fake()
|
| /tools/perf/ |
| A D | builtin-ftrace.c | 1343 return strcmp(e1->pkey, e2->pkey); in cmp_profile_data() 1398 const char *name = profile[i]->pkey; in print_profile_result() 1409 free((char *)entry->pkey); in print_profile_result()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | hashmap.c | 322 key = cur->pkey; in test_hashmap_ptr_iface()
|