OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From: John Crispin <john@phrozen.org> |
2 | Subject: serial: do not accept sysrq characters via serial port |
||
3 | |||
4 | many embedded boards have a disconnected TTL level serial which can |
||
5 | generate some garbage that can lead to spurious false sysrq detects. |
||
6 | |||
7 | [john@phrozen.org: sent upstream 22.12.2016] |
||
8 | |||
9 | Signed-off-by: John Crispin <john@phrozen.org> |
||
10 | Signed-off-by: Felix Fietkau <nbd@nbd.name> |
||
11 | --- |
||
12 | include/linux/serial_core.h | 2 +- |
||
13 | lib/Kconfig.debug | 5 +++++ |
||
14 | 2 files changed, 6 insertions(+), 1 deletion(-) |
||
15 | |||
16 | --- a/include/linux/serial_core.h |
||
17 | +++ b/include/linux/serial_core.h |
||
18 | @@ -456,7 +456,7 @@ extern void uart_handle_cts_change(struc |
||
19 | extern void uart_insert_char(struct uart_port *port, unsigned int status, |
||
20 | unsigned int overrun, unsigned int ch, unsigned int flag); |
||
21 | |||
22 | -#ifdef SUPPORT_SYSRQ |
||
23 | +#if defined(SUPPORT_SYSRQ) && defined(CONFIG_MAGIC_SYSRQ_SERIAL) |
||
24 | static inline int |
||
25 | uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) |
||
26 | { |
||
27 | --- a/lib/Kconfig.debug |
||
28 | +++ b/lib/Kconfig.debug |
||
3 | office | 29 | @@ -396,6 +396,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE |
1 | office | 30 | This may be set to 1 or 0 to enable or disable them all, or |
31 | to a bitmask as described in Documentation/sysrq.txt. |
||
32 | |||
33 | +config MAGIC_SYSRQ_SERIAL |
||
34 | + bool "Enable magic SysRq key over serial" |
||
35 | + depends on MAGIC_SYSRQ |
||
36 | + default y |
||
37 | + |
||
38 | config DEBUG_KERNEL |
||
39 | bool "Kernel debugging" |
||
40 | help |