Do not prevent processes from making changes to the baudrate or the

CLOCAL and HUPCL control flags. There are legit reasons for allowing
those to be changed. When /etc/ttys has the "3wire" type (without a
baudrate) for the serial port that is the low-level console, then
this change has no effect.

Obtained from:	Juniper Networks, Inc.
This commit is contained in:
marcel 2014-04-05 22:25:10 +00:00
parent d1d0c78901
commit 78021d485d
2 changed files with 14 additions and 6 deletions

View File

@ -31,6 +31,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".) "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20140405:
The uart(4) driver has been changed with respect to its handling
of the low-level console. Previously the uart(4) driver prevented
any process from changing the baudrate or the CLOCAL and HUPCL
control flags. By removing the restrictions, operators can make
changes to the serial console port without having to reboot.
However, when getty(8) is started on the serial device that is
associated with the low-level console, a misconfigured terminal
line in /etc/ttys will now have a real impact.
Before upgrading the kernel, make sure that /etc/ttys has the
serial console device configured as 3wire without baudrate to
preserve teh previous behaviour. E.g:
ttyu0 "/usr/libexec/getty 3wire" vt100 on secure
20140325: 20140325:
It is no longer necessary to include the dwarf version in your DEBUG It is no longer necessary to include the dwarf version in your DEBUG
options in your kernel config file. The bug that required it to be options in your kernel config file. The bug that required it to be

View File

@ -244,12 +244,6 @@ uart_tty_param(struct tty *tp, struct termios *t)
return (ENODEV); return (ENODEV);
if (t->c_ispeed != t->c_ospeed && t->c_ospeed != 0) if (t->c_ispeed != t->c_ospeed && t->c_ospeed != 0)
return (EINVAL); return (EINVAL);
/* Fixate certain parameters for system devices. */
if (sc->sc_sysdev != NULL) {
t->c_ispeed = t->c_ospeed = sc->sc_sysdev->baudrate;
t->c_cflag |= CLOCAL;
t->c_cflag &= ~HUPCL;
}
if (t->c_ospeed == 0) { if (t->c_ospeed == 0) {
UART_SETSIG(sc, SER_DDTR | SER_DRTS); UART_SETSIG(sc, SER_DDTR | SER_DRTS);
return (0); return (0);