diff options
author | Kalesh Singh <[email protected]> | 2021-10-13 21:52:17 -0700 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2021-10-19 20:33:20 -0400 |
commit | 7ce1bb83a14019f8c396d57ec704d19478747716 (patch) | |
tree | 65a4bf69b390fa68576a8afd0102e2ecf0596c62 /include/linux/trace_recursion.h | |
parent | 34cdd18b8d245f3e901e5325313c27de727ab80d (diff) |
tracing/cfi: Fix cmp_entries_* functions signature mismatch
If CONFIG_CFI_CLANG=y, attempting to read an event histogram will cause
the kernel to panic due to failed CFI check.
1. echo 'hist:keys=common_pid' >> events/sched/sched_switch/trigger
2. cat events/sched/sched_switch/hist
3. kernel panics on attempting to read hist
This happens because the sort() function expects a generic
int (*)(const void *, const void *) pointer for the compare function.
To prevent this CFI failure, change tracing map cmp_entries_* function
signatures to match this.
Also, fix the build error reported by the kernel test robot [1].
[1] https://lore.kernel.org/r/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kalesh Singh <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'include/linux/trace_recursion.h')
0 files changed, 0 insertions, 0 deletions