From owner-freebsd-virtualization@FreeBSD.ORG Sun Apr 13 15:08:42 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0967347; Sun, 13 Apr 2014 15:08:42 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1689C1717; Sun, 13 Apr 2014 15:08:41 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id ec20so4963593lab.11 for ; Sun, 13 Apr 2014 08:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=SDf6FT3Uqtk1gsG0d/BCGTOKA7g+BkAKI5V+yeehPDg=; b=Z7a+kHDSEQOg72eQX1k1hiWuqUvuFmiftzDkMdYAMWiuzEbw8Wu7IZDyQ5KSjf0QLR oZ3/b5dt0YLy/FEQjAvMDamulsqqUqSRg8tmf/AJ8cUbUWHGKJlg15vriHcWvSAdeoLJ kC1T+JHJCZeQjzy4WK5fI9iehwxBr2o1HyhhbVYaalNPVmFgHyqYYMa43DBuNOPNi5qz adekZD7u5eDQ5C6LHA5LxINv1fjiO+m1M+gfjoy1FTFp+muv1bGFNH8WctjiN+Psp+th oaSvML0nZHris/bfV0LP+0eyrI2X1sfQsb8uXcqx/bC+jprWO+8j7IdUo+/OySm0WoZY 18RQ== X-Received: by 10.152.197.98 with SMTP id it2mr42359lac.53.1397401719974; Sun, 13 Apr 2014 08:08:39 -0700 (PDT) Received: from kloomba ([95.104.136.90]) by mx.google.com with ESMTPSA id kz7sm13136530lab.16.2014.04.13.08.08.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Apr 2014 08:08:38 -0700 (PDT) Sender: Roman Bogorodskiy Date: Sun, 13 Apr 2014 19:08:24 +0400 From: Roman Bogorodskiy To: Peter Grehan Subject: Re: bhyve: allow specifiying tty by fd Message-ID: <20140413150823.GB99234@kloomba> References: <20140305130030.GA40560@dev.san.ru> <5318BF7F.4060306@freebsd.org> <20140409172657.GB1313@kloomba> <534584FE.60807@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pvezYHf7grwyp3Bc" Content-Disposition: inline In-Reply-To: <534584FE.60807@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 15:08:42 -0000 --pvezYHf7grwyp3Bc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter Grehan wrote: > Hi Roman, >=20 > >>> bhyve -s 31,lpc -l com1,fd=3D19 vm0 > >> > >> Yes, useful idea, and will become more relevant in the capsicum wor= ld > >> of passing fd's to a sandboxed bhyve. > >> > >> Thanks: I'll get this submitted. > > > > Hi Peter! > > > > Any news on that? >=20 > I started to do it, and then hesitated bit for two reasons. First,=20 > it's useful for all backends, but there still needs to be a type - file= =20 > descriptors can't be treated as something opaque: there still needs to=20 > be knowledge of whether it's a socket, char device, file etc, so the=20 > option may need additional information to describe that. Could it be an additional comma separated option? E.g.: -l com1,fd=3D42,sock or -l com1,fd=3D42,tty etc > Also, given that Capsicum wants to pass fd's as parameters, I was=20 > wondering if there is a general syntax style for doing this. "fd=3D%d"=20 > seems Ok, though it would be useful if there was something in libutil to= =20 > parse an option like this if it is the preferred way forward for FreeBSD= =20 > executables. >=20 > What do folk think ? Any useful precedents ? Off the top of my head I cannot recall such an example in the tree. Roman Bogorodskiy --pvezYHf7grwyp3Bc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJTSqhnAAoJEMltX/4IwiJqWe0H/Raut30Kmj1/JSCqOtDc/U7b 3sYIS0df9VfRhlAI4kpnhM+4A6AHZ8+EW5hZuDPB36xeDnmkm3OtJVvWpMlG26yz N9JZwcLuL61Sf3wLK5D8jLRqlvf6vdEdZd1YlcycumVLuS1/IPvURwN5WaER8xNT AoSnpOesrrIfWnWD3GNxmur+tfAjRXD6DFhZ+qddTFI/TMO8rtQCIgrsH09lXrMK dA6CwIurHNnr5ZG4j3kqf3mPyw6Agsqb9u5rib+YmvKqsn0wxDvAzP7xieZOHRnz nsBTQsBdRNwBpeZLTWpVOarrpPG4ED81YdOVlDmFBidgLd6vppHDO5R+oEe1sIA= =+Ll3 -----END PGP SIGNATURE----- --pvezYHf7grwyp3Bc--