From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzCZQ-0003QY-Kk for qemu-devel@nongnu.org; Mon, 23 Jun 2014 18:18:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzCZK-0003jP-Tk for qemu-devel@nongnu.org; Mon, 23 Jun 2014 18:18:36 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:37591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzCZK-0003jC-Mo for qemu-devel@nongnu.org; Mon, 23 Jun 2014 18:18:30 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi2so5006051wib.17 for ; Mon, 23 Jun 2014 15:18:29 -0700 (PDT) Sender: Paul Burton Date: Mon, 23 Jun 2014 23:18:25 +0100 From: Paul Burton Message-ID: <20140623221825.GC4377@gmail.com> References: <1403559614-4096-1-git-send-email-paul@archlinuxmips.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: 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 , Paul Burton --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 23, 2014 at 11:12:42PM +0100, Peter Maydell wrote: > On 23 June 2014 22:40, Paul Burton wrote: > > The ptr argument to the ipc syscall was incorrectly being used as the > > value of the argument union for the SEMCTL call. It is actually, as its > > name would suggest, a pointer to that union. >=20 > Have you checked this on other architectures than MIPS? > I have a vague recollection that there are between-arch > differences regarding handling of the semctl argument... I haven't tried running code for any other targets, but the pointer is dereferenced from generic code in Linux, see ipc/syscall.c: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/ipc/s= yscall.c#n39 =20 > Also, VERIFY_READ doesn't seem right for some of the > semctl operations which will modify the target_semun. >=20 > thanks > -- PMM That part I think you're right about, I'll switch to VERIFY_WRITE. Thanks, Paul --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJTqKexAAoJENzvn0paErs57kMQAKEy2PUJH6HoDjW+OZ5fTP7C vxiWhYKMO9o2LmndLX3LaVrvqLhH+W4JRyLgyNdsTMGUK5qYSsYoGmTHHFd08WOf IoJ+gI2VhfGPoKpuXbHseD66yydE0AFG7EiUpqyLjD0bZOs1EWuKe9QSjTHirXVa jc7AmlmuTAjtoqKCs4Ahix/oxDL/p1y+DJz7M0ej/I9vjN7g+3RvpV72N/LMBlt8 TukWHZ9Ss/HwW6I8S8dVEZFvBK1/gBifdgXwRL9UOJV1ZSagq3Ys+2Bd7MDiBpjc 5oNA7D+qgl8tx5rbbsnx5zQPC1fzEK7kWVM15IuVgbvqXcZHISXxgdiojmqA5K81 Dq0IHUE+mRtAWu4VQXQCBNtcWclAzQhAcddxr3jfHOGsok1uX0QxaqIwmIq+eVUL qPEr279P/iZckG4My22pS/N39fFSBtmASC6za7uoul6+Ffs7rhAnlHUabDoko/+q UZuWHGKxE3Sne0NEVcHo/WmNAtZ9mngUlmY4UmBdSiAojK1QjZ+j9AZC7mD+7Kp3 cobOmKXBlwamfp3AmrBkkoaRRC5bXKfHmmx4Nah8JKOUDXBu9ZsN7p3mbHiT2ZQC vg8JHr/N1J7U9Wl/Nubimu63EnmwEj9Rymkjmr7cg30XiZxEjoakMDUjy5unz49i xwZ94Pye/Ifo3bP7jzEz =l+Mb -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--