Extending MADV_PROTECT

Konstantin Belousov kostikbel at gmail.com
Sat May 11 04:36:15 UTC 2013


On Fri, May 10, 2013 at 03:35:50PM -0400, John Baldwin wrote:
> Ok, here is a patch for 8 that reworks this to use a procctl().  If this looks
> reasonable I will port this to HEAD as two pieces: the first to add
> procctl() and the second to add PROCSPROTECT.

This looks fine.

Do we need the genericity of the ioctl for procctl ?
Ptrace(2) does not need the size encoded.

I mean, the call is never marshalled to some unknown driver which needs
a size of parameters unknown to the generic layer. I suppose that all
additions to procctl() would have the size of the control structures
pre-defined. Then, you could just do copyin and, if needed, copyout
discrimating on the command code, and not on the encoding of the size in
the command.

Also, command could be int and not long then, eliminating the need for
compat32 wrapper.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130511/4ac9615d/attachment.sig>


More information about the freebsd-arch mailing list