[lkml]   [2020]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH-next 0/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
Magic sysrq has proven for Arista usecases to be useful for debugging
issues in field, over serial line when the switch is in such bad state
that it can't accept network connections anymore.

Unfortunately, having sysrq always enabled doesn't work for some
embedded boards that tend to generate garbage on serial line (including
BREAKs). Since commit 732dbf3a6104 ("serial: do not accept sysrq
characters via serial port"), it's possible to keep sysrq enabled, but
over serial line.

Add a way to enable sysrq on a uart, where currently it can be
constantly either on or off (CONFIG_MAGIC_SYSRQ_SERIAL).
While doing so, cleanup __sysrq_enabled and serial_core header file.

Sending against -next tree as it's based on removing SUPPORT_SYSRQ
ifdeffery [1].


Cc: Greg Kroah-Hartman <>
Cc: Jiri Slaby <>
Cc: Vasiliy Khoruzhick <>


Dmitry Safonov (3):
serial_core: Move sysrq functions from header file
sysctl/sysrq: Remove __sysrq_enabled copy

drivers/tty/serial/serial_core.c | 123 +++++++++++++++++++++++++++++++
drivers/tty/sysrq.c | 7 ++
include/linux/serial_core.h | 86 ++-------------------
include/linux/sysrq.h | 1 +
kernel/sysctl.c | 41 ++++++-----
lib/Kconfig.debug | 8 ++
6 files changed, 167 insertions(+), 99 deletions(-)


 \ /
  Last update: 2020-01-09 22:55    [W:0.134 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site