aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-12-20 15:59:19 -0800
committerMister Oyster <oysterized@gmail.com>2017-05-10 18:27:52 +0200
commita4a5b2dde05603de9cca69b1dc903bfc80cebcdf (patch)
tree5162d4ebfa1434cfe4f6c5bfc4773fa62c395279 /drivers/tty
parent61d3dae3cbb5a8ecaca57e454ac95fac16fa4ff1 (diff)
android: fiq_debugger: restrict access to critical commands.
Sysrq must be enabled via /proc/sys/kernel/sysrq as a security measure to enable various critical fiq debugger commands that either leak information or can be used as a system attack. Default disabled, this will leave the reboot, reset, irqs, sleep, nosleep, console and ps commands. Reboot and reset commands will be restricted from taking any parameters. We will also switch to showing the limited command set in this mode. Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 32402555 Change-Id: I3f74b1ff5e4971d619bcb37a911fed68fbb538d5 Git-repo: https://android.googlesource.com/kernel/msm Git-commit: 1031836c0895f1f5a05c25efec83bfa11aa08ca9 Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/sysrq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index b51c15408..08c9406ca 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -55,10 +55,11 @@ static bool __read_mostly sysrq_always_enabled;
unsigned short platform_sysrq_reset_seq[] __weak = { KEY_RESERVED };
int sysrq_reset_downtime_ms __weak;
-static bool sysrq_on(void)
+bool sysrq_on(void)
{
return sysrq_enabled || sysrq_always_enabled;
}
+EXPORT_SYMBOL(sysrq_on);
/*
* A value of 1 means 'all', other nonzero values are an op mask: