From owner-freebsd-arch@FreeBSD.ORG Sat May 11 04:36:15 2013 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6CE58FA5; Sat, 11 May 2013 04:36:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id C97D486E; Sat, 11 May 2013 04:36:14 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r4B4a6C1089973; Sat, 11 May 2013 07:36:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r4B4a6C1089973 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r4B4a6ag089972; Sat, 11 May 2013 07:36:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 11 May 2013 07:36:06 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: Extending MADV_PROTECT Message-ID: <20130511043606.GE3047@kib.kiev.ua> References: <201305071433.27993.jhb@freebsd.org> <201305090814.52166.jhb@freebsd.org> <20130509123147.GT3047@kib.kiev.ua> <201305101535.50633.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZhyQ46P6+PZKtzF3" Content-Disposition: inline In-Reply-To: <201305101535.50633.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 May 2013 04:36:15 -0000 --ZhyQ46P6+PZKtzF3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --ZhyQ46P6+PZKtzF3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRjcq1AAoJEJDCuSvBvK1Ba/sP/i4BkyaYfh0CDfy0jNscG3Eh RDp8SOWgQkowHZP6hUNJWvcnJKcyuggXszesKKSQYvcBqeQ5Y/FqVEbNhDMV7URt qFBqMyQyCShLkzecpl7ylGOYEqhaFjtdTJp6RewXj1nCrCIna53jxSA6Z4nXbIVI VZgaPmNhd8OwyJJyVY2nGj+PYj4/9rou6qdnhqMdwoziYePSlT1RhB6mWkXqXwn1 N100Z808I9norcWjpl19SGPt+rUQvmRSCWFLkWi9KByfkZS1d6TGnNA4krqGqKuY FaamswCi09nF7nsD8KHe+U8HinSXbaOMJkkL5i6pvNATkcFkAja4wU8V267i8Koo QdeiSFOFul8urwSPjyLCXia1PS6PaTwUFLhquVK1ew3uc0X/m8uh1L1oYxg2fDUS V378U3MhMfSPUlWvKdFXTWmjE0/UeEZoGFtQtvWn6+x4N939c4ZtDKf7zpnxv1aR wwNHaOgADLOJRQmaJNSVv7QVYQPMal4AmMKoZp/q+YiXVcy0FQFCof2TEkkOuORJ fMQ1CtY2i3J9GZhdvjIu2fKmwVTpGkOnNn64R91OZ58HkEnuGf3snOMwU17JQbRA fXwrtNpfGCU1ZUiLXTAuxHDkhpptNHl7JQiQrW4Ohm+v82SqxFf4P/oq1pHPtv9l DoXly/fKRlQfnTShxaVr =A8n/ -----END PGP SIGNATURE----- --ZhyQ46P6+PZKtzF3--