From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HJAJ8-0007BX-6y for qemu-devel@nongnu.org; Mon, 19 Feb 2007 10:20:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HJAJ6-00079X-Pf for qemu-devel@nongnu.org; Mon, 19 Feb 2007 10:20:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJAJ6-00079H-DL for qemu-devel@nongnu.org; Mon, 19 Feb 2007 10:20:00 -0500 Received: from partizan.velesys.com ([213.184.230.195]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HJAJ5-0000mE-WF for qemu-devel@nongnu.org; Mon, 19 Feb 2007 10:20:00 -0500 Received: from localhost (partizan [10.0.0.24]) by partizan.velesys.com (paritzan.velesys.com) with ESMTP id 4E617D632C0 for ; Mon, 19 Feb 2007 17:22:03 +0200 (EET) Received: from partizan.velesys.com ([10.0.0.24]) by localhost (partizan.velesys.com [10.0.0.24]) (amavisd-new, port 10024) with ESMTP id OOBIiwX7khsF for ; Mon, 19 Feb 2007 17:22:01 +0200 (EET) Received: from localhost.localdomain (mm-110-150-57-86.adsl.mgts.by [86.57.150.110]) by partizan.velesys.com (paritzan.velesys.com) with ESMTP id 3986BD632D5 for ; Mon, 19 Feb 2007 17:22:01 +0200 (EET) Date: Mon, 19 Feb 2007 17:20:00 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH] syscall uselib Message-ID: <20070219142000.GI25556@localhost.localdomain> References: <20070219134407.GG25556@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vdqwC0msT4ilQ2it" Content-Disposition: inline In-Reply-To: <20070219134407.GG25556@localhost.localdomain> 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 --vdqwC0msT4ilQ2it Content-Type: multipart/mixed; boundary="AQNmCumFClRcGgHG" Content-Disposition: inline --AQNmCumFClRcGgHG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On [Mon, 19.02.2007 16:44], Kirill A. Shutemov wrote: > Fixed Debian patch in the attachment. uselib is deprecated, but I think it > should be implemented by qemu, because it's in the kernel yet. Sorry, attached. --AQNmCumFClRcGgHG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="31_syscall_uselib.patch" Content-Transfer-Encoding: quoted-printable --- linux-user/syscall.c.orig 2006-11-05 07:07:19.000000000 +0200 +++ linux-user/syscall.c 2006-11-05 07:07:25.000000000 +0200 @@ -173,6 +175,7 @@ extern int getresuid(uid_t *, uid_t *, u extern int setresgid(gid_t, gid_t, gid_t); extern int getresgid(gid_t *, gid_t *, gid_t *); extern int setgroups(int, gid_t *); +extern int uselib(const char*); =20 static inline long get_errno(long ret) { @@ -2742,7 +2745,11 @@ long do_syscall(void *cpu_env, int num,=20 } break; case TARGET_NR_uselib: - goto unimplemented; + p =3D lock_user_string(arg1); + ret =3D get_errno(uselib(path(p))); + unlock_user(p, arg1, 0); + break; + case TARGET_NR_swapon: p =3D lock_user_string(arg1); ret =3D get_errno(swapon(p, arg2)); --AQNmCumFClRcGgHG-- --vdqwC0msT4ilQ2it 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) iD8DBQFF2bIQbWYnhzC5v6oRApZbAJ9u1VPsYU1+JpU/zttFWo2NNgElDgCfeXYg trGEQ36ux5N3RxQXq3QN77o= =Ju4y -----END PGP SIGNATURE----- --vdqwC0msT4ilQ2it--