ANDROID: arm64: add vendor hooks for kernel fault cases
Add hooks to gather data of kernel fault and summarize it with other information. Bug: 222638752 Bug: 375562078 Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com> Change-Id: I7d6a66837f2e896a413bd8d878f26928669d96e6 (cherry picked from commit 61d7b6c74146bc73ba1f316f8043ac1c0effb0e9)
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
#include <trace/hooks/fault.h>
|
||||
|
||||
struct fault_info {
|
||||
int (*fn)(unsigned long far, unsigned long esr,
|
||||
struct pt_regs *regs);
|
||||
@@ -786,6 +788,7 @@ static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
|
||||
*/
|
||||
siaddr = untagged_addr(far);
|
||||
}
|
||||
trace_android_rvh_do_sea(siaddr, esr, regs);
|
||||
arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <trace/hooks/ftrace_dump.h>
|
||||
#include <trace/hooks/mm.h>
|
||||
#include <trace/hooks/traps.h>
|
||||
#include <trace/hooks/fault.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
@@ -114,3 +115,4 @@ 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);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_sea);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM fault
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_FAULT_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_FAULT_H
|
||||
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct pt_regs;
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_do_sea,
|
||||
TP_PROTO(unsigned long addr, unsigned long esr, struct pt_regs *regs),
|
||||
TP_ARGS(addr, esr, regs), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_FAULT_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Reference in New Issue
Block a user