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:
@@ -193,8 +193,6 @@ PUBLIC int do_kill()
|
||||
{
|
||||
/* Perform the kill(pid, signo) system call. */
|
||||
|
||||
DEBUG(m_in.pid == 11, printf("PM: detected do_kill PRINTER\n"));
|
||||
|
||||
return check_sig(m_in.pid, m_in.sig_nr);
|
||||
}
|
||||
|
||||
@@ -417,7 +415,6 @@ int signo; /* signal to send to process (1 to _NSIG) */
|
||||
}
|
||||
/* Some signals are ignored by default. */
|
||||
if (sigismember(&rmp->mp_ignore, signo)) {
|
||||
DEBUG(m_in.pid == 11, printf("PM: sig_proc ignored sig\n"));
|
||||
return;
|
||||
}
|
||||
if (sigismember(&rmp->mp_sigmask, signo)) {
|
||||
@@ -434,7 +431,6 @@ int signo; /* signal to send to process (1 to _NSIG) */
|
||||
|
||||
sigflags = rmp->mp_sigact[signo].sa_flags;
|
||||
if (sigismember(&rmp->mp_catch, signo)) {
|
||||
DEBUG(m_in.pid == 11, printf("PM: sig_proc catch sig!\n"));
|
||||
if (rmp->mp_flags & SIGSUSPENDED)
|
||||
sm.sm_mask = rmp->mp_sigmask2;
|
||||
else
|
||||
@@ -464,7 +460,6 @@ int signo; /* signal to send to process (1 to _NSIG) */
|
||||
rmp->mp_sigact[signo].sa_handler = SIG_DFL;
|
||||
}
|
||||
|
||||
DEBUG(m_in.pid == 11, printf("PM: sig_proc about to call sys_sigsend for %d \n",slot));
|
||||
if (OK == (s=sys_sigsend(slot, &sm))) {
|
||||
|
||||
sigdelset(&rmp->mp_sigpending, signo);
|
||||
@@ -483,7 +478,6 @@ int signo; /* signal to send to process (1 to _NSIG) */
|
||||
}
|
||||
|
||||
doterminate:
|
||||
DEBUG(m_in.pid == 11, printf("PM: sig_proc doterminate\n"));
|
||||
/* Signal should not or cannot be caught. Take default action. */
|
||||
if (sigismember(&ign_sset, signo)) return;
|
||||
|
||||
@@ -499,7 +493,6 @@ doterminate:
|
||||
tell_fs(CHDIR, slot, FALSE, 0);
|
||||
dump_core(rmp);
|
||||
}
|
||||
DEBUG(m_in.pid == 11, printf("PM: about to exit proc\n"));
|
||||
mm_exit(rmp, 0); /* terminate process */
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ _PROTOTYPE (int (*call_vec[NCALLS]), (void) ) = {
|
||||
do_reboot, /* 76 = reboot */
|
||||
do_svrctl, /* 77 = svrctl */
|
||||
|
||||
no_sys, /* 78 = cmostime */
|
||||
no_sys, /* 78 = unused */
|
||||
do_getsysinfo, /* 79 = getsysinfo */
|
||||
do_getprocnr, /* 80 = getprocnr */
|
||||
no_sys, /* 81 = unused */
|
||||
|
||||
Reference in New Issue
Block a user