VM: support for shared call mask ACLs

The VM server now manages its call masks such that all user processes
share the same call mask. As a result, an update for the call mask of
any user process will apply to all user processes. This is similar to
the privilege infrastructure employed by the kernel, and may serve as
a template for similar fine-grained restrictions in other servers.

Concretely, this patch fixes the problem of "service edit init" not
applying the given VM call mask to user processes started from RC
scripts during system startup.

In addition, this patch makes RS set a proper VM call mask for each
recovery script it spawns.

Change-Id: I520a30d85a0d3f3502d2b158293a2258825358cf
This commit is contained in:
David van Moolenbroek
2013-08-07 22:03:47 +02:00
committed by Gerrit Code Review
parent c19c805d3b
commit 78d707cd26
16 changed files with 170 additions and 36 deletions

View File

@@ -1,11 +1,12 @@
#include <lib.h>
#include <unistd.h>
int vm_set_priv(int nr, void *buf)
int vm_set_priv(endpoint_t ep, void *buf, int sys_proc)
{
message m;
m.VM_RS_NR = nr;
m.VM_RS_NR = ep;
m.VM_RS_BUF = (long) buf;
m.VM_RS_SYS = sys_proc;
return _syscall(VM_PROC_NR, VM_RS_SET_PRIV, &m);
}