linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-next 0/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
@ 2020-01-09 21:54 Dmitry Safonov
  2020-01-09 21:54 ` [PATCH-next 1/3] serial_core: Move sysrq functions from header file Dmitry Safonov
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Dmitry Safonov @ 2020-01-09 21:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dmitry Safonov, Dmitry Safonov, Greg Kroah-Hartman, Jiri Slaby,
	Vasiliy Khoruzhick, linux-serial, Iurii Zaikin, Luis Chamberlain,
	Kees Cook, linux-fsdevel

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@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Vasiliy Khoruzhick <vasilykh@arista.com>
Cc: linux-serial@vger.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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-01-15 12:42 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 21:54 [PATCH-next 0/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE Dmitry Safonov
2020-01-09 21:54 ` [PATCH-next 1/3] serial_core: Move sysrq functions from header file Dmitry Safonov
2020-01-10 16:50   ` Greg Kroah-Hartman
2020-01-09 21:54 ` [PATCH-next 2/3] sysctl/sysrq: Remove __sysrq_enabled copy Dmitry Safonov
2020-01-10  3:19   ` Iurii Zaikin
2020-01-10 21:48     ` Dmitry Safonov
2020-01-10 16:40   ` Greg Kroah-Hartman
2020-01-10 21:45     ` Dmitry Safonov
2020-01-10 22:01       ` Greg Kroah-Hartman
2020-01-09 21:54 ` [PATCH-next 3/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE Dmitry Safonov
2020-01-09 23:53   ` Randy Dunlap
2020-01-10 22:02     ` Dmitry Safonov
2020-01-10 16:46   ` Greg Kroah-Hartman
2020-01-10 22:32     ` Dmitry Safonov
2020-01-14 19:10       ` Dmitry Safonov
2020-01-15 12:42         ` Greg Kroah-Hartman
2020-01-10 16:50   ` Joe Perches
2020-01-10 22:10     ` Dmitry Safonov
2020-01-11 14:08       ` Joe Perches
2020-01-10 19:01   ` kbuild test robot
2020-01-10 19:20   ` kbuild test robot
2020-01-11 10:52   ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).