sw64: add support for KPROBES_ON_FTRACE
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I645TO -------------------------------- This patch adds support for KPROBES_ON_FTRACE on SW64, and it allows kprobes to be placed on ftrace _mcount() call sites. However, kprobe_ftrace_handler() makes ftrace_regs_caller() return to the instruction after _mcount() call site. Then if the function accesses global symbol with an address caculated based on gp($29), it'll access a wrong address because gp has been changed in ftrace_regs_caller(). To fix it, gp has to be saved and restored in ftrace_regs_caller(). With this patch, ftrace/kprobe selftests return passed. Signed-off-by:Gu Zitao <guzitao@wxiat.com> Reviewed-by:
He Sheng <hesheng@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com>
Loading
Please sign in to comment