. Allow drivers to to physcopy() (table.c)

. Also allow receive() to be done from kernel processes, not just
  sendrec(). This is because receive()s can't harm the kernel processes,
  but are done from the CLOCK task (without sendrec()).
This commit is contained in:
Ben Gras 2005-08-08 12:18:45 +00:00
parent 48469b737b
commit b293e689a9
2 changed files with 5 additions and 4 deletions

View file

@ -112,9 +112,10 @@ message *m_ptr; /* pointer to message in the caller's space */
* if the caller doesn't do receive().
*/
if (! (priv(caller_ptr)->s_trap_mask & (1 << function)) ||
(iskerneln(src_dst) && function != SENDREC)) {
kprintf("sys_call: trap not allowed, function %d, caller %d\n",
function, proc_nr(caller_ptr));
(iskerneln(src_dst) && function != SENDREC && function != RECEIVE)) {
kprintf("sys_call: trap not allowed, function %d, caller %d, mask %x, src_dst %d\n",
function, proc_nr(caller_ptr),
priv(caller_ptr)->s_trap_mask, src_dst);
return(ECALLDENIED); /* call denied by trap mask */
}

View file

@ -83,7 +83,7 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)];
#define FS_C (c(SYS_KILL) | c(SYS_VIRCOPY) | c(SYS_VIRVCOPY) | c(SYS_UMAP) \
| c(SYS_GETINFO) | c(SYS_EXIT) | c(SYS_TIMES) | c(SYS_SETALARM))
#define DRV_C (FS_C | c(SYS_SEGCTL) | c(SYS_IRQCTL) | c(SYS_INT86) \
| c(SYS_DEVIO) | c(SYS_VDEVIO) | c(SYS_SDEVIO))
| c(SYS_DEVIO) | c(SYS_VDEVIO) | c(SYS_SDEVIO) | c(SYS_PHYSCOPY) | c(SYS_PHYSVCOPY))
/* The system image table lists all programs that are part of the boot image.
* The order of the entries here MUST agree with the order of the programs