[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proxy memory objects patch

From: Roland McGrath
Subject: Re: proxy memory objects patch
Date: Tue, 3 Dec 2002 17:18:56 -0500 (EST)

> One variant that seems feasible is to simply specify the protection that
> should apply to all ranges in all objects:
> create_proxy (..., memory_object_t object[], vm_prot_t maxprot,
>               vm_size_t start[], vm_size_t end[]);

I think that is fine, and keeps it simpler for users.  I can't think of a
real-world use that would want different protections in different regions,
and of course you can always do "layered" proxy creations to get that effect.

The crucial parameter you missed is the offset.  Each [start_i,end_i) in
the result corresponds to object_i at some offset, which the caller must be
able to specify arbitrarily.  It would be more consistent with other
Mach interfaces for the args to be vm_offset_t start[], vm_size_t len[].

Also, it seems worthwhile to make it possible to have a hole.  Maybe you
intended that but didn't say.  e.g. an object[i] that is MACH_PORT_NULL
means a hole at start[i].

In general I don't think the kernel should do a lot of work to make the
interface easier for the caller, but the other way around.  So special
cases for the last element and so forth are questionable.  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]