summaryrefslogtreecommitdiff
path: root/src/kernel/proc.h
diff options
context:
space:
mode:
authordzwdz2021-08-24 19:05:46 +0200
committerdzwdz2021-08-24 19:05:46 +0200
commitb988b821372466ed58eb1d2116bcbb158f70346c (patch)
tree669bb9331082848277031632e818e8293fb6e44c /src/kernel/proc.h
parent04878a07e587f26fe6d5a1044b69651406e3aa1c (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/proc.h')
-rw-r--r--src/kernel/proc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index 87fed14..6de270b 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -11,7 +11,7 @@ enum process_state {
};
struct process {
- void *stack_top;
+ user_ptr stack_top;
struct pagedir *pages;
struct registers regs;
enum process_state state;
@@ -25,7 +25,7 @@ struct process {
// meaning changes depending on the state
// PS_DEAD - death message
// PS_WAITS4CHILDDEATH - buffer for said message
- void *saved_addr;
+ user_ptr saved_addr;
size_t saved_len;
struct vfs_mount *mount;