minix/servers/vm/vmproc.h
David van Moolenbroek 78d707cd26 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
2013-08-08 23:22:58 +02:00

40 lines
859 B
C

#ifndef _VMPROC_H
#define _VMPROC_H 1
#include <minix/bitmap.h>
#include <machine/archtypes.h>
#include "pt.h"
#include "vm.h"
#include "regionavl.h"
struct vmproc;
struct vmproc {
int vm_flags;
endpoint_t vm_endpoint;
pt_t vm_pt; /* page table data */
struct boot_image *vm_boot; /* if boot time process */
/* Regions in virtual address space. */
region_avl vm_regions_avl;
vir_bytes vm_region_top; /* highest vaddr last inserted */
int vm_acl;
int vm_slot; /* process table slot */
#if VMSTATS
int vm_bytecopies;
#endif
vir_bytes vm_total;
vir_bytes vm_total_max;
u64_t vm_minor_page_fault;
u64_t vm_major_page_fault;
};
/* Bits for vm_flags */
#define VMF_INUSE 0x001 /* slot contains a process */
#define VMF_EXITING 0x002 /* PM is cleaning up this process */
#define VMF_WATCHEXIT 0x008 /* Store in queryexit table */
#endif