summaryrefslogtreecommitdiff
path: root/kernel/arch/i386/mmu.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-03-14 13:09:59 +0100
committerAnton Kling <anton@kling.gg>2024-03-14 13:09:59 +0100
commit2e8b474d4219e7faaac3823e73c8d528c2698a37 (patch)
tree7d93b5fd220e8b703ba69f9b55122d15c9d619fb /kernel/arch/i386/mmu.c
parent051ac9f1941e8bc6ad87beccb61a2d53111ba8ea (diff)
random changes made
Diffstat (limited to 'kernel/arch/i386/mmu.c')
-rw-r--r--kernel/arch/i386/mmu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/arch/i386/mmu.c b/kernel/arch/i386/mmu.c
index 240c9ea..ad415a6 100644
--- a/kernel/arch/i386/mmu.c
+++ b/kernel/arch/i386/mmu.c
@@ -530,12 +530,12 @@ void move_stack(u32 new_stack_address, u32 size) {
// C strings have a unknown length so it does not makes sense to check
// for a size on the pointer. Instead we check whether the page it
// resides in is accessible to the user.
-void *is_valid_user_c_string(const char *ptr, size_t *size) {
+void *mmu_is_valid_user_c_string(const char *ptr, size_t *size) {
void *r = (void *)ptr;
size_t s = 0;
for (; ((u32)ptr - (u32)r) < 0x1000;) {
void *page = (void *)((uintptr_t)ptr & (uintptr_t)(~(PAGE_SIZE - 1)));
- if (!is_valid_userpointer(page, PAGE_SIZE)) {
+ if (!mmu_is_valid_userpointer(page, PAGE_SIZE)) {
return NULL;
}
if (!((uintptr_t)ptr & (PAGE_SIZE - 1))) {
@@ -556,7 +556,7 @@ void *is_valid_user_c_string(const char *ptr, size_t *size) {
return NULL;
}
-void *is_valid_userpointer(const void *ptr, size_t s) {
+void *mmu_is_valid_userpointer(const void *ptr, size_t s) {
uintptr_t t = (uintptr_t)ptr;
size_t num_pages = (uintptr_t)align_page((void *)s) / 0x1000;
for (size_t i = 0; i < num_pages; i++, t += 0x1000) {