On Sun, Oct 17, 2021 at 6:41 PM Joan Lledó <jlle...@mailfence.com> wrote: > Why the "size" parameter? I'd rather see a new wrapper for > memory_object_create_proxy() which receives the same params but with the > address instead of the original pager, which internally gets the pager > from the address and calls memory_object_create_proxy().
Well, memory_object_create_proxy () also has a size parameter (named len; also it has a wrong type, should be vm_size_array_t, not vm_offset_array_t). In the case of vm_task-backed proxy, it's important to limit how much of your memory you want to expose through the proxy. You don't want to expose *all* of your task's memory starting at an address; you want a region, defined by an (address, size) pair. > After all, the > only reason why I need the pager is to send it to > memory_object_create_proxy() at netfs_impl.c:617 [1]. So why not skip > one step? Yes, it'd be nicer if you don't have to create another proxy of the proxy. Sergey