| /linux/lib/ |
| H A D | stackdepot.c | 364 struct stack_record *stack; in depot_pop_free_pool() local 382 stack = current_pool + pool_offset; in depot_pop_free_pool() 385 stack->handle.pool_index_plus_1 = pool_index + 1; in depot_pop_free_pool() 386 stack->handle.offset = pool_offset >> DEPOT_STACK_ALIGN; in depot_pop_free_pool() 387 stack->handle.extra = 0; in depot_pop_free_pool() 388 INIT_LIST_HEAD(&stack->hash_list); in depot_pop_free_pool() 392 return stack; in depot_pop_free_pool() 399 struct stack_record *stack; in depot_pop_free() local 412 stack = list_first_entry(&free_stacks, struct stack_record, free_list); in depot_pop_free() 413 if (!poll_state_synchronize_rcu(stack->rcu_state)) in depot_pop_free() [all …]
|
| /linux/drivers/misc/altera-stapl/ |
| H A D | altera.c | 213 long *stack = astate->stack; in altera_execute() local 528 stack[stack_ptr] = stack[stack_ptr - 1]; in altera_execute() 534 swap(stack[stack_ptr - 2], stack[stack_ptr - 1]); in altera_execute() 539 stack[stack_ptr - 1] += stack[stack_ptr]; in altera_execute() 545 stack[stack_ptr - 1] -= stack[stack_ptr]; in altera_execute() 551 stack[stack_ptr - 1] *= stack[stack_ptr]; in altera_execute() 557 stack[stack_ptr - 1] /= stack[stack_ptr]; in altera_execute() 563 stack[stack_ptr - 1] %= stack[stack_ptr]; in altera_execute() 569 stack[stack_ptr - 1] <<= stack[stack_ptr]; in altera_execute() 575 stack[stack_ptr - 1] >>= stack[stack_ptr]; in altera_execute() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H 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()
|
| H A D | preempt_lock.c | 122 struct bpf_stack_build_id stack; in preempt_sleepable_get_stack() local 125 bpf_get_stack(ctx, &stack, sizeof(stack), in preempt_sleepable_get_stack() 135 struct bpf_stack_build_id stack; in preempt_sleepable_get_task_stack() local 140 bpf_get_task_stack(task, &stack, sizeof(stack), in preempt_sleepable_get_task_stack() 150 struct bpf_stack_build_id stack; in sleepable_get_stack() local 152 bpf_get_stack(ctx, &stack, sizeof(stack), in sleepable_get_stack() 161 struct bpf_stack_build_id stack; in sleepable_get_task_stack() local 165 bpf_get_task_stack(task, &stack, sizeof(stack), in sleepable_get_task_stack()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | build_id.c | 10 static void print_stack(struct bpf_stack_build_id *stack, int frame_cnt) in print_stack() argument 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() 65 ASSERT_EQ(stack[0].status, BPF_STACK_BUILD_ID_VALID, "build_id_status"); in subtest_nofault() [all …]
|
| /linux/tools/testing/selftests/arm64/gcs/ |
| H A D | libc-gcs.c | 304 unsigned long *stack; in FIXTURE() local 435 self->stack = (void *)syscall(__NR_map_shadow_stack, 0, in FIXTURE_SETUP() 438 ASSERT_FALSE(self->stack == MAP_FAILED); in FIXTURE_SETUP() 439 ksft_print_msg("Allocated stack from %p-%p\n", self->stack, in FIXTURE_SETUP() 440 self->stack + variant->stack_size); in FIXTURE_SETUP() 447 if (self->stack != MAP_FAILED) { in FIXTURE_TEARDOWN() 448 ret = munmap(self->stack, variant->stack_size); in FIXTURE_TEARDOWN() 456 unsigned long *stack = self->stack; in TEST_F() local 474 ASSERT_EQ(stack[cap_index], GCS_CAP(&stack[cap_index])); in TEST_F() 480 unsigned long *stack = self->stack; in TEST_F() local [all …]
|
| /linux/Documentation/mm/ |
| H A D | vmalloced-kernel-stacks.rst | 21 Kernel stack overflows are often hard to debug and make the kernel 25 Virtually mapped kernel stacks with guard pages cause kernel stack 31 causes reliable faults when the stack overflows. The usability of 32 the stack trace after overflow and response to the overflow itself 49 needs to work while the stack points to a virtual address with 51 most likely) needs to ensure that the stack's page table entries 52 are populated before running on a possibly unpopulated stack. 53 - If the stack overflows into a guard page, something reasonable 64 with guard pages. This causes kernel stack overflows to be caught 75 VMAP_STACK is enabled, it is not possible to run DMA on stack [all …]
|
| /linux/arch/nios2/kernel/ |
| H A D | traps.c | 60 void show_stack(struct task_struct *task, unsigned long *stack, in show_stack() argument 66 if (!stack) { in show_stack() 68 stack = (unsigned long *)task->thread.ksp; in show_stack() 70 stack = (unsigned long *)&stack; in show_stack() 73 addr = (unsigned long) stack; in show_stack() 76 printk("%sStack from %08lx:", loglvl, (unsigned long)stack); in show_stack() 78 if (stack + 1 > endstack) in show_stack() 82 printk("%s %08lx", loglvl, *stack++); in show_stack() 87 while (stack + 1 <= endstack) { in show_stack() 88 addr = *stack++; in show_stack()
|
| /linux/arch/openrisc/kernel/ |
| H A D | unwinder.c | 60 void unwind_stack(void *data, unsigned long *stack, in unwind_stack() argument 67 while (!kstack_end(stack)) { in unwind_stack() 68 frameinfo = container_of(stack, in unwind_stack() 83 stack++; in unwind_stack() 93 void unwind_stack(void *data, unsigned long *stack, in unwind_stack() argument 98 while (!kstack_end(stack)) { in unwind_stack() 99 addr = *stack++; in unwind_stack()
|
| /linux/Documentation/arch/x86/ |
| H A D | kernel-stacks.rst | 14 Like all other architectures, x86_64 has a kernel stack for every 17 zombie. While the thread is in user space the kernel stack is empty 25 * Interrupt stack. IRQ_STACK_SIZE 29 kernel switches from the current task to the interrupt stack. Like 32 of every per thread stack. 34 The interrupt stack is also used when processing a softirq. 36 Switching to the kernel interrupt stack is done by software based on a 41 to automatically switch to a new stack for designated events such as 46 point to dedicated stacks; each stack can be a different size. 50 loads such a descriptor, the hardware automatically sets the new stack [all …]
|
| /linux/include/linux/sched/ |
| H A D | task_stack.h | 23 return task->stack; in task_stack_page() 31 return (unsigned long *)((unsigned long)task->stack + THREAD_SIZE) - 1; in end_of_stack() 33 return task->stack; in end_of_stack() 39 #define task_stack_page(task) ((void *)(task)->stack) 91 void *stack = task_stack_page(current); in object_is_on_stack() local 94 return (obj >= stack) && (obj < (stack + THREAD_SIZE)); in object_is_on_stack()
|
| /linux/arch/um/kernel/ |
| H A D | sysrq.c | 29 void show_stack(struct task_struct *task, unsigned long *stack, in show_stack() argument 35 if (!stack) in show_stack() 36 stack = get_stack_pointer(task, segv_regs); in show_stack() 40 if (kstack_end(stack)) in show_stack() 44 pr_cont(" %08lx", READ_ONCE_NOCHECK(*stack)); in show_stack() 45 stack++; in show_stack()
|
| /linux/tools/perf/scripts/python/ |
| H 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]))
|
| /linux/kernel/bpf/ |
| H A D | states.c | 425 u8 stype = st->stack[i].slot_type[7]; in __clean_func_state() 445 struct bpf_reg_state *spill = &st->stack[i].spilled_ptr; in __clean_func_state() 457 u8 *t = &st->stack[i].slot_type[j]; in __clean_func_state() 466 st->stack[i].slot_type[j] = STACK_POISON; in __clean_func_state() 667 static bool is_spilled_scalar_after(const struct bpf_stack_state *stack, int im) in is_spilled_scalar_after() argument 669 return stack->slot_type[im] == STACK_SPILL && in is_spilled_scalar_after() 670 stack->spilled_ptr.type == SCALAR_VALUE; in is_spilled_scalar_after() 674 struct bpf_stack_state *stack, int im) in is_stack_misc_after() argument 678 for (i = im; i < ARRAY_SIZE(stack->slot_type); ++i) { in is_stack_misc_after() 679 if ((stack->slot_type[i] == STACK_MISC) || in is_stack_misc_after() [all …]
|
| /linux/tools/testing/selftests/mm/ |
| H A D | pkey_sighandler_tests.c | 6 * using an alternate signal stack, with the default pkey (pkey 0) disabled. 79 static inline long clone_raw(unsigned long flags, void *stack, 83 long a2 = (long)stack; in clone_raw() 172 /* After we disable MPK 0, we can't access the stack to return */ in thread_segv_pkuerr_stack() 178 stack_t *stack = ptr; in thread_segv_maperr_ptr() 182 * Setup alternate signal stack, which should be pkey_mprotect()ed by in thread_segv_maperr_ptr() 183 * MPK 0. The thread's stack cannot be used for signals because it is in thread_segv_maperr_ptr() 186 syscall_raw(SYS_sigaltstack, (long)stack, 0, 0, 0, 0, 0); in thread_segv_maperr_ptr() 201 * Note that the new thread stack and the alternate signal stack i 80 clone_raw(unsigned long flags,void * stack,int * parent_tid,int * child_tid) clone_raw() argument 179 stack_t *stack = ptr; thread_segv_maperr_ptr() local 286 void *stack; test_sigsegv_handler_with_different_pkey_for_stack() local 405 stack_t *stack = ptr; thread_sigusr2_self() local 442 void *stack; test_pkru_sigreturn() local [all...] |
| /linux/scripts/kconfig/ |
| H A D | symbol.c | 1089 static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) in dep_stack_insert() argument 1091 memset(stack, 0, sizeof(*stack)); in dep_stack_insert() 1093 check_top->next = stack; in dep_stack_insert() 1094 stack->prev = check_top; in dep_stack_insert() 1095 stack->sym = sym; in dep_stack_insert() 1096 check_top = stack; in dep_stack_insert() 1113 struct dep_stack *stack; in sym_check_print_recursive() local 1125 for (stack = check_top; stack != NULL; stack = stack->prev) in sym_check_print_recursive() 1126 if (stack->sym == last_sym) in sym_check_print_recursive() 1128 if (!stack) { in sym_check_print_recursive() [all …]
|
| /linux/arch/x86/include/asm/ |
| H A D | stacktrace.h | 31 bool in_task_stack(unsigned long *stack, struct task_struct *task, 34 bool in_entry_stack(unsigned long *stack, struct stack_info *info); 36 int get_stack_info(unsigned long *stack, struct task_struct *task, 38 bool get_stack_info_noinstr(unsigned long *stack, struct task_struct *task, 42 bool get_stack_guard_info(unsigned long *stack, struct stack_info *info) in get_stack_guard_info() argument 45 if (get_stack_info_noinstr(stack, current, info)) in get_stack_guard_info() 48 return get_stack_info_noinstr((void *)stack + PAGE_SIZE, current, info); in get_stack_guard_info()
|
| /linux/arch/powerpc/kernel/ |
| H A D | stacktrace.c | 44 unsigned long *stack = (unsigned long *) sp; in arch_stack_walk() local 50 newsp = stack[0]; in arch_stack_walk() 51 ip = stack[STACK_FRAME_LR_SAVE]; in arch_stack_walk() 96 unsigned long *stack = (unsigned long *) sp; in arch_stack_walk_reliable() local 103 newsp = stack[0]; in arch_stack_walk_reliable() 123 stack[STACK_INT_FRAME_MARKER_LONGS] == STACK_FRAME_REGS_MARKER) { in arch_stack_walk_reliable() 128 ip = stack[STACK_FRAME_LR_SAVE]; in arch_stack_walk_reliable() 136 ip = ftrace_graph_ret_addr(task, &graph_idx, ip, stack); in arch_stack_walk_reliable()
|
| /linux/arch/um/os-Linux/skas/ |
| H A D | mem.c | 27 struct stub_data *proc_data = (void *)mm_idp->stack; in syscall_stub_dump_error() 59 unsigned long *stack) in check_init_stack() argument 61 if (stack == NULL) { in check_init_stack() 62 stack = (unsigned long *) mm_idp->stack + 2; in check_init_stack() 63 *stack = 0; in check_init_stack() 65 return stack; in check_init_stack() 89 struct stub_data *proc_data = (void *)mm_idp->stack; in do_syscall_stub() 160 struct stub_data *proc_data = (struct stub_data *) mm_idp->stack; in syscall_stub_alloc() 183 struct stub_data *proc_data = (void *) mm_idp->stack; in syscall_stub_get_previous()
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-ocfs2 | 38 * 'o2cb' - The classic o2cb cluster stack that ocfs2 has 62 the cluster stack in use. The contents may change 63 when all filesystems are unmounted and the cluster stack 71 of current ocfs2 cluster stack. This value is set by 72 userspace tools when bringing the cluster stack online. 74 Cluster stack names are 4 characters in length. 76 When the 'o2cb' cluster stack is used, the 'o2cb' cluster 81 cluster stack on a single line. 83 Writing a new stack name to this file changes the current 84 cluster stack unless there are mounted ocfs2 filesystems. [all …]
|
| /linux/fs/jfs/ |
| H A D | jfs_btree.h | 108 struct btframe stack[MAXTREEHEIGHT]; member 112 (btstack)->top = (btstack)->stack 115 ( (btstack)->top == &((btstack)->stack[MAXTREEHEIGHT-1])) 126 ( (btstack)->top == (btstack)->stack ? NULL : --(btstack)->top ) 129 ( (btstack)->top == (btstack)->stack ? NULL : (btstack)->top ) 137 (long long)btstack->stack[i].bn, in BT_STACK_DUMP() 138 btstack->stack[i].index); in BT_STACK_DUMP()
|
| /linux/arch/loongarch/ |
| H A D | Kconfig.debug | 5 This determines which method will be used for unwinding kernel stack 6 traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack, 12 This option enables the "guess" unwinder for unwinding kernel stack 13 traces. It scans the stack and reports every kernel text address it 23 This option enables the "prologue" unwinder for unwinding kernel stack 24 traces. It unwind the stack frame based on prologue code analyze. Symbol 35 unwinding kernel stack traces. It uses a custom data format which is
|
| /linux/arch/loongarch/kernel/ |
| H A D | process.c | 179 unsigned long usp = args->stack; in copy_thread() 263 bool in_irq_stack(unsigned long stack, struct stack_info *info) in in_irq_stack() argument 269 if (stack < begin || stack >= end) in in_irq_stack() 284 bool in_task_stack(unsigned long stack, struct task_struct *task, in in_task_stack() argument 290 if (stack < begin || stack >= end) in in_task_stack() 301 int get_stack_info(unsigned long stack, struct task_struct *task, in get_stack_info() argument 306 if (!stack || stack & (SZREG - 1)) in get_stack_info() 309 if (in_task_stack(stack, task, info)) in get_stack_info() 315 if (in_irq_stack(stack, info)) in get_stack_info()
|
| /linux/tools/perf/util/ |
| H A D | annotate-data.c | 29 /* register number of the stack pointer */ 70 pr_info(" stack canary\n"); in pr_debug_type_name() 186 struct type_state_stack *stack, *tmp; in exit_type_state() 188 list_for_each_entry_safe(stack, tmp, &state->stack_vars, list) { in exit_type_state() 189 list_del(&stack->list); in exit_type_state() 190 free(stack); in exit_type_state() 571 struct type_state_stack *stack; in find_stack_state() 573 list_for_each_entry(stack, &state->stack_vars, list) { in find_stack_state() 574 if (offset == stack->offset) in find_stack_state() 575 return stack; in find_stack_state() 185 struct type_state_stack *stack, *tmp; exit_type_state() local 566 struct type_state_stack *stack; find_stack_state() local 579 set_stack_state(struct type_state_stack * stack,int offset,u8 kind,Dwarf_Die * type_die,int ptr_offset) set_stack_state() argument 621 struct type_state_stack *stack = find_stack_state(state, offset); findnew_stack_state() local 884 struct type_state_stack *stack; update_var_state() local 1235 struct type_state_stack *stack; check_matching_type() local 1268 struct type_state_stack *stack; check_matching_type() local [all...] |
| H A D | thread-stack.c | 3 * thread-stack.c: Synthesize a thread's stack using call / return events 22 #include "thread-stack.h" 40 * struct thread_stack_entry - thread stack entry. 68 * struct thread_stack - thread stack constructed from 'call' and 'return' 70 * @stack: array that holds the stack 71 * @cnt: number of entries in the stack 72 * @sz: current maximum stack size 83 * @br_stack_rb: branch stack (rin 89 struct thread_stack_entry *stack; global() member [all...] |