diff options
author | dzwdz | 2021-08-24 19:05:46 +0200 |
---|---|---|
committer | dzwdz | 2021-08-24 19:05:46 +0200 |
commit | b988b821372466ed58eb1d2116bcbb158f70346c (patch) | |
tree | 669bb9331082848277031632e818e8293fb6e44c /src/kernel/types.h | |
parent | 04878a07e587f26fe6d5a1044b69651406e3aa1c (diff) |
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
Diffstat (limited to 'src/kernel/types.h')
-rw-r--r-- | src/kernel/types.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 <stdint.h> +typedef uintptr_t user_ptr; |