From d28a535d9aa5a30deb682cd02b18c9bbd772c44f Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 9 Oct 2015 17:09:10 -0700 Subject: [PATCH] init.rc: Disable sysrq from the keyboard Don't allow the accidental triggering of sysrq functionality from the keyboard. The only expected use of sysrq functionality is via /proc/sysrq-trigger Please see https://www.kernel.org/doc/Documentation/sysrq.txt for additional information on /proc/sys/kernel/sysrq Bug: 13435961 Change-Id: I60dc92a4b2b4706e8fa34a6cead9abd449f7375f --- rootdir/init.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index bd4d1560d..38c686df7 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -13,6 +13,9 @@ on early-init # Set init and its forked children's oom_adj. write /proc/1/oom_score_adj -1000 + # Disable sysrq from keyboard + write /proc/sys/kernel/sysrq 0 + # Set the security context of /adb_keys if present. restorecon /adb_keys