Extending MADV_PROTECT

John Baldwin jhb at freebsd.org
Fri Jul 12 22:25:22 UTC 2013


On Friday, June 28, 2013 2:46:01 pm John Baldwin wrote:
> Ok, there isn't really a clear consensus here, but I need a system call to let
> me toggle this flag on existing processes.
> 
> One reason I don't like the procctl() approach is I am uneasy about forcing
> a certain behavior for how commands treat pgid (first-fail vs best-effort).
> I guess it can always change in the future so that isn't completely unsolvable.
> 
> I guess I am fine just making it use hardcoded sizes instead of full-blown
> ioctl encoding.

Ok, I have updated patches for this for HEAD.  I have not yet implemented the
inheritance bits because I'm loathe to add the first bit to a p_flag2. :-P
However, if that's the best course of action I suppose we can do that.

The kernel patch is at www.freebsd.org/~jhb/patches/procctl.patch

The patch for the protect binary is at www.freebsd.org/~jhb/patches/protect.patch

-- 
John Baldwin


More information about the freebsd-arch mailing list