kernel: Define a constant to check for default memory access
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
b25e212880
commit
72dadc6706
@ -276,7 +276,8 @@ namespace CPU
|
|||||||
static void backtrace_impl(u64 base_pointer, void (*callback)(u64, void*), void* arg)
|
static void backtrace_impl(u64 base_pointer, void (*callback)(u64, void*), void* arg)
|
||||||
{
|
{
|
||||||
StackFrame* current_frame = (StackFrame*)base_pointer;
|
StackFrame* current_frame = (StackFrame*)base_pointer;
|
||||||
while (current_frame && MemoryManager::validate_access(current_frame, sizeof(*current_frame), 0) &&
|
while (current_frame &&
|
||||||
|
MemoryManager::validate_access(current_frame, sizeof(*current_frame), MemoryManager::DEFAULT_ACCESS) &&
|
||||||
current_frame->instruction)
|
current_frame->instruction)
|
||||||
{
|
{
|
||||||
callback(current_frame->instruction, arg);
|
callback(current_frame->instruction, arg);
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
namespace MemoryManager
|
namespace MemoryManager
|
||||||
{
|
{
|
||||||
|
constexpr int DEFAULT_ACCESS = 0;
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
Result<void> protect_kernel_sections();
|
Result<void> protect_kernel_sections();
|
||||||
|
Loading…
Reference in New Issue
Block a user