Re: [PATCH gnumach v1] Implement per task virtual memory limit

2024-12-25 Thread Sergey Bugaev
Merry Christmas :) On Tue, Dec 24, 2024 at 8:11 PM Diego Nieto Cid wrote: > * HOST_PORT must be the privileged host control port > * if the caller desires to increase the current max limit. > * > * On the other hand, if the max limit is being decreased, the >

Re: [PATCH gnumach v1] Implement per task virtual memory limit

2024-12-24 Thread Diego Nieto Cid
On Tue, Dec 24, 2024 at 02:11:07PM -0300, Diego Nieto Cid wrote: > > I've been expanding the comment in gnumach.defs: > > /* > * Set a task virtual memory limit parameters > * > * HOST_PORT must be the privileged host control port > * if the caller desires t

Re: [PATCH gnumach v1] Implement per task virtual memory limit

2024-12-24 Thread Diego Nieto Cid
On Tue, Dec 24, 2024 at 12:44:49PM +0300, Sergey Bugaev wrote: > > + ASSERT(err == KERN_SUCCESS, "cannot set VM limits"); > > There's ASSERT_RET, which also stringifies the error code. > Good, that's much better. > > + /* check limits are actually saved */ > > + err = vm_get_size_limit(mac

Re: [PATCH gnumach v1] Implement per task virtual memory limit

2024-12-24 Thread Sergey Bugaev
Getting really close :) On Mon, Dec 23, 2024 at 10:07 PM wrote: > + > +/* > + * Set a task virtual memory limit parameters > + */ > +routine vm_set_size_limit( > + host_port : mach_port_t; > + map : vm_task_t; > + current_limit : vm_size_t; > + max_limit

[PATCH gnumach v1] Implement per task virtual memory limit

2024-12-23 Thread dnietoc
From: Diego Nieto Cid This is the first iteration of the patch. I incorporated the suggestions made by Sergey is his review. I also used the implementation of the vm_set_size_limit based on the host port being the reciever of the RPC (that Sergey sent to the other thread). There remains a TODO