From a863cef344a0e028c9016b42dcad02dbc7820e92 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 14 Nov 2021 14:32:53 +0100 Subject: [PATCH] Revert half of "ANDROID: arm64: add vendor hooks for bti and pauth fault" This reverts half of commit 06d074249fa373865805136b3d34aeb7c20ee5d2. The hooks android_rvh_do_bti is not used by any vendor, so remove them to help with merge issues with future LTS releases. If this is needed by any real user, it can easily be reverted to add it back and then the symbol should be added to the abi list at the same time to prevent it from being removed again later. Bug: 203187389 Cc: Sangmoon Kim Signed-off-by: Greg Kroah-Hartman Change-Id: I840399ee4461c6bffa8c8b63d9cd5748d88d2aae --- arch/arm64/kernel/traps.c | 1 - drivers/android/vendor_hooks.c | 1 - include/trace/hooks/traps.h | 5 ----- 3 files changed, 7 deletions(-) diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 6c39a61ec115..acc7e7647cbb 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -414,7 +414,6 @@ NOKPROBE_SYMBOL(do_undefinstr); void do_bti(struct pt_regs *regs) { - trace_android_rvh_do_bti(regs, user_mode(regs)); BUG_ON(!user_mode(regs)); force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc, 0); } diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index afbf68f586f7..8dc3d3c10435 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -237,7 +237,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_mutex_list_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_unlock_slowpath); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_undefinstr); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_bti); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_ptrauth_fault); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_bad_mode); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_arm64_serror_panic); diff --git a/include/trace/hooks/traps.h b/include/trace/hooks/traps.h index f8d56a207afc..d1ceb632c1d5 100644 --- a/include/trace/hooks/traps.h +++ b/include/trace/hooks/traps.h @@ -17,11 +17,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_do_undefinstr, TP_ARGS(regs, user), TP_CONDITION(!user)); -DECLARE_RESTRICTED_HOOK(android_rvh_do_bti, - TP_PROTO(struct pt_regs *regs, bool user), - TP_ARGS(regs, user), - TP_CONDITION(!user)); - DECLARE_RESTRICTED_HOOK(android_rvh_do_ptrauth_fault, TP_PROTO(struct pt_regs *regs, unsigned int esr, bool user), TP_ARGS(regs, esr, user),