lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANq1E4T25a3JkYB_JggtueygqpGVn0vBmaMZXvohWb_jinxuag@mail.gmail.com>
Date:	Sat, 22 Feb 2014 14:25:46 +0100
From:	David Herrmann <dh.herrmann@...il.com>
To:	Ray Strode <halfline@...il.com>
Cc:	Kay Sievers <kay@...y.org>, Josh Boyer <jwboyer@...oraproject.org>,
	Hannes Reinecke <hare@...e.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	Lennart Poettering <lennart@...ttering.net>,
	Jiri Slaby <jslaby@...e.cz>, Werner Fink <werner@...e.de>
Subject: Re: [PATCH 3.13 35/99] tty: Set correct tty name in active sysfs attribute

Hi

On Fri, Feb 21, 2014 at 11:53 PM, Ray Strode <halfline@...il.com> wrote:
> Hi,
>
> On Fri, Feb 21, 2014 at 11:01 AM, Kay Sievers <kay@...y.org> wrote:
>> Why did the tty0 change to tty1 now? That doesn't look like a "driver
>> name" vs. "device name" issue?
>
> I don't know if it's intentional, but the patch does:
> +               int index = cs[i]->index;
> ...
> +               driver = cs[i]->device(cs[i], &index);
>
> which will presumably change the index from 0 to 1 because of this code:
>
> static struct tty_driver *vt_console_device(struct console *c, int *index)
> {
>        *index = c->index ? c->index-1 : fg_console;
>        return console_driver;
> }
>
> At least that's what it looks like is causing the problem from
> browsing through the source a bit.

Yepp, that's it. So if you configure the console to always be
redirected to the foreground terminal, you simply bind it to tty0 and
this file used to return tty0 then.
With this patch, we actually return the foreground terminal instead,
so tty0 is resolved to the real VT. This sounds like the correct
behavior (even though it currently breaks poll() on this file). But if
it breaks stuff, we should revert it and add a second file just like
Peter suggested.

Thanks
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ