ANDROID: arm64: add vendor hooks for unusal abort cases
Add hooks to gather data of unsual aborts and summarize it with other information. Bug: 222638752 Bug: 375562078 Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com> Change-Id: I74eb36b8551ed9a5e6dc87507939a7f4d81c9c18 (cherry picked from commit 102255d1e45607da700f715c5c100427170751a2)
This commit is contained in:
@@ -49,6 +49,8 @@
|
||||
#include <asm/system_misc.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
#include <trace/hooks/traps.h>
|
||||
|
||||
static bool __kprobes __check_eq(unsigned long pstate)
|
||||
{
|
||||
return (pstate & PSR_Z_BIT) != 0;
|
||||
@@ -925,6 +927,8 @@ void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr)
|
||||
|
||||
pr_crit("SError Interrupt on CPU%d, code 0x%016lx -- %s\n",
|
||||
smp_processor_id(), esr, esr_get_class_string(esr));
|
||||
|
||||
trace_android_rvh_arm64_serror_panic(regs, esr);
|
||||
if (regs)
|
||||
__show_regs(regs);
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <trace/hooks/dtask.h>
|
||||
#include <trace/hooks/ftrace_dump.h>
|
||||
#include <trace/hooks/mm.h>
|
||||
#include <trace/hooks/traps.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
@@ -112,3 +113,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_folio_look_around_ref);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_look_around_migrate_folio);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_test_clear_look_around_ref);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_arm64_serror_panic);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM traps
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_TRAPS_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_TRAPS_H
|
||||
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct pt_regs;
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_arm64_serror_panic,
|
||||
TP_PROTO(struct pt_regs *regs, unsigned long esr),
|
||||
TP_ARGS(regs, esr), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_TRAPS_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Reference in New Issue
Block a user