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
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'.
264 * which perform writes to CSR_SSP properly, shadow stack pivoting is not possible. Since
265 * CSR_SSP is writable by user mode, it itself can setup a shadow stack token subsequent
286 * This gets called during clone/clone3/fork. And is needed to allocate a shadow stack for
287 * cases where CLONE_VM is specified and thus a different stack is specified by user. We
288 * thus need a separate shadow stack too. How a separate shadow stack is specified by
291 * stack allocation is not needed (like in case of !CLONE_VM)
298 /* If shadow stack is not supported, return 0 */
303 * If shadow stack is not enabled on the new thread, skip any
304 * switch to a new shadow stack.
310 * For CLONE_VFORK the child will share the parents shadow stack.
321 * stack.
328 * stack is needed for new cloned thread. Note: below allocation is happening
344 /* If shadow stack is not supported or not enabled, nothing to release */
350 * shadow stack allocated, and exit_thread() calls this function to
358 * We know shadow stack is enabled but if base is NULL, then
359 * this task is not managing its own shadow stack (CLONE_VFORK). So
377 /* this means shadow stack is enabled on the task */
400 /* Request is to enable shadow stack and shadow stack is not enabled already */
402 /* shadow stack was allocated and enable request again
417 * If a request to disable shadow stack happens, let's go ahead and release it
419 * not releasing the shadow stack (because it might be needed in parent). Although
421 * then in that case, it'll get entirely new shadow stack because following condition
423 * - shadow stack was not enabled for vforked child
424 * - shadow stack base was anyways pointing to 0
426 * stack whenever VFORKed child releases resources via exit or exec but at the same
427 * time we want VFORKed child to break away and establish new shadow stack if it desires
523 pr_info("RISC-V user CFI disabled via cmdline - shadow stack status : %s, landing pad status : %s\n",