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:	Wed, 4 Apr 2007 09:51:59 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Brad Boyer <flar@...andria.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	Paul Mackerras <paulus@...ba.org>, linuxppc-dev@...abs.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

On Tue, Apr 03, 2007 at 04:09:08PM -0700, Brad Boyer wrote:
> The availability of the specific chip in question is a red herring in
> my opinion. I do understand that 8250 compatible chips are very common
> and are the most likely serial chips to be used with Linux. However, I
> will point out that the define is TTY_MAJOR, not 8250_MAJOR. It seems
> to me that whoever named it was thinking in more generic terms.

You're reading too much into the name.  It's historical, and the reason
can still be seen in LANANA:

  4 char        TTY devices
                  0 = /dev/tty0         Current virtual console

                  1 = /dev/tty1         First virtual console
                    ...
                 63 = /dev/tty63        63rd virtual console
                 64 = /dev/ttyS0        First UART serial port
                    ...
                255 = /dev/ttyS191      192nd UART serial port

                UART serial ports refer to 8250/16450/16550 series devices.

When the drivers/char/serial.c driver was written, it was in the very
early days of Linux.  I'd guess that the major/minor numbers were similar
to Minix, thereby allowing a minixfs to be used as the initial filesystem
type.

Anyway, as you can see, defining chardev major 4 to be "8250_MAJOR" would
also be a misnomer because it's used for the virtual consoles, and it's
_that_ use for which it (probably) was called TTY_MAJOR.

(Note that in the very early days, this major also got used for PTY
devices.  Since then they've moved to major 2/3 and then we got Unix98
PTY support.)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
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