• Dmitry Safonov's avatar
    serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE · 68af4317
    Dmitry Safonov authored
    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 732dbf3a ("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: default avatarVasiliy Khoruzhick <vasilykh@arista.com>
    Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
    Link: https://lore.kernel.org/r/20200302175135.269397-3-dima@arista.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    68af4317
Kconfig.debug 71.5 KB