-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY not supported on ppc64le #1382
Comments
See comparison of cmdline_proc_show() for when CONFIG_FTRACE_MCOUNT_USE_OBJTOOL vs CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY: --- mcount_objtool 2024-03-25 15:31:39.819471809 -0400
+++ mcount_patchable_fun_entry 2024-03-25 15:32:10.441579666 -0400
@@ -5,7 +5,6 @@ Disassembly of section .text.cmdline_pro
0: R_PPC64_REL16_HA .TOC.
4: 00 00 42 38 addi r2,r2,0
4: R_PPC64_REL16_LO .TOC.+0x4
- 8: a6 02 08 7c mflr r0
- c: 01 00 00 48 bl c <cmdline_proc_show+0xc>
- c: R_PPC64_REL24 _mcount
+ 8: 00 00 00 60 nop
+ c: 00 00 00 60 nop
10: a6 02 08 7c mflr r0 The checks in kpatch_find_func_profiling_calls() for the PPC64 arch look for that "_mcount" relocation, which isn't present in the patchable-function-entry case. To support this config, we could look for the nop instructions directly, like the S390 case, or maybe verify that there is a "patchable_function_entries" relocation for the function. This gets a little weird as the compiler seems to generate multiple __patchable_function_entries sections (one for each section?):
|
Multiple sections with the same name, weird :-) IMO, checking for the nops is probably sufficient. |
This issue has been open for 30 days with no activity and no assignee. It will be closed in 7 days unless a comment is added. |
This issue has been open for 30 days with no activity and no assignee. It will be closed in 7 days unless a comment is added. |
This issue was closed because it was inactive for 7 days after being marked stale. |
Trying to build a kpatch when CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY is set results in a complaint from create-diff-object that the "function ... has no fentry/mcount call, unable to patch".
The text was updated successfully, but these errors were encountered: