Skip to content

serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE

Dmitry Safonov linux-fsdevel linux-serial lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3serial_core: Move sysrq functions from header filedrivers/tty/serial/serial_core.c include/linux/serial_core.h+88 -791 reply
2/3sysctl/sysrq: Remove __sysrq_enabled copydrivers/tty/sysrq.c include/linux/sysrq.h kernel/sysctl.c+30 -195 replies
3/3serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCEdrivers/tty/serial/serial_core.c include/linux/serial_core.h lib/Kconfig.debug+55 -79 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchVasiliy Khoruzhick
1/3
2/3
3/3Based-on-patch-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [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/[email protected]

Cc Greg Kroah-Hartman <[email protected]>
Cc Jiri Slaby <[email protected]>
Cc Vasiliy Khoruzhick <[email protected]>

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(-)
Signature · 1 line
2.24.1