[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200109215444.95995-1-dima@arista.com>
Date: Thu, 9 Jan 2020 21:54:41 +0000
From: Dmitry Safonov <dima@...sta.com>
To: linux-kernel@...r.kernel.org
Cc: Dmitry Safonov <0x7f454c46@...il.com>,
Dmitry Safonov <dima@...sta.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Vasiliy Khoruzhick <vasilykh@...sta.com>,
linux-serial@...r.kernel.org, Iurii Zaikin <yzaikin@...gle.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
linux-fsdevel@...r.kernel.org
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].
[1]: https://lkml.kernel.org/r/20191213000657.931618-1-dima@arista.com
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.com>
Cc: Vasiliy Khoruzhick <vasilykh@...sta.com>
Cc: linux-serial@...r.kernel.org
Thanks,
Dmitry
Dmitry Safonov (3):
serial_core: Move sysrq functions from header file
sysctl/sysrq: Remove __sysrq_enabled copy
serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
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(-)
--
2.24.1
Powered by blists - more mailing lists