From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HGKRZ-0004nd-85 for qemu-devel@nongnu.org; Sun, 11 Feb 2007 14:33:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HGKRY-0004nR-Qj for qemu-devel@nongnu.org; Sun, 11 Feb 2007 14:33:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HGKRY-0004nO-Ki for qemu-devel@nongnu.org; Sun, 11 Feb 2007 14:33:00 -0500 Received: from mm-110-150-57-86.adsl.mgts.by ([86.57.150.110] helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HGKRX-00058B-TG for qemu-devel@nongnu.org; Sun, 11 Feb 2007 14:33:00 -0500 Date: Sun, 11 Feb 2007 21:33:00 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] qemu/linux-user syscall.c Message-ID: <20070211183300.GA3012@localhost.localdomain> References: <200702111835.37521.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Rgf3q3z9SdmXC6oT" Content-Disposition: inline In-Reply-To: <200702111835.37521.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Rgf3q3z9SdmXC6oT Content-Type: multipart/mixed; boundary="C1iGAkRnbeBonpVg" Content-Disposition: inline --C1iGAkRnbeBonpVg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On [Sun, 11.02.2007 18:35], Paul Brook wrote: > On Sunday 11 February 2007 18:26, Thiemo Seufer wrote: > > CVSROOT: /sources/qemu > > Module name: qemu > > Changes by: Thiemo Seufer 07/02/11 18:26:54 > > > > Modified files: > > linux-user : syscall.c > > > > Log message: > > Linux userland emulation of syslog, from Debian patchset. > > > > CVSWeb URLs: > > http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot= =3Dqemu& > >r1=3D1.83&r2=3D1.84 >=20 > > ret =3D get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3)); >=20 > This is wrong. It should use lock_user_string or similar. Please fix or= =20 > revert. Patch in the attachment. Imported only two syscall from Debian patchset. What about others(mount, mount, uselib, mincore, clock_gettime)? Should I split it in several patches? --C1iGAkRnbeBonpVg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="syslog.patch" Content-Transfer-Encoding: quoted-printable Index: linux-user/syscall.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/qemu/qemu/linux-user/syscall.c,v retrieving revision 1.85 diff -u -r1.85 syscall.c --- linux-user/syscall.c 11 Feb 2007 18:36:44 -0000 1.85 +++ linux-user/syscall.c 11 Feb 2007 19:23:28 -0000 @@ -2952,7 +2952,9 @@ #endif =20 case TARGET_NR_syslog: - ret =3D get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3)); + p =3D lock_user_string(arg2); + ret =3D get_errno(sys_syslog((int)arg1, p, (int)arg3)); + unlock_user(p, arg2, 0); break; =20 case TARGET_NR_setitimer: --C1iGAkRnbeBonpVg-- --Rgf3q3z9SdmXC6oT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFz2FcbWYnhzC5v6oRAtlKAJ9oO10vvQ/PDBy1oZrSJQ3adODLPACdH+7X XSDBMsdadhwkkc7tEK5Ghyg= =H0jF -----END PGP SIGNATURE----- --Rgf3q3z9SdmXC6oT--