From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kggmq-0000gl-9t for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:16:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kggmo-0000fz-JC for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:16:43 -0400 Received: from [199.232.76.173] (port=57197 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kggmo-0000ft-BH for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:16:42 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]:42370) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kggmn-0006Y2-TJ for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:16:42 -0400 Received: by nf-out-0910.google.com with SMTP id b2so232198nfb.12 for ; Fri, 19 Sep 2008 07:16:41 -0700 (PDT) Date: Fri, 19 Sep 2008 17:17:14 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH] Add uselib syscall Message-ID: <20080919141713.GF5346@localhost.localdomain> References: <20080919133327.GA19898@kos.to> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aPdhxNJGSeOG9wFI" Content-Disposition: inline In-Reply-To: <20080919133327.GA19898@kos.to> 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 --aPdhxNJGSeOG9wFI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 19, 2008 at 04:33:27PM +0300, Riku Voipio wrote: >=20 > Signed-off-by: Riku Voipio > --- > linux-user/syscall.c | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) >=20 > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 6b38d8a..8b8262a 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -282,6 +282,7 @@ extern int flock(int, int); > extern int setfsuid(int); > extern int setfsgid(int); > extern int setgroups(int, gid_t *); > +extern int uselib(const char*); > =20 > #define ERRNO_TABLE_SIZE 1200 > =20 > @@ -4313,7 +4314,15 @@ abi_long do_syscall(void *cpu_env, int num, abi_lo= ng arg1, > #endif > #ifdef TARGET_NR_uselib > case TARGET_NR_uselib: > - goto unimplemented; > + { > + if(!(p =3D lock_user_string(arg1))) { > + ret =3D -TARGET_EFAULT; > + goto efault; > + } > + ret =3D get_errno(uselib(path(p))); > + unlock_user(p, arg1, 0); > + } > + break; > #endif > #ifdef TARGET_NR_swapon > case TARGET_NR_swapon: Looks good for me. Added to my patchset. > --=20 > 1.5.6.5 >=20 >=20 > --=20 > "rm -rf" only sounds scary if you don't have backups >=20 >=20 --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ --aPdhxNJGSeOG9wFI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkjTtGkACgkQbWYnhzC5v6pNxwCeItfsZDWpLSAs4SXQq8ZYTdrj x7IAmgIZ4Qvoe8RKxBg9PF8MDrZ83Jln =C1Rz -----END PGP SIGNATURE----- --aPdhxNJGSeOG9wFI--