releasing the runq lock after loading page tables but before the actual
context switch can leave execution in an inconsistent if the current
process is descheduled from an IRQ between these two steps.
this patch holds the runq lock with IRQs disabled and makes the context
switch a single atomic operation.
Introduction of VR_WRITE_COMBINED, PTATTR_WRITE_COMBINED and modification
to the memobj's get_page() interface so that Linux communicates back mapping
flags (such as write-combined).
- change its argument from 'struct process *'
to 'struct process_vm *'.
- change its name from 'page_fault_process()'
to 'page_fault_process_vm()'.
- allow to resolve a fault on the process_vm of another process.
support PTRACE_SETREGS.
In struct process, add 'unsigned long *ptrace_debugreg', instead of 'struct user *userp'.
debug registers are read/written from/to ptrace_debugreg, save/restore in schedule().
most general registers are proc->uctx.
fs_base is proc->thread.tlsblock_base.
gs_base,ds,es,fs,gs and orig_rax are uncompleted.
other members in 'struct user' are ignored, same as Linux implementation.
refs #257
refs #373
refs #263
to start with a SIGSTOP, do not set proc->ftn->status to PS_RUNNING in __runq_add_proc().
change vfork() set CLONE_VFORK.
refs #266
refs #267
refs #372
support PTRACE_GETEVENTMSG.
to store ptrace event, add 'unsigned long ptrace_eventmsg;' member in struct fork_tree_node.
refs #273
Request pages, response pages, and a doorbell page are mapped into
process space to enable user processes to delegate system calls
directly to mcctrl/mcexec.
This commit removes these mappings for the following reasons.
- These mappings cause a memory leak in current fork() implementation.
- These mappings are not used.
- These mappings do not function properly.
And the fix which corrects function of these mappings is not easy.
* support "memdebug" mckernel option
* check buffer overrun when memory free and next mcexec run
* check double free
* check memory leak when next mcexec run