mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Add a stack canary, setup on boot
This commit is contained in:
parent
9596838a4b
commit
9baedb42e8
21 changed files with 61 additions and 16 deletions
|
|
@ -1,5 +1,6 @@
|
|||
// System provided UVM32_SYSCALLs, start at 0x10000000
|
||||
#define UVM32_SYSCALL_HALT 0x1000000
|
||||
#define UVM32_SYSCALL_YIELD 0x1000001
|
||||
#define UVM32_SYSCALL_HALT 0x1000000
|
||||
#define UVM32_SYSCALL_YIELD 0x1000001
|
||||
#define UVM32_SYSCALL_STACKPROTECT 0x1000002
|
||||
|
||||
#include "uvm32_common_custom.h"
|
||||
|
|
|
|||
|
|
@ -59,5 +59,11 @@ static uint32_t syscall(uint32_t id, uint32_t param1, uint32_t param2) {
|
|||
#define yield() syscall_cast(UVM32_SYSCALL_YIELD, 0, 0)
|
||||
#define printbuf(x, y) syscall_cast(UVM32_SYSCALL_PRINTBUF, x, y)
|
||||
|
||||
extern char _estack;
|
||||
|
||||
static void stackprotect(void) {
|
||||
syscall_cast(UVM32_SYSCALL_STACKPROTECT, &_estack, 0);
|
||||
}
|
||||
|
||||
#include "uvm32_common_custom.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue