From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KggcU-0005oM-7E for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:06:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KggcS-0005o6-Nh for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:06:01 -0400 Received: from [199.232.76.173] (port=57089 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KggcS-0005o3-K9 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:06:00 -0400 Received: from nf-out-0910.google.com ([64.233.182.185]:38867) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KggcS-0003RO-Ba for qemu-devel@nongnu.org; Fri, 19 Sep 2008 10:06:00 -0400 Received: by nf-out-0910.google.com with SMTP id b2so229124nfb.12 for ; Fri, 19 Sep 2008 07:05:59 -0700 (PDT) Date: Fri, 19 Sep 2008 17:06:45 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH] Add mincore syscall Message-ID: <20080919140644.GD5346@localhost.localdomain> References: <20080919133318.GA19882@kos.to> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="osDK9TLjxFScVI/L" Content-Disposition: inline In-Reply-To: <20080919133318.GA19882@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 --osDK9TLjxFScVI/L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 19, 2008 at 04:33:18PM +0300, Riku Voipio wrote: >=20 > Signed-off-by: Riku Voipio > --- > linux-user/syscall.c | 14 +++++++++++++- > 1 files changed, 13 insertions(+), 1 deletions(-) >=20 > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 8e6e735..cb75c94 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -5574,7 +5574,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_lo= ng arg1, > goto unimplemented; > #ifdef TARGET_NR_mincore > case TARGET_NR_mincore: > - goto unimplemented; > + { > + void *a; > + ret =3D -TARGET_EFAULT; > + if (!(a =3D lock_user(VERIFY_READ, arg1,arg2, 0))) > + goto efault; > + if (!(p =3D lock_user_string(arg3))) > + goto mincore_fail; > + ret =3D get_errno(mincore(a, arg2, p)); > + unlock_user(p, arg3, ret); > + mincore_fail: > + unlock_user(a, arg1, 0); > + } > + break; > #endif > #ifdef TARGET_NR_fadvise64_64 > case TARGET_NR_fadvise64_64: Looks good for me. Added to my patchset. --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ --osDK9TLjxFScVI/L 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) iEYEARECAAYFAkjTsfQACgkQbWYnhzC5v6qZ5ACgjeA980KdtE6+yme5zdYGlUIp YxQAnjXjpHMmCSLY+pmN+KqKttOE4T+9 =yDIM -----END PGP SIGNATURE----- --osDK9TLjxFScVI/L--