linux-stable/drivers/tty
Dmitry Safonov 68af43173d serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
Many embedded boards have a disconnected TTL level serial which can
generate some garbage that can lead to spurious false sysrq detects.

Currently, sysrq can be either completely disabled for serial console
or always disabled (with CONFIG_MAGIC_SYSRQ_SERIAL), since
commit 732dbf3a61 ("serial: do not accept sysrq characters via serial port")

At Arista, we have such boards that can generate BREAK and random
garbage. While disabling sysrq for serial console would solve
the problem with spurious false sysrq triggers, it's also desirable
to have a way to enable sysrq back.

As a measure of balance between on and off options, add
MAGIC_SYSRQ_SERIAL_SEQUENCE which is a string sequence that can enable
sysrq if it follows BREAK on a serial line. The longer the string - the
less likely it may be in the garbage.

Having the way to enable sysrq was beneficial to debug lockups with
a manual investigation in field and on the other side preventing false
sysrq detections.

Based-on-patch-by: Vasiliy Khoruzhick <vasilykh@arista.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Link: https://lore.kernel.org/r/20200302175135.269397-3-dima@arista.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-07 09:52:02 +01:00
..
hvc TTY/Serial patches for 5.5-rc1 2019-12-03 14:09:14 -08:00
ipwireless
serdev serdev: ttyport: restore client ops on deregistration 2020-02-10 12:26:44 -08:00
serial serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE 2020-03-07 09:52:02 +01:00
vt vt: selection, indent switch-case properly 2020-03-06 08:35:40 +01:00
amiserial.c Remove every trace of SERIAL_MAGIC 2019-11-13 19:01:14 +08:00
cyclades.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
ehv_bytechan.c
goldfish.c
isicom.c tty/isicom: remove redundant assignment to variable word_count 2019-09-04 12:43:44 +02:00
Kconfig tty: Fix Kconfig indentation, continued 2019-11-21 14:38:31 +01:00
Makefile tty: Add NULL TTY driver 2019-04-16 15:21:34 +02:00
mips_ejtag_fdc.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
moxa.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
moxa.h
mxser.c
mxser.h
n_gsm.c n_gsm: switch escape to bool 2020-02-19 12:46:48 +01:00
n_hdlc.c n_hdlc: wrap a comment properly 2020-02-21 10:24:34 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: Distribute switch variables for initialization 2020-02-23 20:14:50 +01:00
nozomi.c tty: nozomi: Use dev_get_drvdata 2019-09-04 12:43:44 +02:00
pty.c
rocket.c tty: rocket: reduce stack usage 2019-11-04 17:42:28 +01:00
rocket.h tty: rocket: Remove RCPK_GET_STRUCT ioctl 2019-04-25 11:58:56 +02:00
rocket_int.h
synclink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
synclink_gt.c TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
synclinkmp.c TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
sysrq.c sysctl/sysrq: Remove __sysrq_enabled copy 2020-03-07 09:52:02 +01:00
tty_audit.c
tty_baudrate.c tty: baudrate: SPARC supports few more baud rates 2020-01-22 10:23:26 +01:00
tty_buffer.c
tty_io.c tty: drop useless variable initialisation in tty_kopen() 2019-12-17 14:42:45 +01:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty_ldisc: simplify tty_ldisc_autoload initialization 2019-10-04 15:11:25 +02:00
tty_ldsem.c locking/lockdep: Remove unused @nested argument from lock_release() 2019-10-09 12:46:10 +02:00
tty_mutex.c
tty_port.c serdev: ttyport: restore client ops on deregistration 2020-02-10 12:26:44 -08:00
ttynull.c tty: Add NULL TTY driver 2019-04-16 15:21:34 +02:00
vcc.c tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00