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]
Date:	Tue, 23 Nov 2010 13:56:21 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Timur Tabi <timur@...escale.com>
Cc:	Greg KH <gregkh@...e.de>, Arnd Bergmann <arnd@...db.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Scott Wood <scottwood@...escale.com>,
	Stuart Yoder <stuart.yoder@...escale.com>
Subject: Re: How do I choose an arbitrary minor number for my tty device?

> > You can - provide the required method in your console driver and it'll
> > get used by /dev/console. Funnily enough a lot of other platform and
> > consoles need that too.
> 
> Can you elaborate on that?  What is the "required method"?  My driver is mostly
> working now, but I have to supply the command-line "console=ttyEHV73" in order
> for the login prompt to show up.  Unfortunately, there's no way for the boot
> loader to know that the primary byte channel for stdout is #73, so I need a way
> for the driver to tell the kernel this.

Your console driver provides a device method (see kernel/printk.c).
When /dev/console is opened the kernel iterates the console list looking
for one with ->device and then calls that method. On success it expects
the passed int * to contain the minor number to use.

I suspect in your case you probably want to attach the primary byte
channel to minor 0 in the driver (and reserve it for that), or some
similar rule.

> Also, if I have a /dev/ttyEHV76 entry for a byte channel that's not the primary
> stdout tty, is the following supposed to work:
> 
> 	cat > /dev/ttyEHV76
> 
> That is, should I be able to use a TTY device as a normal character device,
> where I can just write and read characters?

Sort of - processing gets done but you can disable the processing easily
enough. If you have channels that are not tty related you may want to tap
them directly to avoid the overhead of the tty layer if they are high
data rate.

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