From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id B6C371F07B0; Mon, 13 Mar 2017 18:38:52 -0400 (EDT) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by befuddled.reisers.ca (Postfix) with ESMTPS id A6FAA1F0569 for ; Mon, 13 Mar 2017 18:38:50 -0400 (EDT) Received: by mail-wr0-x241.google.com with SMTP id u108so21846867wrb.2 for ; Mon, 13 Mar 2017 15:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+52bQcHXZQ/cvjnjwuieH8/zMNyhSb/jEOp6XV2t3QE=; b=JBRyLLSiV/8V3NexnkVkf1iwY0+Fmhc79DxK6XEBYZqTmaozRR/BHe8qu8ZA54FCbp u4056QlEfFicqEp9cnpw1P4AuOi3ke3rSmVgXB7eJRBEV2RhxI63RGAe3vcfoJBdXzHl dbi/gzI/dFU7o5RnXJ1ZSnpe3dOqk8N7aYzirD8fDKTyKxPfPQyaUy5rWeWGZ4sqT1Qq 8FbnAfX/oJJIpK0+h5FUKXIrUv+QlqWN2wQeoACepr3Irg7g6mmisrgqwu3hfLcizU87 mc1KsOihlHC36KYBPm6VQZkU5YNaTUMglHMoMan1of9mdi6mcaspGpjMHaUoJO4tGlrm eSnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+52bQcHXZQ/cvjnjwuieH8/zMNyhSb/jEOp6XV2t3QE=; b=RyGauNwhCJ7FIfG4bZ28gGgPKOEMtYGYvQh1OQH46G5ruDGAHlAD6Wv0/vmwOO/NHc vRA+IIj+Sti1xvV3+AVX/t0S/VjFUo/Y0/54sHQF1nxKyM+q8Fl0wMVz9dzoI86ag1l4 +vFiyf4x+ev2jZtHEFlxfCOvouBJBmPNMIWePxjiuwKKFrh0lvAx89RHM2/ed/Mgy/tR CuqVtGbY2mGL7H4hRTpJgWFAufaSEKNJ504j7fC2qqBVPm2yjLMdrhdJcsL4rrm4gfCA +vMPh3dWW/wsig9QSFQXc+2VqmbbcbeqSyxFJu4bOS9Qsj/5nD1bYIaJtb9Ie0rCAShY lIbw== X-Gm-Message-State: AMke39mn22ruYKrxWNVbivSrw8Us6ovnS+oNjbxI2RyCXJT0sMBbTsvrfLXntmXhMzy0UQ== X-Received: by 10.223.175.196 with SMTP id y4mr29628787wrd.77.1489444729690; Mon, 13 Mar 2017 15:38:49 -0700 (PDT) Received: from sanghar (188.29.164.214.threembb.co.uk. [188.29.164.214]) by smtp.gmail.com with ESMTPSA id j80sm12992662wmd.14.2017.03.13.15.38.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Mar 2017 15:38:48 -0700 (PDT) Date: Mon, 13 Mar 2017 22:38:47 +0000 From: Okash Khawaja To: Greg Kroah-Hartman Cc: Jiri Slaby , Samuel Thibault , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Kirk Reiser , speakup@linux-speakup.org, alan@linux.intel.com, Chris Brannon Subject: Re: [patch 1/7] tty_port: allow a port to be opened with a tty that has no file handle Message-ID: <20170313223847.GA337@sanghar> References: <20170313220551.312820470@gmail.com> <20170313220926.390471547@gmail.com> <20170313221247.GA22823@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170313221247.GA22823@kroah.com> User-Agent: Mutt/1.7.2 (2016-11-26) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 22:38:52 -0000 On Tue, Mar 14, 2017 at 06:12:47AM +0800, Greg Kroah-Hartman wrote: > On Mon, Mar 13, 2017 at 10:05:52PM +0000, okash.khawaja@gmail.com wrote: > > Allow access to TTY device from kernel. This is based on Alan Cox's patch > > (http://www.mail-archive.com/linux-kernel at vger.kernel.org/msg1215095.html), > > with description quoted below. > > > > "tty_port: allow a port to be opened with a tty that has no file handle > > > > Let us create tty objects entirely in kernel space. > > > > With this a kernel created non file backed tty object could be used to handle > > data, and set terminal modes. Not all ldiscs can cope with this as N_TTY in > > particular has to work back to the fs/tty layer. > > > > The tty_port code is however otherwise clean of file handles as far as I can > > tell as is the low level tty port write path used by the ldisc, the > > configuration low level interfaces and most of the ldiscs. > > > > Currently you don't have any exposure to see tty hangups because those are > > built around the file layer. However a) it's a fixed port so you probably > > don't care about that b) if you do we can add a callback and c) you almost > > certainly don't want the userspace tear down/rebuild behaviour anyway. > > > > This should however be sufficient if we wanted for example to enumerate all > > the bluetooth bound fixed ports via ACPI and make them directly available. > > > > It doesn't deal with the case of a user opening a port that's also kernel > > opened and that would need some locking out (so it returned EBUSY if bound > > to a kernel device of some kind). That needs resolving along with how you > > "up" or "down" your new bluetooth device, or enumerate it while providing > > the existing tty API to avoid regressions (and to debug)." > > > > Signed-off-by: Okash Khawaja > > > > Reviewed-by: Samuel Thibault > > You do know this is already in 4.11-rc1, right? Please rebase your > patch set on 4.11-rc2 at the least and resend. Didn't realise that! Will resend