Lines Matching full:stack
112 * If size is 0, then to be compatible with regular stack we want it to be as big as
113 * regular stack. Else PAGE_ALIGN it and return back
124 * Writes on shadow stack can either be `sspush` or `ssamoswap`. `sspush` can happen
125 * implicitly on current shadow stack pointed to by CSR_SSP. `ssamoswap` takes pointer to
126 * shadow stack. To keep it simple, we plan to use `ssamoswap` to perform writes on shadow
127 * stack.
132 * Never expect -1 on shadow stack. Expect return addresses and zero in amo_user_shstk()
155 * Create a restore token on the shadow stack. A token is always XLEN wide
179 * Save user shadow stack pointer on the shadow stack itself and return a pointer to saved location.
203 * Restores the user shadow stack pointer from the token on the shadow stack for task 'tsk'.
274 * which perform writes to CSR_SSP properly, shadow stack pivoting is not possible. Since in SYSCALL_DEFINE3()
275 * CSR_SSP is writable by user mode, it itself can setup a shadow stack token subsequent in SYSCALL_DEFINE3()
296 * This gets called during clone/clone3/fork. And is needed to allocate a shadow stack for
297 * cases where CLONE_VM is specified and thus a different stack is specified by user. We
298 * thus need a separate shadow stack too. How a separate shadow stack is specified by
301 * stack allocation is not needed (like in case of !CLONE_VM)
308 /* If shadow stack is not supported, return 0 */ in shstk_alloc_thread_stack()
313 * If shadow stack is not enabled on the new thread, skip any in shstk_alloc_thread_stack()
314 * switch to a new shadow stack. in shstk_alloc_thread_stack()
320 * For CLONE_VFORK the child will share the parents shadow stack. in shstk_alloc_thread_stack()
331 * stack. in shstk_alloc_thread_stack()
338 * stack is needed for new cloned thread. Note: below allocation is happening in shstk_alloc_thread_stack()
354 /* If shadow stack is not supported or not enabled, nothing to release */ in shstk_release()
360 * shadow stack allocated, and exit_thread() calls this function to in shstk_release()
368 * We know shadow stack is enabled but if base is NULL, then in shstk_release()
369 * this task is not managing its own shadow stack (CLONE_VFORK). So in shstk_release()
387 /* this means shadow stack is enabled on the task */ in arch_get_shadow_stack_status()
410 /* Request is to enable shadow stack and shadow stack is not enabled already */ in arch_set_shadow_stack_status()
412 /* shadow stack was allocated and enable request again in arch_set_shadow_stack_status()
427 * If a request to disable shadow stack happens, let's go ahead and release it in arch_set_shadow_stack_status()
429 * not releasing the shadow stack (because it might be needed in parent). Although in arch_set_shadow_stack_status()
431 * then in that case, it'll get entirely new shadow stack because following condition in arch_set_shadow_stack_status()
433 * - shadow stack was not enabled for vforked child in arch_set_shadow_stack_status()
434 * - shadow stack base was anyways pointing to 0 in arch_set_shadow_stack_status()
436 * stack whenever VFORKed child releases resources via exit or exec but at the same in arch_set_shadow_stack_status()
437 * time we want VFORKed child to break away and establish new shadow stack if it desires in arch_set_shadow_stack_status()
533 …pr_info("RISC-V user CFI disabled via cmdline - shadow stack status : %s, landing pad status : %s\… in setup_global_riscv_enable()