atomicity fix when enabling paging
- before enabling paging VM asks kernel to resize its segments. This may cause kernel to segfault if APIC is used and an interrupt happens between this and paging enabled. As these are 2 separate vmctl calls it is not atomic. This patch fixes this problem. VM does not ask kernel to resize the segments in a separate call anymore. The new segments limit is part of the "enable paging" call. It generalizes this call in such a way that more information can be passed as need be or the information may be completely different if another architecture requires this.
This commit is contained in:
@@ -173,7 +173,7 @@ _PROTOTYPE( void arch_do_syscall, (struct proc *proc) );
|
||||
_PROTOTYPE( int arch_phys_map, (int index, phys_bytes *addr,
|
||||
phys_bytes *len, int *flags));
|
||||
_PROTOTYPE( int arch_phys_map_reply, (int index, vir_bytes addr));
|
||||
_PROTOTYPE( int arch_enable_paging, (void));
|
||||
_PROTOTYPE( int arch_enable_paging, (struct proc * caller, message * m_ptr));
|
||||
|
||||
_PROTOTYPE( int copy_msg_from_user, (struct proc * p, message * user_mbuf,
|
||||
message * dst));
|
||||
|
||||
Reference in New Issue
Block a user