System call exercises

System calls and information leaks

The syscall_entry implementation can leak information from the kernel to an unprivileged process. Explain how, and explain whether and why this is a problem. (Can you find a reference online to a similar issue in Linux or another kernel?)

syscall registers

The syscall entry point saves most registers to a struct regstate. But is that really necessary? For instance, the callee-saved registers, such as %rbx and %r12, will be saved and restored by kernel C++ code automatically, since the C++ compiler uses the normal x86-64 calling convention. In other words, when proc::syscall returns to its caller, syscall_entry in k-exception.S, the callee-saved registers will have the same values that they did when syscall_entry began.

Are there any registers that syscall_entry need not save to struct regstate for Chickadee to work correctly? Run experiments to see, and explain the results.