Allow servers to run with fewer privileges:

- allow non-root processes to get their own endpoint
- make alloc_contig() call sys_umap() only when requested
This commit is contained in:
David van Moolenbroek
2009-12-02 10:06:58 +00:00
parent 30a7fe5fa9
commit f197bcb435
5 changed files with 11 additions and 7 deletions

View File

@@ -66,8 +66,8 @@ void *alloc_contig(size_t len, int flags, phys_bytes *phys)
buf += align - (buf % align);
}
/* Get physical address. */
if(sys_umap_data_fb(SELF, buf, len, phys) != OK)
/* Get physical address, if requested. */
if(phys != NULL && sys_umap_data_fb(SELF, buf, len, phys) != OK)
panic("alloc_contig.c", "sys_umap_data_fb failed", NO_NUM);
return (void *) buf;