SAFECOPYTO # 32
GETINFO
SETGRANT # 34
- UMAP # 14
PROFBUF # 38
SYSCTL
;
#define STATICINIT(v, n) \
if(!(v)) { \
- phys_bytes myph; \
- if(!((v) = alloc_contig(sizeof(*(v)) * (n), 0, &myph))) { \
+ if(!((v) = alloc_contig(sizeof(*(v)) * (n), 0, NULL))) { \
panic(__FILE__, "allocating " #v " failed", n); \
} \
}
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;
if ((bp = front) == NIL_BUF) panic(__FILE__,"all buffers in use", NR_BUFS);
if(bp->b_bytes < fs_block_size) {
- phys_bytes ph;
ASSERT(!bp->bp);
ASSERT(bp->b_bytes == 0);
- if(!(bp->bp = alloc_contig(fs_block_size, 0, &ph))) {
+ if(!(bp->bp = alloc_contig(fs_block_size, 0, NULL))) {
printf("MFS: couldn't allocate a new block.\n");
for(bp = front;
bp && bp->b_bytes < fs_block_size; bp = bp->b_next)
/* This call should be moved to DS. */
if (mp->mp_effuid != 0)
{
+ /* For now, allow non-root processes to request their own endpoint. */
+ if (m_in.pid < 0 && m_in.namelen == 0) {
+ mp->mp_reply.PM_ENDPT = who_e;
+ mp->mp_reply.PM_PENDPT = NONE;
+ return OK;
+ }
+
printf("PM: unauthorized call of do_getprocnr by proc %d\n",
mp->mp_endpoint);
sys_sysctl_stacktrace(mp->mp_endpoint);