Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1793448ybb; Fri, 29 Mar 2019 11:26:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrOPM+jvjOF8lvj28lwhY46ILX70IiZcleKIdh44BSTi14YZ1nTB8LN+LWSPy+PidEwSDY X-Received: by 2002:a62:5789:: with SMTP id i9mr47426098pfj.75.1553884004385; Fri, 29 Mar 2019 11:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553884004; cv=none; d=google.com; s=arc-20160816; b=c/Oo/Qu/OWOMX2gDojeIjr4e9D3VFr9ZBBx2GyZx/kY8SSno0Gs+Zqrz9alacCqJaM lTYwu8gdQa/LrdhC0OfWqm5QuTJ+10JQHtzzVHlEp4WOyYjeV0PCvdfERL+6wgxYo9tE vzK4SxtJ8gJVzuPK43+Dy59npJUp9CyeZdaCruWmmu6IsbApC09m0uEFdZ99jAxrq6Lw zhTuD24yBmSvwTQOks+sBzoGWA1Y05X4eQMusxDUMiu9PUZ75Ko64v8SFht9xSUDcvPa RRAH1k9UEECiy6ifiQQgQl+Lzg8KPpHAos7qhREKOPDlaS8wLEBK8ONXFvTk/SXoO8Rx CFEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:user-agent:references:message-id:date :subject:from:to; bh=NGAr/Q0rnpSra0VCgDMTxaUuq52D0A3CQh8oIT4miSE=; b=MCJA7SXlCmQB7M6ScJU/cb6wsC06bRbJwNfAPI5VZoabsQ3kSWL3fnuMqjnmHJ/lAE OBttmMHK9gi8XYX5nPxAQwguFieXZedc+8Cji9Dp9PRpdM6t+mYgYZYn6RdrbrCG00Z1 zr8bKieFE9miuJGvhYL9mtZ0n35uLyjEQKh6PSvnwNHV6/nOpNXMQXwZAH1KLdfyCe1S YNZaBMnx8v131oTCaDfdoKXrHU39HwA+WbS+8I2/LKPfC4ZCS7bL3Njl0KyVdmLxlRiV M619UGThH9gY6fS0WZotRjxDk9U8O7lBTy3j0/17/n5XPJqcfAgHWHy0uoA5qeDQn3wI mu2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17si2281030pfe.192.2019.03.29.11.26.28; Fri, 29 Mar 2019 11:26:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730052AbfC2SYK (ORCPT + 99 others); Fri, 29 Mar 2019 14:24:10 -0400 Received: from [195.159.176.226] ([195.159.176.226]:33316 "EHLO blaine.gmane.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1729956AbfC2SYK (ORCPT ); Fri, 29 Mar 2019 14:24:10 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1h9wAg-000KNW-Vw for linux-kernel@vger.kernel.org; Fri, 29 Mar 2019 19:24:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Grant Edwards Subject: Re: [PATCH v2] tty/serial: Add a serial port simulator Date: Fri, 29 Mar 2019 18:24:01 -0000 (UTC) Message-ID: References: <20190305171231.22133-1-minyard@acm.org> <20190306015149.GD4290@minyard.net> <041e137e-0b9d-04f9-255d-b1f402b23c17@infradead.org> <447407be-0f49-f29d-6e81-bf4ed0a6e56b@zytor.com> <20190329165140.GD31733@minyard.net> User-Agent: slrn/1.0.3 (Linux) Cc: linux-serial@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-03-29, Corey Minyard wrote: > On Thu, Mar 28, 2019 at 12:39:12PM -0700, H. Peter Anvin wrote: > >> Dumb question: this is basically a pty on steroids. Wouldn't this be >> better done by enhancing the pty devices? I proposed doing that several years ago, and offered to start working on it if there was a decent chance it would be accepted into the tree. I got no response. > I did look at that, but it would be pretty invasive to pty. There's > no modem control stuff, none of the other special serial ioctls. > And the locking in this driver is fairly strange because you have > two serial ports looking at each other's data for modem control. > But that might not be a big deal. > > Adding the speed simulation to ptys would also be really strange. > That's not a deal-breaker, I suppose, but it's not much of a serial > port simulation without it. My goal wasn't really to simulate two serial ports with a null-mode cable in-between, so the speed simluaiton wasn't on my list. my goal was to provide a way to implement a serial port in userspace by attaching an application to the master end of a pty. The pty(7) man page states "The slave end of the pseudoterminal provides an interface that behaves exactly like a classical terminal." But, we all know that's a pretty big lie: the pty slave end implements only a small subset of a "classical termial" device, and there are all sorts of applications that expect to talk to a serial port which fail miserably when connected to a pty. -- Grant Edwards grant.b.edwards Yow! I had a lease on an at OEDIPUS COMPLEX back in gmail.com '81 ...