From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzCrU-00061o-Fb for qemu-devel@nongnu.org; Mon, 23 Jun 2014 18:37:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzCrJ-000130-VI for qemu-devel@nongnu.org; Mon, 23 Jun 2014 18:37:16 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:43951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzCrJ-00012c-PJ for qemu-devel@nongnu.org; Mon, 23 Jun 2014 18:37:05 -0400 Received: by mail-wg0-f48.google.com with SMTP id n12so7184070wgh.7 for ; Mon, 23 Jun 2014 15:37:05 -0700 (PDT) Sender: Paul Burton Date: Mon, 23 Jun 2014 23:36:58 +0100 From: Paul Burton Message-ID: <20140623223658.GD4377@gmail.com> References: <1403559614-4096-1-git-send-email-paul@archlinuxmips.org> <20140623221825.GC4377@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline In-Reply-To: <20140623221825.GC4377@gmail.com> Subject: Re: [Qemu-devel] [PATCH] linux-user: fix ipc(SEMCTL, ...) argument handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Riku Voipio , QEMU Developers --wzJLGUyc3ArbnUjN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 23, 2014 at 11:18:25PM +0100, Paul Burton wrote: > > Also, VERIFY_READ doesn't seem right for some of the > > semctl operations which will modify the target_semun. > >=20 > > thanks > > -- PMM >=20 > That part I think you're right about, I'll switch to VERIFY_WRITE. Actually no, I don't think you're right about that afterall. The argument union itself is never modified. I imagine if it were then it would be painful in the case of the semctl syscall where the union is passed directly as an argument, rather than as a pointer as it is for the ipc syscall. What may be modified is the data pointed to by the pointers within union semun. That is already handled by do_semctl & the translate functions it calls. /me is not fond of this API... So anyway, I believe the patch is good as-is. Thanks, Paul --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTqKwKAAoJENzvn0paErs5MFsP/30tYs/G7YFebytagTkU6zcK h1WkUvOPWrwulTEuh5S8TRlo1AywzIhNYCQEvM3MeJ0qR0ojZxY1zViWcyxLcCw/ ONEPWMZwcnQhhXa6EQY11pq4FZpzb4NU6aouwueYRC4lYv2SUo8Mgrbrpsrfct4s yBOeuzXWsAwpIVJGKQUzUb3eG2Tz6jSQMhRrAPLlunjZsmhtGI1mPeov8znBGH7/ +zPL6MmvmbhABoEpa04TBkHnvX+07/unonhcXug852K3NHIKhP8U/exYCqOdenpx k1EnwYOxmKjG8MvuTMHFTPFTlwXXvUVRjilj2PCsAaCvuxeYhMVGE0r5dX0DvUIx eEnI+FRGt4phyXWqhCGxlsa/HMUdsgQd33cjOiVninWi9um3AAy8svxiWue+2Jrm DKbwjDiGsiYim5BC8GOmydfnSkAq3e9dQVJ42J9Zd2Ggakz1rGfv+Fo160YfJ4iy Z/mElb91StT+JhlDuLwMDWhBiKv4xEANOCBjBIxKk46j4M6nnB1FaD8fV3uAijV3 qMDi1XkENlc9fc4EiZouY3ssZSWmWXX8RPGm4o7GGjbmLjFrdXlR5l0XNNyxrFj0 eWJfuTDkF6xiYLPQYpaNSaHcCysAAmq45BjN1RvR8I16hR//VFyv0eUNUklF4Nq/ nVHWL+09vx3Y1ZOUN7x8 =KNZe -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN--