Check if kernel calls is allowed (from process' call mask) added. Not yet

enforced. If a call is denied, this will be kprinted. Please report any such
errors, so that I can adjust the mask before returning errors instead of
warnings.

Wrote CMOS driver. All CMOS code from FS has been removed. Currently the
driver only supports get time calls. Set time is left out as an exercise
for the book readers ... startup scripts were updated because the CMOS driver
is needed early on. (IS got same treatment.) Don't forget to run MAKEDEV cmos
in /dev/, otherwise the driver cannot be loaded.
This commit is contained in:
Jorrit Herder
2005-08-04 19:23:03 +00:00
parent b98eb4e144
commit 74711a3b14
33 changed files with 376 additions and 162 deletions

View File

@@ -112,7 +112,7 @@ message *m_ptr; /* pointer to message in the caller's space */
* kernel may only be SENDREC, because tasks always reply and may not block
* if the caller doesn't do receive().
*/
if (! (priv(caller_ptr)->s_call_mask & (1 << function)) ||
if (! (priv(caller_ptr)->s_trap_mask & (1 << function)) ||
(iskerneln(src_dst) && function != SENDREC))
return(ECALLDENIED);
@@ -141,7 +141,7 @@ message *m_ptr; /* pointer to message in the caller's space */
* that the destination is still alive.
*/
if (function & CHECK_DST) {
if (! get_sys_bit(priv(caller_ptr)->s_send_mask, nr_to_id(src_dst))) {
if (! get_sys_bit(priv(caller_ptr)->s_ipc_to, nr_to_id(src_dst))) {
kprintf("Warning, send_mask denied %d sending to %d\n",
proc_nr(caller_ptr), src_dst);
return(ECALLDENIED);