Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1364966 > unrolled thread

Re: [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open()

Started byRichard Weinberger <richard.weinberger@gmail.com>
First post2016-03-26 19:00 +0100
Last post2016-03-26 20:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open() Richard Weinberger <richard.weinberger@gmail.com> - 2016-03-26 19:00 +0100
    Re: [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open() Peter Hurley <peter@hurleysoftware.com> - 2016-03-26 20:10 +0100
      Re: [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open() Richard Weinberger <richard@nod.at> - 2016-03-26 20:20 +0100

#1364966 — Re: [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open()

FromRichard Weinberger <richard.weinberger@gmail.com>
Date2016-03-26 19:00 +0100
SubjectRe: [PATCH v2 09/10] tty: Consolidate noctty checks in tty_open()
Message-ID<rh0Fc-465-17@gated-at.bofh.it>
On Sun, Jan 10, 2016 at 6:13 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
> Evaluate the conditions which prevent this tty being the controlling
> terminal in one place, just before setting the controlling terminal.
>
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> ---
>  drivers/tty/tty_io.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)

Peter,

This commit breaks existing userspace.
I noticed that on UserModeLinux with Debian Squeeze as userspace, getty does not
give me a controlling tty upon login.
It does not seem to happen on newer distros. But still this needs
further investigation.

Please me know what debug information you need.

-- 
Thanks,
//richard

[toc] | [next] | [standalone]


#1364977

FromPeter Hurley <peter@hurleysoftware.com>
Date2016-03-26 20:10 +0100
Message-ID<rh1KW-57a-3@gated-at.bofh.it>
In reply to#1364966
Hi Richard,

On 03/26/2016 10:58 AM, Richard Weinberger wrote:
> On Sun, Jan 10, 2016 at 6:13 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
>> Evaluate the conditions which prevent this tty being the controlling
>> terminal in one place, just before setting the controlling terminal.
>>
>> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
>> ---
>>  drivers/tty/tty_io.c | 17 ++++++++---------
>>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> Peter,
> 
> This commit breaks existing userspace.
> I noticed that on UserModeLinux with Debian Squeeze as userspace, getty does not
> give me a controlling tty upon login.
> It does not seem to happen on newer distros. But still this needs
> further investigation.
> 
> Please me know what debug information you need.

Sorry about that; I hadn't considered the implications of UML console.
Can you test the blob below?

Regards,
Peter Hurley

--- >% ---
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 608beb6..a361c61 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2158,7 +2157,9 @@ retry_open:
 	read_lock(&tasklist_lock);
 	spin_lock_irq(&current->sighand->siglock);
 	noctty = (filp->f_flags & O_NOCTTY) ||
+#ifdef CONFIG_VT
 			device == MKDEV(TTY_MAJOR, 0) ||
+#endif
 			device == MKDEV(TTYAUX_MAJOR, 1) ||
 			(tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 			 tty->driver->subtype == PTY_TYPE_MASTER);

[toc] | [prev] | [next] | [standalone]


#1364981

FromRichard Weinberger <richard@nod.at>
Date2016-03-26 20:20 +0100
Message-ID<rh1UB-5b3-3@gated-at.bofh.it>
In reply to#1364977
Peter,

Am 26.03.2016 um 20:06 schrieb Peter Hurley:
> Sorry about that; I hadn't considered the implications of UML console.
> Can you test the blob below?

Yep, works like a charm. :-)

Thanks,
//richard

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web