User pointer validity checks.

Added routines that check whether a user pointer is accessible by the kernel,
and if not ask the pager to map-in those pages. I haven't implemented yet the
bit that asks the pager for paging-in.
This commit is contained in:
Bahadir Balban
2008-02-05 15:41:14 +00:00
parent 3a07ae70fd
commit a82cdd3456
8 changed files with 155 additions and 72 deletions

View File

@@ -1,7 +1,7 @@
/*
* Debug print support for unexpected exceptions
* Memory exception handling in process context.
*
* Copyright (C) 2007 Bahadir Balban
* Copyright (C) 2007, 2008 Bahadir Balban
*/
#include <l4/generic/scheduler.h>
#include <l4/generic/space.h>
@@ -62,11 +62,19 @@ void fault_ipc_to_pager(u32 faulty_pc, u32 fsr, u32 far)
ipc_sendrecv(current->pagerid, current->pagerid);
/*
* Pager is now notified and handling the fault. We now sleep on
* another queue.
* FIXME: CHECK TASK KILL REPLY !!!
* Here, pager has handled the request and sent us back a message.
* It is natural that a pager might want to kill the task due to
* illegal access. Here we ought to check this and kill it rather
* than return back to it.
*/
}
int pager_pagein_request(unsigned long addr, unsigned long size, unsigned int flags)
{
return 0;
}
int check_aborts(u32 faulted_pc, u32 fsr, u32 far)
{
int ret = 0;