Files
kernel_common_drivers/drivers/debug/main.c
T
Hanjie Lin 3fcef5de34 kretprobes: disable irq in ret handler [2/3]
PD#SWPL-121806

Problem:
ret handler running in origin task context with preempt_disable
it's not safe for interrupt and may cause nested kprobe and miss

Solution:
disable irq in ret handler
add AMLOGIC_BGKI_KPROBES

Verify:
sc2

Change-Id: I143e874336d87b143d1607b8e9a7588f84d7bc55
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-06-13 01:00:25 -07:00

42 lines
964 B
C

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
//#define DEBUG
#include <linux/module.h>
#include <linux/amlogic/module_merge.h>
#include "main.h"
static int __init debug_main_init(void)
{
pr_debug("### %s() start\n", __func__);
#if IS_MODULE(CONFIG_AMLOGIC_DEBUG_PRINTK)
call_sub_init(printk_vendor_hook_init);
#endif
call_sub_init(debug_lockup_init);
call_sub_init(aml_debug_init);
call_sub_init(cpu_mhz_init);
call_sub_init(meson_atrace_init);
call_sub_init(debug_file_init);
call_sub_init(gki_config_init);
call_sub_init(aml_hld_init);
call_sub_init(aml_sched_init);
call_sub_init(aml_kprobes_init);
pr_debug("### %s() end\n", __func__);
return 0;
}
static void __exit debug_main_exit(void)
{
debug_file_exit();
#if IS_MODULE(CONFIG_AMLOGIC_DEBUG_PRINTK)
printk_vendor_hook_exit();
#endif
}
module_init(debug_main_init);
module_exit(debug_main_exit);
MODULE_LICENSE("GPL v2");