/kernel/linux/linux-5.10/arch/um/os-Linux/skas/ |
D | mem.c | 26 unsigned long *stack) in check_init_stack() argument 28 if (stack == NULL) { in check_init_stack() 29 stack = (unsigned long *) mm_idp->stack + 2; in check_init_stack() 30 *stack = 0; in check_init_stack() 32 return stack; in check_init_stack() 78 ret = *((unsigned long *) mm_idp->stack); in do_syscall_stub() 79 offset = *((unsigned long *) mm_idp->stack + 1); in do_syscall_stub() 81 data = (unsigned long *)(mm_idp->stack + offset - STUB_DATA); in do_syscall_stub() 114 unsigned long *stack = check_init_stack(mm_idp, *addr); in run_syscall_stub() local 116 *stack += sizeof(long); in run_syscall_stub() [all …]
|
/kernel/linux/linux-5.10/drivers/misc/altera-stapl/ |
D | altera.c | 213 long *stack = astate->stack; in altera_execute() local 528 stack[stack_ptr] = stack[stack_ptr - 1]; in altera_execute() 534 long_tmp = stack[stack_ptr - 2]; in altera_execute() 535 stack[stack_ptr - 2] = stack[stack_ptr - 1]; in altera_execute() 536 stack[stack_ptr - 1] = long_tmp; in altera_execute() 542 stack[stack_ptr - 1] += stack[stack_ptr]; in altera_execute() 548 stack[stack_ptr - 1] -= stack[stack_ptr]; in altera_execute() 554 stack[stack_ptr - 1] *= stack[stack_ptr]; in altera_execute() 560 stack[stack_ptr - 1] /= stack[stack_ptr]; in altera_execute() 566 stack[stack_ptr - 1] %= stack[stack_ptr]; in altera_execute() [all …]
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
D | dumpstack_32.c | 38 static bool in_hardirq_stack(unsigned long *stack, struct stack_info *info) in in_hardirq_stack() argument 47 if (stack < begin || stack > end) in in_hardirq_stack() 63 static bool in_softirq_stack(unsigned long *stack, struct stack_info *info) in in_softirq_stack() argument 72 if (stack < begin || stack > end) in in_softirq_stack() 88 static bool in_doublefault_stack(unsigned long *stack, struct stack_info *info) in in_doublefault_stack() argument 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() 108 int get_stack_info(unsigned long *stack, struct task_struct *task, in get_stack_info() argument 111 if (!stack) in get_stack_info() [all …]
|
D | dumpstack_64.c | 88 static __always_inline bool in_exception_stack(unsigned long *stack, struct stack_info *info) in in_exception_stack() argument 90 unsigned long begin, end, stk = (unsigned long)stack; in in_exception_stack() 129 static __always_inline bool in_irq_stack(unsigned long *stack, struct stack_info *info) in in_irq_stack() argument 138 if (stack < begin || stack >= end) in in_irq_stack() 154 bool noinstr get_stack_info_noinstr(unsigned long *stack, struct task_struct *task, in get_stack_info_noinstr() argument 157 if (in_task_stack(stack, task, info)) in get_stack_info_noinstr() 163 if (in_exception_stack(stack, info)) in get_stack_info_noinstr() 166 if (in_irq_stack(stack, info)) in get_stack_info_noinstr() 169 if (in_entry_stack(stack, info)) in get_stack_info_noinstr() 175 int get_stack_info(unsigned long *stack, struct task_struct *task, in get_stack_info() argument [all …]
|
D | dumpstack.c | 32 bool noinstr in_task_stack(unsigned long *stack, struct task_struct *task, in in_task_stack() argument 38 if (stack < begin || stack >= end) in in_task_stack() 50 bool noinstr in_entry_stack(unsigned long *stack, struct stack_info *info) in in_entry_stack() argument 57 if ((void *)stack < begin || (void *)stack >= end) in in_entry_stack() 187 unsigned long *stack, const char *log_lvl) in show_trace_log_lvl() argument 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 = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { in show_trace_log_lvl() 220 if (get_stack_info(stack, task, &stack_info, &visit_mask)) { in show_trace_log_lvl() 227 stack = (unsigned long *)PAGE_ALIGN((unsigned long)stack); in show_trace_log_lvl() [all …]
|
/kernel/linux/linux-5.10/lib/zstd/ |
D | zstd_common.c | 28 #define stack_push(stack, size) \ argument 30 void *const ptr = ZSTD_PTR_ALIGN((stack)->ptr); \ 31 (stack)->ptr = (char *)ptr + (size); \ 32 (stack)->ptr <= (stack)->end ? ptr : NULL; \ 38 ZSTD_stack *stack = (ZSTD_stack *)workspace; in ZSTD_initStack() local 45 stack->ptr = workspace; in ZSTD_initStack() 46 stack->end = (char *)workspace + workspaceSize; in ZSTD_initStack() 47 stack_push(stack, sizeof(ZSTD_stack)); in ZSTD_initStack() 53 ZSTD_stack *stack = (ZSTD_stack *)opaque; in ZSTD_stackAllocAll() local 54 *size = (BYTE const *)stack->end - (BYTE *)ZSTD_PTR_ALIGN(stack->ptr); in ZSTD_stackAllocAll() [all …]
|
/kernel/linux/linux-5.10/tools/lib/traceevent/plugins/ |
D | plugin_function.c | 15 char **stack; member 53 static void add_child(struct func_stack *stack, const char *child, int pos) in add_child() argument 60 if (pos < stack->size) in add_child() 61 free(stack->stack[pos]); in add_child() 65 ptr = realloc(stack->stack, sizeof(char *) * in add_child() 66 (stack->size + STK_BLK)); in add_child() 72 stack->stack = ptr; in add_child() 74 for (i = stack->size; i < stack->size + STK_BLK; i++) in add_child() 75 stack->stack[i] = NULL; in add_child() 76 stack->size += STK_BLK; in add_child() [all …]
|
/kernel/liteos_a/testsuites/unittest/process/basic/pthread/smoke/ |
D | pthread_test_018.cpp | 70 void *stack = malloc(stackSize); in GroupProcess() local 71 ICUNIT_ASSERT_NOT_EQUAL((int)stack, 0, stack); in GroupProcess() 73 ret = pthread_attr_setstack(&attr, stack, stackSize); in GroupProcess() 78 ICUNIT_ASSERT_EQUAL(getStack, stack, getStack); in GroupProcess() 89 free(stack); in GroupProcess() 94 stack = malloc(stackSize); in GroupProcess() 95 ICUNIT_ASSERT_NOT_EQUAL((int)stack, 0, stack); in GroupProcess() 97 ret = pthread_attr_setstack(&attr, stack, stackSize); in GroupProcess() 102 ICUNIT_ASSERT_EQUAL(getStack, stack, getStack); in GroupProcess() 113 free(stack); in GroupProcess()
|
/kernel/linux/linux-5.10/arch/um/kernel/skas/ |
D | mmu.c | 62 unsigned long stack = 0; in init_new_context() local 65 stack = get_zeroed_page(GFP_KERNEL); in init_new_context() 66 if (stack == 0) in init_new_context() 69 to_mm->id.stack = stack; in init_new_context() 75 to_mm->id.u.pid = copy_context_skas0(stack, in init_new_context() 77 else to_mm->id.u.pid = start_userspace(stack); in init_new_context() 95 if (to_mm->id.stack != 0) in init_new_context() 96 free_page(to_mm->id.stack); in init_new_context() 110 ret = init_stub_pte(mm, STUB_DATA, mm->context.id.stack); in uml_setup_stubs() 115 mm->context.stub_pages[1] = virt_to_page(mm->context.id.stack); in uml_setup_stubs() [all …]
|
/kernel/linux/linux-5.10/arch/nios2/kernel/ |
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()
|
/kernel/linux/linux-5.10/arch/um/os-Linux/ |
D | helper.c | 45 unsigned long stack, sp; in run_helper() local 48 stack = alloc_stack(0, __cant_sleep()); in run_helper() 49 if (stack == 0) in run_helper() 67 sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *); in run_helper() 109 free_stack(stack, 0); in run_helper() 116 unsigned long stack, sp; in run_helper_thread() local 119 stack = alloc_stack(0, __cant_sleep()); in run_helper_thread() 120 if (stack == 0) in run_helper_thread() 123 sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *); in run_helper_thread() 142 free_stack(stack, 0); in run_helper_thread() [all …]
|
/kernel/linux/linux-5.10/arch/openrisc/kernel/ |
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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/ |
D | intel_runtime_pm.c | 68 static void __print_depot_stack(depot_stack_handle_t stack, in __print_depot_stack() argument 74 nr_entries = stack_depot_fetch(stack, &entries); in __print_depot_stack() 86 depot_stack_handle_t stack, *stacks; in track_intel_runtime_pm_wakeref() local 92 stack = __save_depot_stack(); in track_intel_runtime_pm_wakeref() 93 if (!stack) in track_intel_runtime_pm_wakeref() 99 rpm->debug.last_acquire = stack; in track_intel_runtime_pm_wakeref() 105 stacks[rpm->debug.count++] = stack; in track_intel_runtime_pm_wakeref() 108 stack = -1; in track_intel_runtime_pm_wakeref() 113 return stack; in track_intel_runtime_pm_wakeref() 117 depot_stack_handle_t stack) in untrack_intel_runtime_pm_wakeref() argument [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/vDSO/ |
D | vdso_standalone_test_x86.c | 73 __attribute__((externally_visible)) void c_main(void **stack) in c_main() argument 76 long argc = (long)*stack; in c_main() 77 stack += argc + 2; in c_main() 80 while(*stack) in c_main() 81 stack++; in c_main() 82 stack++; in c_main() 85 vdso_init_from_auxv((void *)stack); in c_main()
|
/kernel/linux/linux-5.10/security/ |
D | Kconfig.hardening | 8 stack variable initializations, this warning is silenced for 38 prompt "Initialize kernel stack variables at function entry" 44 This option enables initialization of stack variables at 56 bool "no automatic stack variable initialization (weakest)" 58 Disable automatic stack variable initialization. 60 classes of uninitialized stack variable exploits 68 Zero-initialize any structures on the stack containing 70 uninitialized stack variable exploits and information 80 Zero-initialize any structures on the stack that may 83 of uninitialized stack variable exploits and information [all …]
|
/kernel/linux/linux-5.10/include/linux/sched/ |
D | task_stack.h | 21 return task->stack; in task_stack_page() 29 return (unsigned long *)((unsigned long)task->stack + THREAD_SIZE) - 1; in end_of_stack() 31 return task->stack; in end_of_stack() 37 #define task_stack_page(task) ((void *)(task)->stack) 87 void *stack = task_stack_page(current); in object_is_on_stack() local 89 return (obj >= stack) && (obj < (stack + THREAD_SIZE)); in object_is_on_stack()
|
/kernel/linux/linux-5.10/lib/ |
D | stackdepot.c | 109 struct stack_record *stack; in depot_alloc_stack() local 132 stack = stack_slabs[depot_index] + depot_offset; in depot_alloc_stack() 134 stack->hash = hash; in depot_alloc_stack() 135 stack->size = size; in depot_alloc_stack() 136 stack->handle.slabindex = depot_index; in depot_alloc_stack() 137 stack->handle.offset = depot_offset >> STACK_ALLOC_ALIGN; in depot_alloc_stack() 138 stack->handle.valid = 1; in depot_alloc_stack() 139 memcpy(stack->entries, entries, size * sizeof(unsigned long)); in depot_alloc_stack() 142 return stack; in depot_alloc_stack() 208 struct stack_record *stack; in stack_depot_fetch() local [all …]
|
/kernel/linux/linux-5.10/arch/h8300/kernel/ |
D | traps.c | 120 unsigned long *stack, addr; in show_stack() local 126 stack = esp; in show_stack() 128 printk("%sStack from %08lx:", loglvl, (unsigned long)stack); in show_stack() 130 if (((unsigned long)stack & (THREAD_SIZE - 1)) >= in show_stack() 135 pr_cont(" %08lx", *stack++); in show_stack() 140 stack = esp; in show_stack() 141 while (((unsigned long)stack & (THREAD_SIZE - 1)) < THREAD_SIZE-4) { in show_stack() 142 addr = *stack++; in show_stack()
|
/kernel/linux/linux-5.10/Documentation/x86/ |
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 …]
|
/kernel/linux/linux-5.10/tools/perf/scripts/python/ |
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]))
|
/kernel/liteos_a/testsuites/unittest/process/basic/process/full/ |
D | process_test_050.cpp | 53 void *stack; in Testcase() local 70 stack = malloc(arg); in Testcase() 71 ICUNIT_GOTO_NOT_EQUAL(stack, NULL, stack, EXIT1); in Testcase() 73 stackTop = reinterpret_cast<char *>(reinterpret_cast<unsigned long>(stack) + arg); in Testcase() 87 free(stack); in Testcase()
|
D | process_test_051.cpp | 70 void *stack; in Testcase() local 85 stack = malloc(arg); in Testcase() 86 ICUNIT_GOTO_NOT_EQUAL(stack, NULL, stack, EXIT1); in Testcase() 88 stackTop = reinterpret_cast<char *>(reinterpret_cast<unsigned long>(stack) + arg); in Testcase() 97 free(stack); in Testcase()
|
/kernel/linux/linux-5.10/arch/um/kernel/ |
D | sysrq.c | 30 void show_stack(struct task_struct *task, unsigned long *stack, in show_stack() argument 42 if (!stack) in show_stack() 43 stack = get_stack_pointer(task, segv_regs); in show_stack() 47 if (kstack_end(stack)) in show_stack() 51 pr_cont(" %08lx", *stack++); in show_stack()
|
/kernel/liteos_a/testsuites/unittest/container/smoke/ |
D | It_container_chroot_002.cpp | 58 char *stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, in TestFunc() local 60 if (stack == nullptr) { in TestFunc() 63 char *stackTop = stack + STACK_SIZE; in TestFunc() 104 char *stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, in ItContainerChroot002() local 106 ASSERT_TRUE(stack != nullptr); in ItContainerChroot002() 107 char *stackTop = stack + STACK_SIZE; in ItContainerChroot002()
|
D | It_container_001.cpp | 51 char *stack = nullptr; in ItContainer001() local 53 …stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MA… in ItContainer001() 54 ASSERT_NE(stack, MAP_FAILED); in ItContainer001() 55 stackTop = stack + STACK_SIZE; in ItContainer001() 58 (void)munmap(stack, STACK_SIZE); in ItContainer001()
|