| /tools/testing/selftests/bpf/progs/ |
| A D | test_global_func_ctx_args.c | 11 static long stack[256]; variable 19 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in kprobe_typedef_ctx_subprog() 50 return bpf_get_stack((void *)ctx, &stack, sizeof(stack), 0); in kprobe_struct_ctx_subprog() 67 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in kprobe_workaround_ctx_subprog() 83 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in raw_tp_ctx_subprog() 99 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in raw_tp_writable_ctx_subprog() 115 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in perf_event_ctx_subprog() 130 return bpf_get_stack(ctx, stack, sizeof(stack), 0); in subprog_ctx_tag() 142 return bpf_get_stack(ctx1, stack, sizeof(stack), 0) + in subprog_multi_ctx_tags() 144 bpf_get_stack(ctx2, stack, sizeof(stack), 0); in subprog_multi_ctx_tags()
|
| A D | test_get_stack_rawtp_err.c | 11 __u64 stack[MAX_STACK_RAWTP]; in bpf_prog2() local 15 error = bpf_get_stack(ctx, stack, 0, -1); in bpf_prog2()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | build_id.c | 16 switch (stack[i].status) { in print_stack() 23 printf("%02hhx", (unsigned)stack[i].build_id[j]); in print_stack() 24 printf(" OFFSET = %llx", (unsigned long long)stack[i].offset); in print_stack() 27 printf("IP = %llx", (unsigned long long)stack[i].ip); in print_stack() 30 printf("UNEXPECTED STATUS %d ", stack[i].status); in print_stack() 40 struct bpf_stack_build_id *stack; in subtest_nofault() local 59 stack = skel->bss->stack_nofault; in subtest_nofault() 62 print_stack(stack, frame_cnt); in subtest_nofault() 78 struct bpf_stack_build_id *stack; in subtest_sleepable() local 95 stack = skel->bss->stack_sleepable; in subtest_sleepable() [all …]
|
| A D | task_kfunc.c | 117 char *stack; in run_vpid_success_test() local 119 stack = (char *)malloc(stack_size); in run_vpid_success_test() 120 if (!ASSERT_OK_PTR(stack, "clone_stack")) in run_vpid_success_test() 123 child_pid = clone(run_vpid_test, stack + stack_size, in run_vpid_success_test() 136 free(stack); in run_vpid_success_test()
|
| /tools/testing/selftests/arm64/gcs/ |
| A D | libc-gcs.c | 303 unsigned long *stack; in FIXTURE() local 446 if (self->stack != MAP_FAILED) { in FIXTURE_TEARDOWN() 455 unsigned long *stack = self->stack; in TEST_F() local 473 ASSERT_EQ(stack[cap_index], GCS_CAP(&stack[cap_index])); in TEST_F() 479 unsigned long *stack = self->stack; in TEST_F() local 487 ASSERT_EQ(stack[term_index], 0); in TEST_F() 493 self->stack[0] = 0; in TEST_F_SIGNAL() 633 void *stack; in TEST_F() local 638 if (stack != MAP_FAILED) in TEST_F() 644 unsigned long *stack; in FIXTURE() local [all …]
|
| /tools/perf/scripts/python/ |
| A D | stackcollapse.py | 97 stack = list() 103 stack.append(tidy_function_name(entry['sym']['name'], 108 stack.append(tidy_function_name(param_dict['symbol'], 119 stack.append(comm) 121 stack_string = ';'.join(reversed(stack)) 126 for stack in list: 127 print("%s %d" % (stack, lines[stack]))
|
| A D | gecko.py | 177 def _add_sample(self, comm: str, stack: List[str], time_ms: Milliseconds) -> None: 190 (self._intern_frame(frame), prefix_id), stack, None) 275 stack = [] 280 stack.append(f'{call["sym"]["name"]} (in {call["dso"]})') 281 if len(stack) != 0: 283 stack = stack[::-1] 290 stack.append(f'{func} (in {dso})') 297 thread._add_sample(comm=comm, stack=stack, time_ms=time_stamp)
|
| /tools/testing/selftests/proc/ |
| A D | thread-self.c | 51 void *stack; in main() local 56 stack = mmap(NULL, 2 * PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); in main() 57 assert(stack != MAP_FAILED); in main() 59 pid = clone(f, stack + PAGE_SIZE, CLONE_THREAD|CLONE_SIGHAND|CLONE_VM, (void *)1); in main()
|
| /tools/testing/selftests/mm/ |
| A D | pkey_sighandler_tests.c | 84 long a2 = (long)stack; in clone_raw() 179 stack_t *stack = ptr; in thread_segv_maperr_ptr() local 286 void *stack; in test_sigsegv_handler_with_different_pkey_for_stack() local 302 stack = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE, in test_sigsegv_handler_with_different_pkey_for_stack() 305 assert(stack != MAP_FAILED); in test_sigsegv_handler_with_different_pkey_for_stack() 330 stack + STACK_SIZE, in test_sigsegv_handler_with_different_pkey_for_stack() 405 stack_t *stack = ptr; in thread_sigusr2_self() local 442 void *stack; in test_pkru_sigreturn() local 470 stack = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE, in test_pkru_sigreturn() 473 assert(stack != MAP_FAILED); in test_pkru_sigreturn() [all …]
|
| /tools/perf/util/ |
| A D | arm64-frame-pointer-unwind-support.c | 14 u64 stack[2]; member 33 entries->stack[entries->length++] = entry->ip; in add_entry() 69 return callchain_param.order == ORDER_CALLER ? entries.stack[0] : entries.stack[1]; in get_leaf_frame_caller_aarch64()
|
| A D | annotate-data.c | 185 free(stack); in exit_type_state() 566 return stack; in find_stack_state() 568 if (stack->compound && stack->offset < offset && in find_stack_state() 569 offset < stack->offset + stack->size) in find_stack_state() 570 return stack; in find_stack_state() 608 if (stack) { in findnew_stack_state() 610 return stack; in findnew_stack_state() 613 stack = malloc(sizeof(*stack)); in findnew_stack_state() 614 if (stack) { in findnew_stack_state() 618 return stack; in findnew_stack_state() [all …]
|
| A D | thread-stack.c | 89 struct thread_stack_entry *stack; member 130 ts->stack = new_stack; in thread_stack__grow() 201 if (!ts->stack && in thread_stack__new() 220 if (!ts->stack) in thread__cpu_stack() 283 if (ts->stack[--i].trace_end) in thread_stack__pop_trace_end() 311 tse = &ts->stack[idx]; in thread_stack__call_return() 490 zfree(&ts->stack); in __thread_stack__free() 798 tse = &ts->stack[ts->cnt++]; in thread_stack__push_cp() 840 ts->stack[i].non_call) in thread_stack__pop_cp() 1008 tse = &ts->stack[ts->cnt - 1]; in thread_stack__trace_begin() [all …]
|
| /tools/perf/arch/arm/tests/ |
| A D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 40 stack->data = (char *) buf; in sample_ustack() 41 stack->size = stack_size; in sample_ustack()
|
| /tools/perf/arch/arm64/tests/ |
| A D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 40 stack->data = (char *) buf; in sample_ustack() 41 stack->size = stack_size; in sample_ustack()
|
| /tools/perf/arch/powerpc/tests/ |
| A D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 40 stack->data = (char *) buf; in sample_ustack() 41 stack->size = stack_size; in sample_ustack()
|
| /tools/perf/arch/x86/tests/ |
| A D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 48 stack->data = (char *) buf; in sample_ustack() 49 stack->size = stack_size; in sample_ustack()
|
| /tools/testing/selftests/kvm/lib/ |
| A D | assert.c | 28 void *stack[n]; in test_dump_stack() local 38 n = backtrace(stack, n); in test_dump_stack() 52 c += sprintf(c, " %lx", ((unsigned long) stack[i]) - 1); in test_dump_stack()
|
| /tools/testing/selftests/arm64/abi/ |
| A D | tpidr2.c | 147 void *stack; in write_clone_read() local 152 stack = malloc(__STACK_SIZE); in write_clone_read() 153 if (!stack) { in write_clone_read() 158 ret = sys_clone(CLONE_VM, (unsigned long)stack + __STACK_SIZE, in write_clone_read()
|
| /tools/testing/selftests/pid_namespace/ |
| A D | pid_max.c | 22 char *stack; in do_clone() local 25 stack = malloc(__STACK_SIZE); in do_clone() 26 if (!stack) in do_clone() 30 ret = __clone2(fn, stack, __STACK_SIZE, flags | SIGCHLD, arg); in do_clone() 32 ret = clone(fn, stack + __STACK_SIZE, flags | SIGCHLD, arg); in do_clone() 34 free(stack); in do_clone()
|
| /tools/testing/selftests/pidfd/ |
| A D | pidfd_fdinfo_test.c | 88 char *stack; member 102 ret.stack = mmap(NULL, CHILD_STACK_SIZE, PROT_READ | PROT_WRITE, in clone_newns() 104 if (ret.stack == MAP_FAILED) { in clone_newns() 110 ret.pid = __clone2(fn, ret.stack, CHILD_STACK_SIZE, flags, args, &ret.fd); in clone_newns() 112 ret.pid = clone(fn, ret.stack + CHILD_STACK_SIZE, flags, args, &ret.fd); in clone_newns() 142 if (munmap(child->stack, CHILD_STACK_SIZE)) { in child_join()
|
| /tools/testing/selftests/x86/ |
| A D | syscall_arg_fault.c | 90 stack_t stack = { in main() local 95 if (sigaltstack(&stack, NULL) != 0) in main() 221 free(stack.ss_sp); in main()
|
| /tools/objtool/Documentation/ |
| A D | objtool.txt | 19 stack traces are reliable for live patching 123 Here are some of the benefits of validating stack metadata: 125 a) More reliable stack traces for frame pointer enabled kernels 143 For stack traces based on frame pointers to be reliable, all 147 of the first function will be skipped on the stack trace. 177 skipped. Instead the stack trace seems to show that 182 skipped on a stack trace. 217 callable function in order to analyze its stack metadata. 295 Otherwise the stack frame may not get created before the call. 371 7. file: warning: objtool: func()+0x5c: stack state mismatch [all …]
|
| /tools/testing/selftests/coredump/ |
| A D | README.rst | 14 The piped user program may be interested in reading the stack pointers of the crashed process. The 15 crashed process's stack pointers can be read from `procfs`: it is the `kstkesp` field in 20 While a thread is active, the stack pointer is unsafe to read and therefore the `kstkesp` field 45 reads the stack pointers of all threads of crashed processes. 49 #. Read the output from the "stackdump" script, and make sure all stack pointer values are
|
| /tools/testing/selftests/move_mount_set_group/ |
| A D | move_mount_set_group_test.c | 270 void *stack; in do_clone() local 272 stack = malloc(__STACK_SIZE); in do_clone() 273 if (!stack) in do_clone() 277 return __clone2(fn, stack, __STACK_SIZE, flags | SIGCHLD, arg, NULL); in do_clone() 279 return clone(fn, stack + __STACK_SIZE, flags | SIGCHLD, arg, NULL); in do_clone()
|
| /tools/testing/selftests/memfd/ |
| A D | fuse_test.c | 202 uint8_t *stack; in spawn_sealing_thread() local 205 stack = malloc(STACK_SIZE); in spawn_sealing_thread() 206 if (!stack) { in spawn_sealing_thread() 212 stack + STACK_SIZE, in spawn_sealing_thread()
|