diff --git a/apps/common/crt0.S b/apps/common/crt0.S index 027215c..f8778c3 100644 --- a/apps/common/crt0.S +++ b/apps/common/crt0.S @@ -9,9 +9,10 @@ .align 4 _start: -la a0, _estack -li a7, uvm32_syscall_stackprotect -ecall +# Uncomment below to enable stack protection, requires -DUVM32_STACK_PROTECTION +# la a0, _estack +# li a7, uvm32_syscall_stackprotect +# ecall # sp is already setup by vm sw ra,12(sp) diff --git a/precompiled/conio.bin b/precompiled/conio.bin index 19eef29..c6c97ed 100755 Binary files a/precompiled/conio.bin and b/precompiled/conio.bin differ diff --git a/precompiled/fib.bin b/precompiled/fib.bin index 3117105..5b281d7 100755 Binary files a/precompiled/fib.bin and b/precompiled/fib.bin differ diff --git a/precompiled/gfx.bin b/precompiled/gfx.bin index be51d34..095808a 100755 Binary files a/precompiled/gfx.bin and b/precompiled/gfx.bin differ diff --git a/precompiled/heap.bin b/precompiled/heap.bin index 8488a72..8ef9182 100755 Binary files a/precompiled/heap.bin and b/precompiled/heap.bin differ diff --git a/precompiled/helloworld.bin b/precompiled/helloworld.bin index 114d6e1..e59862f 100755 Binary files a/precompiled/helloworld.bin and b/precompiled/helloworld.bin differ diff --git a/precompiled/lissajous.bin b/precompiled/lissajous.bin index f8f629e..2a48fc3 100755 Binary files a/precompiled/lissajous.bin and b/precompiled/lissajous.bin differ diff --git a/precompiled/mandel.bin b/precompiled/mandel.bin index f8d0ffd..ea0fd73 100755 Binary files a/precompiled/mandel.bin and b/precompiled/mandel.bin differ diff --git a/precompiled/maze.bin b/precompiled/maze.bin index bd2a26e..d3a890d 100755 Binary files a/precompiled/maze.bin and b/precompiled/maze.bin differ diff --git a/precompiled/memtest.bin b/precompiled/memtest.bin index f2ee777..60bbc46 100755 Binary files a/precompiled/memtest.bin and b/precompiled/memtest.bin differ diff --git a/precompiled/rust-hello.bin b/precompiled/rust-hello.bin index 8828769..36a3e90 100755 Binary files a/precompiled/rust-hello.bin and b/precompiled/rust-hello.bin differ diff --git a/precompiled/self.bin b/precompiled/self.bin index 585953a..06a6639 100755 Binary files a/precompiled/self.bin and b/precompiled/self.bin differ diff --git a/precompiled/sketch.bin b/precompiled/sketch.bin index df58077..3464b04 100755 Binary files a/precompiled/sketch.bin and b/precompiled/sketch.bin differ diff --git a/precompiled/zigalloc.bin b/precompiled/zigalloc.bin index b70669c..0422f5a 100755 Binary files a/precompiled/zigalloc.bin and b/precompiled/zigalloc.bin differ diff --git a/precompiled/zigdoom.bin b/precompiled/zigdoom.bin index 888f4a4..f7b59cc 100755 Binary files a/precompiled/zigdoom.bin and b/precompiled/zigdoom.bin differ diff --git a/precompiled/zigtris.bin b/precompiled/zigtris.bin index 385901b..a648f95 100755 Binary files a/precompiled/zigtris.bin and b/precompiled/zigtris.bin differ diff --git a/uvm32/uvm32.c b/uvm32/uvm32.c index b8a3844..24496c4 100644 --- a/uvm32/uvm32.c +++ b/uvm32/uvm32.c @@ -273,8 +273,8 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) case UVM32_SYSCALL_HALT: setStatus(vmst, UVM32_STATUS_ENDED); break; - case UVM32_SYSCALL_STACKPROTECT: { #ifdef UVM32_STACK_PROTECTION + case UVM32_SYSCALL_STACKPROTECT: { // don't allow errant code to change it once set if (vmst->_stack_canary == (uint8_t *)NULL) { uint32_t param0 = vmst->_core.regs[10]; // a0 @@ -295,8 +295,8 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) *vmst->_stack_canary = STACK_CANARY_VALUE; } } -#endif } break; +#endif default: // user defined syscalls vmst->_ioevt.typ = UVM32_EVT_SYSCALL;