From ce98400f8a9ebd4e62e76b9e292b7598d0d66cc0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 2 Apr 2021 23:26:28 +0200 Subject: Added kernel section clear/protect after init This is a huge security improvement as it prevents potential exploits of using or modifying internal kernel functions or data. --- libs/libc/alloc.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libs/libc/alloc.c') diff --git a/libs/libc/alloc.c b/libs/libc/alloc.c index 02e30eb..2f8e0ba 100644 --- a/libs/libc/alloc.c +++ b/libs/libc/alloc.c @@ -2,7 +2,6 @@ // Mostly by Durand Miller, released into public domain #include -#include #include #ifdef KERNEL @@ -40,17 +39,13 @@ static int liballoc_free(void *ptr, u32 p) #endif -static u32 locked = 0; - static int liballoc_lock(void) { - spinlock(&locked); return 0; } static int liballoc_unlock(void) { - locked = 0; return 0; } -- cgit v1.2.3