From 6132623dbf3076da11cdb85c494fadd7ee0f0a93 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 2 Dec 2024 21:02:35 +0100 Subject: Share the same stack everywhere MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As documented in the code, we are not implementing any kind of memory protection, so in theory any process (regardless if running in user or kernel space) would be able to tamper with other processes' stack. Hence, don't even pretend that we are separating stacks and share the same global stack everywhere. This simplifies things a bit. Signed-off-by: Miquel Sabaté Solà --- include/fbos/sched.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/fbos/sched.h b/include/fbos/sched.h index e8edafd..67778da 100644 --- a/include/fbos/sched.h +++ b/include/fbos/sched.h @@ -30,6 +30,9 @@ struct task_struct { const void *entry_addr; }; +// Instantiated in kernel/main.c. +extern uint64_t stack[]; + // Tasks available on this kernel. extern struct task_struct tasks[4]; -- cgit v1.2.3