1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

Move kernel symbolication code out of init.cpp and into its own KSym files.

Also use a simple array of { dword, const char* } for the KSyms and put the
whole shebang in kmalloc_eternal() memory. This was a fugly source of
kmalloc perma-frag.
This commit is contained in:
Andreas Kling 2018-12-24 22:59:10 +01:00
parent 6a9fa3e41a
commit 503e32552c
7 changed files with 163 additions and 157 deletions

View file

@ -17,6 +17,7 @@
#include "Syscall.h"
#include "Scheduler.h"
#include "FIFO.h"
#include "KSyms.h"
//#define DEBUG_IO
//#define TASK_DEBUG
@ -1559,7 +1560,8 @@ bool Process::isValidAddressForKernel(LinearAddress laddr) const
// This code allows access outside of the known used address ranges to get caught.
InterruptDisabler disabler;
if (laddr.get() >= ksyms().first().address && laddr.get() <= ksyms().last().address)
// FIXME: What if we're indexing into the ksym with the highest address though?
if (laddr.get() >= ksym_lowest_address && laddr.get() <= ksym_highest_address)
return true;
if (is_kmalloc_address(laddr.asPtr()))
return true;