From b988b821372466ed58eb1d2116bcbb158f70346c Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 24 Aug 2021 19:05:46 +0200 Subject: switch to using user_ptr for pointers coming from userland this avoid accidental dereferences, and now it's easy to tell apart which pointers are safe to directly read and which aren't. cons: - const is completely discarded --- src/kernel/types.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/kernel/types.h (limited to 'src/kernel/types.h') diff --git a/src/kernel/types.h b/src/kernel/types.h new file mode 100644 index 0000000..eb12f08 --- /dev/null +++ b/src/kernel/types.h @@ -0,0 +1,3 @@ +#pragma once +#include +typedef uintptr_t user_ptr; -- cgit v1.2.3