Added new routines that map and check the validity of user buffers.

mmap uses this mechanism to get arguments. It needs to be tested.
This commit is contained in:
Bahadir Balban
2008-11-03 11:27:10 +02:00
parent 87d1b91743
commit ca8959eee0
11 changed files with 131 additions and 59 deletions

12
tasks/mm0/include/user.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef __USER_H__
#define __USER_H__
#include <task.h>
int pager_validate_user_range(struct tcb *user, void *userptr, unsigned long size,
unsigned int vm_flags);
void *pager_validate_map_user_range(struct tcb *user, void *userptr,
unsigned long size, unsigned int vm_flags);
void pager_unmap_user_range(void *mapped_ptr, unsigned long size);
#endif /* __USER_H__ */