From owner-freebsd-xen@FreeBSD.ORG Tue Dec 4 21:03:07 2012 Return-Path: Delivered-To: xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25484EA2 for ; Tue, 4 Dec 2012 21:03:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 855B58FC0C for ; Tue, 4 Dec 2012 21:03:06 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qB4L2tnF019951 for ; Tue, 4 Dec 2012 23:02:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qB4L2tnF019951 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qB4L2tbV019950 for xen@freebsd.org; Tue, 4 Dec 2012 23:02:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 4 Dec 2012 23:02:55 +0200 From: Konstantin Belousov To: xen@freebsd.org Subject: Call for testers: vfork(2) repair for Xen Message-ID: <20121204210255.GS3013@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jF32gZOFbnzmk3b4" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 21:03:07 -0000 --jF32gZOFbnzmk3b4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, there is plain erronous special case for Xen in the handling of vfork(2) syscall, which converts it into the fork(2), but only on Xen. I think this was a bug to commit the change in the course of importing Xen support at al= l. Could somebody of you, who use paravirtualized kernels, test the patch below. After the patched kernel is booted, just running csh(1) and calling any external command from it, e.g. ls(1), is enough. I already tried to solicit the testing of the fix in private, but nobody responded. I am going to commit the change in a week, unless somebody report a real issue with Xen pmap, uncovered by it. diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index b8a4825..0d2709f 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -150,11 +150,7 @@ sys_vfork(struct thread *td, struct vfork_args *uap) int error, flags; struct proc *p2; =20 -#ifdef XEN - flags =3D RFFDG | RFPROC; /* validate that this is still an issue */ -#else flags =3D RFFDG | RFPROC | RFPPWAIT | RFMEM; -#endif =09 error =3D fork1(td, flags, 0, &p2, NULL, 0); if (error =3D=3D 0) { td->td_retval[0] =3D p2->p_pid; --jF32gZOFbnzmk3b4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQvmT+AAoJEJDCuSvBvK1BSJ4P/A1tLbh5f2lG1rJZ18N43QF1 tB80M1jCkM0HFByLuzlZiDmQ1ewSLIhOPChBbCc6HwV5TaqHIm5wZFb0s9KaAjpz 9Hzx9GUGzMaBS0/4/WaK4yAdz3vDx3sPenSeyldOn5VM7Y8twPBOzvN2Cd8nZwMQ IKwKSy7KycBop5jdlEw6LA4HDV5XZNCDgqjolBd0G8QCZroxiI/Wv9aB5npOH1Ia fsLiwUBus6kc8aY4MZqe9J+SzXN7g3WK0/ZXtpzQx5KUxPFgGdXopscQq1CTfhbs X6L4eGMJHP27qaDp3x1B/v+kYX61gujiLNA9sMJcbqs6rgpricjnC1VAbgto/3l4 cLHGPFSPWOmyi5LeEHr6qXyGhZ4LJahufrsUQeYUYCl71W2NrJC9saOaMqlzkTl/ lL1MJcw05d0vMXDrhPwVKOs2weo54EeSZLOjTFZDebKqPBNi5zQHFQ77Mj8r14WN LXBTN4bsV1Xzyj4guI3EZMy0PE/kh61k02F+V4TF0rH4HvOKVQ41lTRVmueXY5Tc pB/AhrpM0EOM54Qizb4VrkJf2iAw7+6LBxYGn3CYLY11+qWbvxn+0i8ieHFdT1oO DtS1sdWfOHmgL0paW7tMp6bRs/tFSyQMiFfCJsD10gefGvlJ44vQSo8LtRhXA2Bd 3SpdVmSRJAJyRwvtKpeN =0Ts+ -----END PGP SIGNATURE----- --jF32gZOFbnzmk3b4--