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: <20101118144123.5417ccbd@lxorguk.ukuu.org.uk>
Date:	Thu, 18 Nov 2010 14:41:23 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"Dr. Werner Fink" <werner@...e.de>
Cc:	Greg KH <greg@...ah.com>,
	Lennart Poettering <mzxreary@...inter.de>,
	Kay Sievers <kay.sievers@...y.org>, Valdis.Kletnieks@...edu,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Jiri Slaby <jslaby@...e.cz>
Subject: Re: tty: add 'active' sysfs attribute to tty0 and console device

> How can I detect the major and minor of the primary console device
> of /dev/console without controlling tty?  Even if my old blogd

In the general case you can't - because a console may not have a tty.
Quite a few don't. For the cases where one has a device I can't see a
clean way to do it as an fstat on the console device will give you the
console major/mninor and some code depends upon that.

The iniability to get it is clearly a flaw and you need the sysfs link or
a sysfs list of consoles (again remembering many of them won't have a tty
bound).

> and the bootlogd(8) of SysInitV using TIOCCONS are outdated by SystemD
> the question before doing the TIOCCONS is which is the primary console
> device to e.g. create the device node in initrd or for bootlogd(8)
> to write a copy of the console messages back to the original
> primary console (and the other console devices).

For init it is /dev/console as opened at boot time and passed to the
initial user init task but with no nice way to work back to a device node.

Incidentally the primary console (as in printk) can be accessed as a tty
via the ttyprintk driver which got added recently because embedded people
wanted to use the printk interface as a (write only) tty console as well.




--
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