diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-30 13:34:18 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-11-01 10:27:36 +0200 |
| commit | f139fff6ae7063c1965fa3085bb2585d7d838d72 (patch) | |
| tree | 7ee9f7c6a1ee09dba93c086cd66861474b821c97 /arch/riscv64/kernel/proc.c | |
| parent | b576c1d477bf476f277d32ecf60c312e4a97490d (diff) | |
| download | kmi-f139fff6ae7063c1965fa3085bb2585d7d838d72.tar.gz kmi-f139fff6ae7063c1965fa3085bb2585d7d838d72.zip | |
rpc actually marks and unmarks stack regions
+ Processes won't be able to read previous stack frames etc
Diffstat (limited to 'arch/riscv64/kernel/proc.c')
| -rw-r--r-- | arch/riscv64/kernel/proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv64/kernel/proc.c b/arch/riscv64/kernel/proc.c index 3ae2e15..ba5c8e7 100644 --- a/arch/riscv64/kernel/proc.c +++ b/arch/riscv64/kernel/proc.c @@ -48,7 +48,8 @@ void run_init(struct tcb *t, vm_t fdt, vm_t initrd) clone_uvmem(r->proc.vmem, t->rpc.vmem); flush_tlb_all(); - vm_t stack_top = t->rpc_stack - BASE_PAGE_SIZE; + /* lore, should probably be codified somewhere */ + vm_t stack_top = get_stack(t); info("jumping to %lx with sp = %lx\n", (long)t->callback, stack_top); bkl_unlock(); |
