ANDROID: sysrq: add vendor hook for sysrq crash information

- Add the hook to provide additional information
   of sysrq crash.

Bug: 170234110

Signed-off-by: Sangmoon Kim <[email protected]>
Change-Id: Ib8f14eaa639b2ef959e911d611515868ff9f193d
This commit is contained in:
Sangmoon Kim 2020-10-08 10:42:06 +09:00
commit 32b2423372
3 changed files with 30 additions and 0 deletions

View file

@ -54,6 +54,8 @@
#include <asm/ptrace.h>
#include <asm/irq_regs.h>
#include <trace/hooks/sysrqcrash.h>
/* Whether we react on sysrq keys or just ignore them */
static int __read_mostly sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE;
static bool __read_mostly sysrq_always_enabled;
@ -137,6 +139,8 @@ static void sysrq_handle_crash(int key)
/* release the RCU read lock before crashing */
rcu_read_unlock();
trace_android_vh_sysrq_crash(current);
panic("sysrq triggered crash\n");
}
static struct sysrq_key_op sysrq_crash_op = {