Skip to content

Commit 7172f4f

Browse files
committed
Update design inputs
Signed-off-by: Paul Albertella <[email protected]>
1 parent 156dee3 commit 7172f4f

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

stack-memory/design-inputs.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,11 @@ https://www.baeldung.com/linux/kernel-stack-and-user-space-stack
5151
- During the syscall, the kernel stack of the running process is used
5252
* Size of the kernel stack is configured during compilation and remains fixed
5353
* Unlike the kernel stack, we can change the size of the userspace stack
54-
- e.g. using ulimit
54+
- using [setrlimit](https://man7.org/linux/man-pages/man2/setrlimit.2.html)
5555

5656
## Processes and threads
5757
https://www.baeldung.com/linux/process-vs-thread
5858

5959
## Stack protection mechanisms
6060

61-
### User space stack protection
62-
63-
Examples of kernel features supporting user space stack memory protection:
64-
65-
* CONFIG_GCC_PLUGIN_STRUCTLEAK
66-
* CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
67-
- GCC plugin to initialize variables sent by reference to zero, leaving no
68-
assumptions on the calling function
69-
* CONFIG_STACKPROTECTOR
70-
* CONFIG_STACKPROTECTOR_STRONG
71-
- Turns on stack protection in GCC compiler
72-
73-
### Kernel space stack protection
74-
75-
Examples of kernel features supporting kernel space stack memory protection:
76-
77-
* CONFIG_SCHED_STACK_END_CHECK
78-
- Detects stack corruption on calls to schedule()
79-
* CONFIG_VMAP_STACK
80-
- Add guard pages to virtually-mapped kernel stacks, allowing earlier
81-
detection of kernel stack overflows
82-
* CONFIG_GCC_PLUGIN_STACKLEAK
83-
- https://cateee.net/lkddb/web-lkddb/GCC_PLUGIN_STACKLEAK.html
84-
* CONFIG_THREAD_INFO_IN_STACK
85-
- moves thread information off the stack and into the task struct for protection of task info, particularly during context switch).
61+
See [LFSCS notes](https://github.com/elisa-tech/wg-lfscs/blob/main/Kernel%20configurations%20for%20stack%20memory%20protection.md)

0 commit comments

Comments
 (0)