This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH resend] allow connecting to xenconsole from remot

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH resend] allow connecting to xenconsole from remote hosts
From: Muli Ben-Yehuda <muli@xxxxxxxxxx>
Date: Tue, 26 Sep 2006 21:50:12 +0300
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Anthony Liguori <anthony@xxxxxxxxxxxxx>, Orran Y Krieger <okrieg@xxxxxxxxxx>
Delivery-date: Tue, 26 Sep 2006 11:50:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C13F2554.1AB7%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060926160831.GA7129@xxxxxxxxxxxxxxxxxx> <C13F2554.1AB7%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Tue, Sep 26, 2006 at 06:43:32PM +0100, Keir Fraser wrote:
> On 26/9/06 17:08, "Muli Ben-Yehuda" <muli@xxxxxxxxxx> wrote:
> > I can certainly do that - in fact, that's what I started with. But
> > even the current xenconsole code suffers from the theoretical problem
> > mentioned above of writing to an fd without checking that it is
> > writable first. All it takes to exploit it is to run `xenconsole |
> > <socket>' and make the system run out of memory so that the socket is
> > temporarily not writable. Granted, if this happens you have bigger
> > problems, but why not do things right?
> I don't believe such a problem exists with the current console code.
> We only write() to the tty_fd if it is in the set of writefds after the
> select() call in handle_io().

Hmm? you're looking at the console daemon code and referring to the
pty between the console daemon and client. I'm talking about the
console client and referring the to other fd in use, which is either
stdin/stdout (tty mode) or a socket (--remote mode). Sorry if I wasn't
clear before - the buffering on the console client side isn't
necessary between the daemon and the client, it's necessary between
the client and the "outside world". The code buffers both fds since
it's simpler than special casing one of them.


Xen-devel mailing list