1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel: Never validate access to the kmalloc memory range

Memory validation is used to verify that user syscalls are allowed to
access a given memory range. Ring 0 threads never make syscalls, and
so will never end up in validation anyway.

The reason we were allowing kmalloc memory accesses is because kernel
thread stacks used to be allocated in kmalloc memory. Since that's no
longer the case, we can stop making exceptions for kmalloc in the
validation code.
This commit is contained in:
Andreas Kling 2020-01-27 12:43:21 +01:00
parent 23ffd6c319
commit c1f74bf327
3 changed files with 2 additions and 27 deletions

View file

@ -39,8 +39,6 @@ void* krealloc(void*, size_t);
void kfree(void*);
void kfree_aligned(void*);
bool is_kmalloc_address(const void*);
extern volatile size_t sum_alloc;
extern volatile size_t sum_free;
extern volatile size_t kmalloc_sum_eternal;