Update syscall handling of invalid pointers by preloading pages using the helper try_fetch_page
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef USERPROG_EXCEPTION_H
|
||||
#define USERPROG_EXCEPTION_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* Page fault error code bits that describe the cause of the exception. */
|
||||
#define PF_P 0x1 /* 0: not-present page. 1: access rights violation. */
|
||||
#define PF_W 0x2 /* 0: read, 1: write. */
|
||||
@@ -8,5 +10,7 @@
|
||||
|
||||
void exception_init (void);
|
||||
void exception_print_stats (void);
|
||||
bool
|
||||
try_fetch_page (void *upage, bool write);
|
||||
|
||||
#endif /* userprog/exception.h */
|
||||
|
||||
Reference in New Issue
Block a user