Max OS 0.3
Loading...
Searching...
No Matches
kasan.h
Go to the documentation of this file.
1
9#ifndef MAXOS_RUNTIME_UBSAN_H
10#define MAXOS_RUNTIME_UBSAN_H
11
12#include <cstdint>
13#include <cstddef>
14
15namespace MaxOS::runtime {
16
24
25 public:
28
29 static void handle(bool write, uintptr_t address, size_t size, void* rip);
30
31 static void initialize();
32 static void poison_stack(uintptr_t address, size_t size);
33 static void unpoison_stack(uintptr_t address, size_t size);
34 };
35}
36
37
38#endif // MAXOS_RUNTIME_UBSAN_H
Handles kernel address sanitizer runtime errors.
Definition kasan.h:23
static void unpoison_stack(uintptr_t address, size_t size)
Marks a region of stack memory as unpoisoned (accessible)
Definition kasan.cpp:54
static void handle(bool write, uintptr_t address, size_t size, void *rip)
Handles a KASan error by panicking and printing the details.
Definition kasan.cpp:27
static void poison_stack(uintptr_t address, size_t size)
Marks a region of stack memory as poisoned (inaccessible)
Definition kasan.cpp:44
static void initialize()
Initializes the KASan handler by setting up the shadow memory.
Definition kasan.cpp:34