Skip to content

Commit 6ea8b69

Browse files
committed
fgraph: Separate size of ret_stack from PAGE_SIZE
The ret_stack (shadow stack used by function graph infrastructure) is currently defined as PAGE_SIZE. But some architectures which have 64K PAGE_SIZE, this is way overkill. Also there's an effort to allow the PAGE_SIZE to be defined at boot up. Hard code it for now to 4096. In the future, this size may change and even be dependent on specific architectures. Link: https://lore.kernel.org/all/[email protected]/ Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Link: https://lore.kernel.org/[email protected] Suggested-by: Ryan Roberts <[email protected]> Reviewed-by: Ryan Roberts <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 81ec38e commit 6ea8b69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/fgraph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ enum {
153153
* SHADOW_STACK_OFFSET: The size in long words of the shadow stack
154154
* SHADOW_STACK_MAX_OFFSET: The max offset of the stack for a new frame to be added
155155
*/
156-
#define SHADOW_STACK_SIZE (PAGE_SIZE)
156+
#define SHADOW_STACK_SIZE (4096)
157157
#define SHADOW_STACK_OFFSET (SHADOW_STACK_SIZE / sizeof(long))
158158
/* Leave on a buffer at the end */
159159
#define SHADOW_STACK_MAX_OFFSET \

0 commit comments

Comments
 (0)