linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>, Alan Cox <alan@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tty: cleanup prohibition of direct opening for unix98 pty master
Date: Wed, 04 Jan 2012 17:26:30 +0400	[thread overview]
Message-ID: <4F045386.3050706@openvz.org> (raw)
In-Reply-To: <CA+55aFyG476bzW1kBeF0MFRkXZkumaG-SzMexoPLdPFAzDUG6A@mail.gmail.com>

Linus Torvalds wrote:
> Looks ok as far as I can tell, and does indeed clean things up. I
> assume somebody tested the case that we used to have issues with?

Yes of course I tested it.

>
>                      Linus
>
> On Tue, Jan 3, 2012 at 12:51 AM, Konstantin Khlebnikov
> <khlebnikov@openvz.org>  wrote:
>> cleanup hack added in v2.6.27-3203-g15582d3
>>
>> comment from that patch:
>>
>> : pty: If the administrator creates a device for a ptmx slave we should not error
>> :
>> : The open path for ptmx slaves is via the ptmx device. Opening them any
>> : other way is not allowed. Vegard Nossum found that previously this was not
>> : the case and mknod foo c 128 42; cat foo would produce nasty diagnostics
>> :
>> : Signed-off-by: Alan Cox<alan@redhat.com>
>> : Signed-off-by: Linus Torvalds<torvalds@linux-foundation.org>
>>
>> devpts_get_tty() returns non-null only for inodes on devpts, but there is no
>> inodes for master-devices, /dev/ptmx (/dev/pts/ptmx) is the only way to open them.
>> Thus we can completely forbid lookup for master-devices and eliminate that hack in
>> tty_init_dev() because tty_open() will get EIO from tty_driver_lookup_tty().
>>
>> Signed-off-by: Konstantin Khlebnikov<khlebnikov@openvz.org>

  reply	other threads:[~2012-01-04 13:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 17:22 [PATCH] tty: cleanup prohibition of direct opening for unix98 pty master Konstantin Khlebnikov
2012-01-02 17:28 ` Greg KH
2012-01-02 22:29   ` Konstantin Khlebnikov
2012-01-03  1:08     ` Greg KH
2012-01-03  8:51 ` Konstantin Khlebnikov
2012-01-03 16:16   ` Linus Torvalds
2012-01-04 13:26     ` Konstantin Khlebnikov [this message]
2012-01-05  0:23   ` Greg KH
2012-01-05  9:04     ` [PATCH for tty-next] " Konstantin Khlebnikov
2012-01-05  9:13     ` [PATCH] " Konstantin Khlebnikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F045386.3050706@openvz.org \
    --to=khlebnikov@openvz.org \
    --cc=alan@redhat.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).