Hi :) Quoting Samuel Thibault (2015-07-08 15:55:33) > I have implemented a start of support for calling mlock() in a non-root > process, which I have attached.
Sweet. You talked about that in your FOSDEM talk, right? Ever since I thought that managing this in userspace is the better solution, then again, the implementation is simple enough. > I had to introduce a newer RPC since the existing vm_wire RPC is > done on the privileged host port. Alternatively, you could re-purpose the existing RPC `vm_wire', changing the type of its first argument from `host_priv_t' to `host_t' (this is backwards compatible as the privileged host control port is also a host port), and changing the behavior slightly depending on whether the user passed the priv port or a normal host port. > It for now allows 64KiB mlocked memory per task (the default Linux > value). Isn't a per-process limit rather pointless? I thought Linux limit is per-user. > Could somebody review it? (in particular on the name of the RPC) Looks good, modulo maybe what I wrote above wrt to just using `vm_wire'. Oh, and why did you chose `mach4.defs' to add a new RPC? I mean, it doesn't really matter, the Mach API isn't properly grouped into protocols, and there is just one huge dispatcher, but I thought we put new definitions into `gnumach.defs'. Cheers, Justus