[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] limited support for non-root mlock()
From: |
Justus Winter |
Subject: |
Re: [PATCH] limited support for non-root mlock() |
Date: |
Thu, 09 Jul 2015 13:25:30 +0200 |
User-agent: |
alot/0.3.5 |
Quoting Samuel Thibault (2015-07-08 18:22:56)
> Justus Winter, le Wed 08 Jul 2015 16:22:28 +0200, a écrit :
> > 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.
>
> Ok, so it'd look like this?
Yes, I think that looks much nicer.
Nitpick: The documentation now says "[The function returns]
KERN_INVALID_HOST if host was not the privileged host port", maybe
just "... was not a valid host port".
> (I can't reuse the intran, since the obtained host_t is the same in
> non-priv and priv cases).
Ah, I didn't know that. But your solution looks reasonable to me.
Cheers,
Justus