Home
last modified time | relevance | path

Searched refs:stack (Results 1 – 25 of 912) sorted by relevance

12345678910>>...37

/linux-6.15/lib/
H A Dstackdepot.c340 return stack; in depot_pop_free_pool()
366 return stack; in depot_pop_free()
407 if (!stack) { in depot_alloc_stack()
409 if (!stack) in depot_alloc_stack()
414 stack->hash = hash; in depot_alloc_stack()
436 return stack; in depot_alloc_stack()
460 stack = pool + offset; in depot_fetch_stack()
464 return stack; in depot_fetch_stack()
553 if (stack->hash != hash || stack->size != size) in find_stack()
575 ret = stack; in find_stack()
[all …]
/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dtest_global_func_ctx_args.c11 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()
/linux-6.15/drivers/misc/altera-stapl/
H A Daltera.c213 long *stack = astate->stack; in altera_execute() local
528 stack[stack_ptr] = 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()
586 stack[stack_ptr - 1] &= stack[stack_ptr]; in altera_execute()
592 stack[stack_ptr - 1] |= stack[stack_ptr]; in altera_execute()
[all …]
/linux-6.15/arch/x86/kernel/
H A Ddumpstack_32.c47 if (stack < begin || stack > end) in in_hardirq_stack()
72 if (stack < begin || stack > end) in in_softirq_stack()
93 void *begin = ss->stack; in in_doublefault_stack()
94 void *end = begin + sizeof(ss->stack); in in_doublefault_stack()
96 if ((void *)stack < begin || (void *)stack >= end) in in_doublefault_stack()
111 if (!stack) in get_stack_info()
116 if (in_task_stack(stack, task, info)) in get_stack_info()
122 if (in_entry_stack(stack, info)) in get_stack_info()
125 if (in_hardirq_stack(stack, info)) in get_stack_info()
128 if (in_softirq_stack(stack, info)) in get_stack_info()
[all …]
H A Ddumpstack.c38 if (stack < begin || stack >= end) in in_task_stack()
57 if ((void *)stack < begin || (void *)stack >= end) in in_entry_stack()
197 unwind_start(&state, task, regs, stack); in show_trace_log_lvl()
198 stack = stack ?: get_stack_pointer(task, regs); in show_trace_log_lvl()
217 for (; stack; stack = stack_info.next_sp) { in show_trace_log_lvl()
220 stack = PTR_ALIGN(stack, sizeof(long)); in show_trace_log_lvl()
229 stack = (unsigned long *)PAGE_ALIGN((unsigned long)stack); in show_trace_log_lvl()
251 for (; stack < stack_info.end; stack++) { in show_trace_log_lvl()
265 if (regs && stack == &regs->ip) in show_trace_log_lvl()
268 if (stack == ret_addr_p) in show_trace_log_lvl()
[all …]
H A Ddumpstack_64.c96 unsigned long begin, end, stk = (unsigned long)stack; in in_exception_stack()
135 static __always_inline bool in_irq_stack(unsigned long *stack, struct stack_info *info) in in_irq_stack() argument
153 if (stack < begin || stack >= end) in in_irq_stack()
170 bool noinstr get_stack_info_noinstr(unsigned long *stack, struct task_struct *task, in get_stack_info_noinstr() argument
173 if (in_task_stack(stack, task, info)) in get_stack_info_noinstr()
179 if (in_exception_stack(stack, info)) in get_stack_info_noinstr()
182 if (in_irq_stack(stack, info)) in get_stack_info_noinstr()
185 if (in_entry_stack(stack, info)) in get_stack_info_noinstr()
191 int get_stack_info(unsigned long *stack, struct task_struct *task, in get_stack_info() argument
196 if (!stack) in get_stack_info()
[all …]
/linux-6.15/tools/testing/selftests/bpf/prog_tests/
H A Dbuild_id.c16 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 …]
/linux-6.15/Documentation/arch/x86/
H A Dshstk.rst14 CET introduces shadow stack and indirect branch tracking (IBT). A shadow stack
17 return address to both the normal stack and the shadow stack. Upon
98 ARCH_SHSTK_SHSTK - Shadow stack
103 if shadow stack is disabled.
123 of the clone3 syscall, there is a stack size passed in and shadow stack
130 the shadow stack stores only return addresses, a large shadow stack covers
131 the condition that both the program stack and the signal alternate stack run
135 shadow stack is enabled, the shadow stack specific state is pushed onto the
136 shadow stack. Today this is only the old SSP (shadow stack pointer), pushed
139 restorer address to the shadow stack to help userspace avoid a shadow stack
[all …]
H A Dkernel-stacks.rst14 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
32 of every per thread stack.
34 The interrupt stack is also used when processing a softirq.
46 point to dedicated stacks; each stack can be a different size.
60 NMI. arch/x86_64/kernel/entry.S::paranoidentry adjusts the stack
83 assumptions about the previous state of the kernel stack.
93 stack.
106 assumptions about the previous state of the kernel stack.
[all …]
/linux-6.15/tools/testing/selftests/arm64/gcs/
H A Dlibc-gcs.c303 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 …]
/linux-6.15/arch/s390/kernel/
H A Ddumpstack.c45 enum stack_type type, unsigned long stack) in in_stack() argument
47 if (sp < stack || sp >= stack + THREAD_SIZE) in in_stack()
50 info->begin = stack; in in_stack()
51 info->end = stack + THREAD_SIZE; in in_stack()
58 unsigned long stack = (unsigned long)task_stack_page(task); in in_task_stack() local
60 return in_stack(sp, info, STACK_TYPE_TASK, stack); in in_task_stack()
67 return in_stack(sp, info, STACK_TYPE_IRQ, stack); in in_irq_stack()
74 return in_stack(sp, info, STACK_TYPE_NODAT, stack); in in_nodat_stack()
81 return in_stack(sp, info, STACK_TYPE_MCCK, stack); in in_mcck_stack()
88 return in_stack(sp, info, STACK_TYPE_RESTART, stack); in in_restart_stack()
[all …]
/linux-6.15/arch/um/kernel/skas/
H A Dmmu.c25 unsigned long stack = 0; in init_new_context() local
28 stack = __get_free_pages(GFP_KERNEL | __GFP_ZERO, ilog2(STUB_DATA_PAGES)); in init_new_context()
29 if (stack == 0) in init_new_context()
32 new_id->stack = stack; in init_new_context()
35 new_id->pid = start_userspace(stack); in init_new_context()
49 free_pages(new_id->stack, ilog2(STUB_DATA_PAGES)); in init_new_context()
71 free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES)); in destroy_context()
/linux-6.15/Documentation/mm/
H A Dvmalloced-kernel-stacks.rst21 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
49 needs to work while the stack points to a virtual address with
52 are populated before running on a possibly unpopulated stack.
102 vmap stack allocator takes care of this detail.
123 Leading and trailing guard pages help detect stack overflows. When the stack
126 stack space is left.
129 stack overflow on the double-fault stack.
147 high-order stack allocation, at least when the cache hits.
[all …]
/linux-6.15/arch/nios2/kernel/
H A Dtraps.c60 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-6.15/arch/openrisc/kernel/
H A Dunwinder.c60 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-6.15/mm/kmsan/
H A Dinit.c150 static void smallstack_push(struct smallstack *stack, struct page *pages) in smallstack_push() argument
152 KMSAN_WARN_ON(stack->index == MAX_BLOCKS); in smallstack_push()
153 stack->items[stack->index] = pages; in smallstack_push()
154 stack->index++; in smallstack_push()
158 static struct page *smallstack_pop(struct smallstack *stack) in smallstack_pop() argument
162 KMSAN_WARN_ON(stack->index == 0); in smallstack_pop()
163 stack->index--; in smallstack_pop()
164 ret = stack->items[stack->index]; in smallstack_pop()
165 stack->items[stack->index] = NULL; in smallstack_pop()
/linux-6.15/arch/um/kernel/
H A Dsysrq.c29 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-6.15/include/linux/sched/
H A Dtask_stack.h23 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-6.15/tools/perf/scripts/python/
H A Dstackcollapse.py97 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-6.15/mm/
H A Dpage_owner.c39 struct stack { struct
41 struct stack *next; argument
169 struct stack *stack; in add_stack_record_to_list() local
172 stack = kmalloc(sizeof(*stack), gfp_nested_mask(gfp_mask)); in add_stack_record_to_list()
173 if (!stack) { in add_stack_record_to_list()
858 struct stack *stack; in stack_start() local
875 return stack; in stack_start()
880 struct stack *stack = v; in stack_next() local
882 stack = stack->next; in stack_next()
886 return stack; in stack_next()
[all …]
/linux-6.15/tools/testing/selftests/mm/
H A Dpkey_sighandler_tests.c84 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 …]
/linux-6.15/arch/x86/include/asm/
H A Dstacktrace.h31 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-6.15/arch/um/os-Linux/
H A Dhelper.c47 unsigned long stack, sp; in run_helper() local
50 stack = alloc_stack(0, __uml_cant_sleep()); in run_helper()
51 if (stack == 0) in run_helper()
69 sp = stack + UM_KERN_PAGE_SIZE; in run_helper()
115 free_stack(stack, 0); in run_helper()
122 unsigned long stack, sp; in run_helper_thread() local
129 stack = alloc_stack(0, __uml_cant_sleep()); in run_helper_thread()
130 if (stack == 0) in run_helper_thread()
133 sp = stack + UM_KERN_PAGE_SIZE; in run_helper_thread()
152 free_stack(stack, 0); in run_helper_thread()
[all …]
/linux-6.15/arch/um/os-Linux/skas/
H A Dmem.c27 struct stub_data *proc_data = (void *)mm_idp->stack; in syscall_stub_dump_error()
49 unsigned long *stack) in check_init_stack() argument
51 if (stack == NULL) { in check_init_stack()
52 stack = (unsigned long *) mm_idp->stack + 2; in check_init_stack()
53 *stack = 0; in check_init_stack()
55 return stack; in check_init_stack()
79 struct stub_data *proc_data = (void *)mm_idp->stack; in do_syscall_stub()
142 struct stub_data *proc_data = (struct stub_data *) mm_idp->stack; in syscall_stub_alloc()
165 struct stub_data *proc_data = (void *) mm_idp->stack; in syscall_stub_get_previous()
/linux-6.15/scripts/kconfig/
H A Dsymbol.c1069 memset(stack, 0, sizeof(*stack)); in dep_stack_insert()
1073 stack->sym = sym; in dep_stack_insert()
1074 check_top = stack; in dep_stack_insert()
1103 for (stack = check_top; stack != NULL; stack = stack->prev) in sym_check_print_recursive()
1106 if (!stack) { in sym_check_print_recursive()
1111 for (; stack; stack = stack->next) { in sym_check_print_recursive()
1112 sym = stack->sym; in sym_check_print_recursive()
1113 next_sym = stack->next ? stack->next->sym : last_sym; in sym_check_print_recursive()
1114 type = stack->prop ? stack->prop->type : P_UNKNOWN; in sym_check_print_recursive()
1215 stack.expr = NULL; in sym_check_sym_deps()
[all …]

12345678910>>...37