2d72cbec41
. add cpufeature detection of both . use it for both ipc and kernelcall traps, using a register for call number . SYSENTER/SYSCALL does not save any context, therefore userland has to save it . to accomodate multiple kernel entry/exit types, the entry type is recorded in the process struct. hitherto all types were interrupt (soft int, exception, hard int); now SYSENTER/SYSCALL is new, with the difference that context is not fully restored from proc struct when running the process again. this can't be done as some information is missing. . complication: cases in which the kernel has to fully change process context (i.e. sigreturn). in that case the exit type is changed from SYSENTER/SYSEXIT to soft-int (i.e. iret) and context is fully restored from the proc struct. this does mean the PC and SP must change, as the sysenter/sysexit userland code will otherwise try to restore its own context. this is true in the sigreturn case. . override all usage by setting libc_ipc=1
20 lines
427 B
CFEngine3
20 lines
427 B
CFEngine3
|
|
include "kernel.h"
|
|
|
|
struct proc
|
|
member DIREG p_reg.di
|
|
member SIREG p_reg.si
|
|
member BPREG p_reg.fp
|
|
member STREG p_reg.st
|
|
member BXREG p_reg.bx
|
|
member DXREG p_reg.dx
|
|
member CXREG p_reg.cx
|
|
member AXREG p_reg.retreg
|
|
member RETADR p_reg.retadr
|
|
member PCREG p_reg.pc
|
|
member CSREG p_reg.cs
|
|
member PSWREG p_reg.psw
|
|
member SPREG p_reg.sp
|
|
member P_CR3 p_seg.p_cr3
|
|
member P_KERN_TRAP_STYLE p_seg.p_kern_trap_style
|
|
member P_MAGIC p_magic
|