Home
last modified time | relevance | path

Searched full:stack (Results 1 – 25 of 3034) sorted by relevance

12345678910>>...122

/kernel/linux/linux-5.10/arch/x86/kernel/
Ddumpstack_32.c38 static bool in_hardirq_stack(unsigned long *stack, struct stack_info *info) in in_hardirq_stack() argument
44 * This is a software stack, so 'end' can be a valid stack pointer. in in_hardirq_stack()
45 * It just means the stack is empty. in in_hardirq_stack()
47 if (stack < begin || stack > end) in in_hardirq_stack()
55 * See irq_32.c -- the next stack pointer is stored at the beginning of in in_hardirq_stack()
56 * the stack. in in_hardirq_stack()
63 static bool in_softirq_stack(unsigned long *stack, struct stack_info *info) in in_softirq_stack() argument
69 * This is a software stack, so 'end' can be a valid stack pointer. in in_softirq_stack()
70 * It just means the stack is empty. in in_softirq_stack()
72 if (stack < begin || stack > end) in in_softirq_stack()
[all …]
Ddumpstack_64.c40 * On 64-bit, we have a generic entry stack that we in stack_type_name()
55 * @offs: Offset from the start of the exception stack area
56 * @size: Size of the exception stack
73 * Array of exception stack page descriptors. If the stack is larger than
74 * PAGE_SIZE, all pages covering a particular stack will have the same
75 * info. The guard pages including the not mapped DB2 stack are zeroed
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()
99 * Handle the case where stack trace is collected _before_ in in_exception_stack()
106 /* Bail if @stack is outside the exception stack area. */ in in_exception_stack()
[all …]
Ddumpstack.c32 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()
134 /* No access to the user space stack of other tasks. Ignore. */ in show_opcodes()
166 * ordering reasons: if the registers are on the next stack, we don't in show_regs_if_on_stack()
168 * the wrong stack. Later, when show_trace_log_lvl() switches to the in show_regs_if_on_stack()
169 * next stack, this function will be called again with the same regs so in show_regs_if_on_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()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/verifier/
Dprecise.c43 regs=4 stack=0 before 25\
44 regs=4 stack=0 before 24\
45 regs=4 stack=0 before 23\
46 regs=4 stack=0 before 22\
47 regs=4 stack=0 before 20\
48 parent didn't have regs=4 stack=0 marks\
50 regs=4 stack=0 before 19\
51 regs=200 stack=0 before 18\
52 regs=300 stack=0 before 17\
53 regs=201 stack=0 before 15\
[all …]
Dvar_off.c21 "variable-offset stack read, priv vs unpriv",
23 /* Fill the top 8 bytes of the stack */
34 /* dereference it for a stack read */
41 .errstr_unpriv = "R2 variable stack access prohibited for !root",
45 "variable-offset stack read, uninitialized",
56 /* dereference it for a stack read */
62 .errstr = "invalid variable-offset read from stack R2",
66 "variable-offset stack write, priv vs unpriv",
77 /* Dereference it for a stack write */
89 /* Variable stack access is rejected for unprivileged.
[all …]
/kernel/linux/linux-5.10/drivers/misc/altera-stapl/
Daltera.c119 /* This function checks if enough parameters are available on the stack. */
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()
[all …]
/kernel/linux/linux-5.10/arch/um/os-Linux/skas/
Dmem.c26 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()
74 * beginning of the stack: in do_syscall_stub()
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
[all …]
/kernel/linux/linux-5.10/security/
DKconfig.hardening8 stack variable initializations, this warning is silenced for
29 prompt "Initialize kernel stack variables at function entry"
34 This option enables initialization of stack variables at
48 Disable automatic stack variable initialization.
50 classes of uninitialized stack variable exploits
58 Zero-initialize any structures on the stack containing
60 uninitialized stack variable exploits and information
70 Zero-initialize any structures on the stack that may
73 of uninitialized stack variable exploits and information
78 stack that can otherwise be optimized out, so combining
[all …]
/kernel/linux/linux-5.10/Documentation/x86/
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
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
43 events on x86_64. This feature is called the Interrupt Stack Table
46 point to dedicated stacks; each stack can be a different size.
[all …]
/kernel/linux/linux-5.10/arch/x86/entry/
Dentry_32.S7 * Stack layout while running C code:
8 * ptrace needs to have all registers on the stack.
59 * %gs is used for userland TLS and kernel only uses it for stack
200 * When we're here from kernel mode; the (exception) stack looks like:
248 * so any attempt to access the stack needs to use SS. (except for
257 * middle doesn't scribble our stack.
313 /* Switch to kernel stack if necessary */
409 * Setup and switch to ESPFIX stack
411 * We're returning to userspace with a 16 bit stack. The CPU will not
445 * entry-stack, it will overwrite the task-stack and everything we
[all …]
Dentry_64.S15 * at the top of the kernel process stack.
73 * are not needed). SYSCALL does not save anything on the stack
106 /* Construct struct pt_regs on stack */
204 * Save old stack pointer and switch to trampoline stack.
214 * We are on the trampoline stack. All regs except RDI are live.
243 /* switch stack */
253 * When switching from a shallower to a deeper call stack
325 * @has_error_code: Hardware pushed error code on stack
349 * @has_error_code: Hardware pushed error code on stack
352 * and simple IDT entries. No IST stack, no paranoid entry checks.
[all …]
/kernel/linux/linux-5.10/lib/
Dstackdepot.c3 * Generic stack depot for storing stack traces.
5 * Some debugging tools need to save stack traces of certain events which can
7 * free stacks for each object, but storing two stack traces per object
11 * Instead, stack depot maintains a hashtable of unique stacktraces. Since alloc
38 #define STACK_ALLOC_ORDER 2 /* 'Slab' size order for stack depot, 4 pages */
63 u32 size; /* Number of frames in the stack */
103 /* Allocation of a new stack in raw storage */
109 struct stack_record *stack; in depot_alloc_stack() local
115 WARN_ONCE(1, "Stack depot reached limit capacity"); in depot_alloc_stack()
132 stack = stack_slabs[depot_index] + depot_offset; in depot_alloc_stack()
[all …]
/kernel/linux/linux-5.10/arch/openrisc/kernel/
Dunwinder.c28 * the frame pointer should point to a location in the stack after the the
40 * Create a stack trace doing scanning which is frame pointer aware. We can
41 * get reliable stack traces by matching the previously found frame
42 * pointer with the top of the stack address every time we find a valid
45 * Ideally the stack parameter will be passed as FP, but it can not be
49 * The OpenRISC stack frame looks something like the following. The
53 * SP -> (top of stack)
58 * FP -> (previous top of stack) /
60 void unwind_stack(void *data, unsigned long *stack, in unwind_stack() argument
67 while (!kstack_end(stack)) { in unwind_stack()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/oprofile/
Dbacktrace.c15 #define STACK_SP(STACK) *(STACK) argument
17 #define STACK_LR64(STACK) *((unsigned long *)(STACK) + 2) argument
18 #define STACK_LR32(STACK) *((unsigned int *)(STACK) + 1) argument
21 #define STACK_LR(STACK) STACK_LR64(STACK) argument
23 #define STACK_LR(STACK) STACK_LR32(STACK) argument
44 * We do not enforce increasing stack addresses here because in user_getsp32()
45 * we may transition to a different stack, eg a signal handler. in user_getsp32()
77 * We do not enforce increasing stack addresses here because in kernel_getsp()
78 * we might be transitioning from an interrupt stack to a kernel in kernel_getsp()
79 * stack. validate_sp() is designed to understand this, so just in kernel_getsp()
/kernel/linux/linux-5.10/kernel/trace/
Dtrace_stack.c58 * The stack tracer looks for a maximum stack at each call from a function. It
59 * registers a callback from ftrace, and in that callback it examines the stack
60 * size. It determines the stack size from the variable passed in, which is the
62 * The stack size is calculated by the address of the local variable to the top
63 * of the current stack. If that size is smaller than the currently saved max
64 * stack size, nothing more is done.
66 * If the size of the stack is greater than the maximum recorded size, then the
70 * saving the function's local variables, the stack will look something like
73 * [ top of stack ]
80 * 31: [ do trace stack here ]
[all …]
/kernel/linux/linux-5.10/lib/zstd/
Dzstd_common.c28 #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
44 /* Initialize the stack */ in ZSTD_initStack()
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
[all …]
/kernel/linux/linux-5.10/include/linux/sched/
Dtask_stack.h6 * task->stack (kernel stack) handling interfaces:
15 * When accessing the stack of a non-current task that might exit, use
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)
46 * Return the address of the last usable long on the stack.
48 * When the stack grows down, this is just above the thread
51 * When the stack grows up, this is the highest address.
87 void *stack = task_stack_page(current); in object_is_on_stack() local
[all …]
/kernel/linux/linux-5.10/tools/lib/traceevent/plugins/
Dplugin_function.c15 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/linux/linux-5.10/arch/m68k/68000/
Dentry.S100 /* kernel stack, otherwise stack overflow can occur during*/
136 movel #65,%sp@- /* put vector # on stack*/
138 3: addql #8,%sp /* pop parameters off stack*/
147 movel #66,%sp@- /* put vector # on stack*/
149 3: addql #8,%sp /* pop parameters off stack*/
158 movel #67,%sp@- /* put vector # on stack*/
160 3: addql #8,%sp /* pop parameters off stack*/
169 movel #68,%sp@- /* put vector # on stack*/
171 3: addql #8,%sp /* pop parameters off stack*/
180 movel #69,%sp@- /* put vector # on stack*/
[all …]
/kernel/linux/linux-5.10/kernel/
Dstacktrace.c5 * Stack trace management functions
18 * stack_trace_print - Print the entries in the stack trace
37 * stack_trace_snprint - Print the entries in the stack trace into a buffer
104 * stack_trace_save - Save a stack trace into a storage array
107 * @skipnr: Number of entries to skip at the start of the stack trace
127 * stack_trace_save_tsk - Save a task stack trace into a storage array
131 * @skipnr: Number of entries to skip at the start of the stack trace
155 * stack_trace_save_regs - Save a stack trace based on pt_regs into a storage array
159 * @skipnr: Number of entries to skip at the start of the stack trace
179 * stack_trace_save_tsk_reliable - Save task stack with verification
[all …]
/kernel/linux/linux-5.10/tools/objtool/Documentation/
Dstack-validation.txt1 Compile-time stack metadata validation
10 analyzes every .o file and ensures the validity of its stack metadata.
12 that stack traces can be reliable.
28 Why do we need stack metadata validation?
31 Here are some of the benefits of validating stack metadata:
33 a) More reliable stack traces for frame pointer enabled kernels
36 code and debug tools to be able to walk the stack to determine the
51 For stack traces based on frame pointers to be reliable, all
52 functions which call other functions must first create a stack frame
54 create a stack frame before calling a second function, the *caller*
[all …]
/kernel/linux/linux-5.10/fs/ocfs2/
Dstackglue.h7 * Glue to the underlying cluster stack.
91 * state for the underlying stack. ocfs2 does use cc_version to determine
108 * Each cluster stack implements the stack operations structure. Not used
110 * into stack operations.
115 * filesystem to the cluster stack. The ->connect() op is passed
119 * The stack must set up any notification mechanisms and create
136 * fs code. The stack must disengage from the DLM and discontinue
140 * be freed. Thus, a stack must not return from ->disconnect()
143 * Once this call returns, the stack glue will be dropping this
160 * stack will likely want to wrap ast and bast calls before passing
[all …]
/kernel/linux/linux-5.10/arch/sh/kernel/
Dunwinder.c7 * This file provides arbitration code for stack unwinders.
9 * Multiple stack unwinders can be available on a system, usually with
20 * This is the most basic stack unwinder an architecture can
22 * RISC CPUs, it can be implemented by looking through the stack for
26 * construct more accurate stack traces.
30 .name = "stack-reader",
40 * "curr_unwinder" points to the stack unwinder currently in use. This
59 * select_unwinder - Select the best registered stack unwinder.
63 * Select the stack unwinder with the best rating. This is useful for
81 * Enqueue the stack unwinder sorted by rating.
[all …]
/kernel/linux/linux-5.10/tools/perf/util/
Dthread-stack.c3 * 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 (ring buffer)
84 * @br_stack_sz: maximum branch stack size
89 struct thread_stack_entry *stack; member
[all …]
/kernel/linux/linux-5.10/Documentation/ia64/
Dmca.rst45 assume that the kernel stack is in a fit state to be used. Mainly
46 because PAL may or may not maintain the stack pointer internally.
47 Because the MCA/INIT handlers cannot trust the kernel stack, they
53 the kernel stack[1]. So switching to a new kernel stack means that
56 stack also means a new value for current.
76 switches to an MCA/INIT stack, registers its new stack using
85 own stack as running on that cpu. Then a recursive error gets a
137 stack, so switching stack means switching task.
142 kernel stack.
156 OS has no idea what unwind data is available for the user space stack,
[all …]

12345678910>>...122