Commit ea7f880
tracing/cfi: Fix cmp_entries_* functions signature mismatch
[ Upstream commit 7ce1bb8 ]
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/202110141140.zzi4dRh4-lkp@intel.com/
Link: https://lkml.kernel.org/r/20211014045217.3265162-1-kaleshsingh@google.com
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 5736f1d commit ea7f880
1 file changed
Lines changed: 23 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
| 837 | + | |
839 | 838 | | |
| 839 | + | |
840 | 840 | | |
841 | 841 | | |
842 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
843 | 846 | | |
844 | 847 | | |
845 | 848 | | |
846 | 849 | | |
847 | 850 | | |
848 | | - | |
849 | | - | |
| 851 | + | |
850 | 852 | | |
851 | 853 | | |
| 854 | + | |
852 | 855 | | |
853 | 856 | | |
854 | 857 | | |
855 | 858 | | |
856 | 859 | | |
857 | 860 | | |
858 | | - | |
859 | | - | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
860 | 866 | | |
861 | 867 | | |
862 | 868 | | |
| |||
873 | 879 | | |
874 | 880 | | |
875 | 881 | | |
876 | | - | |
877 | | - | |
| 882 | + | |
878 | 883 | | |
879 | 884 | | |
| 885 | + | |
880 | 886 | | |
881 | 887 | | |
882 | 888 | | |
883 | 889 | | |
884 | 890 | | |
885 | 891 | | |
886 | | - | |
887 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
888 | 897 | | |
889 | 898 | | |
890 | 899 | | |
| |||
989 | 998 | | |
990 | 999 | | |
991 | 1000 | | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
| 1001 | + | |
| 1002 | + | |
996 | 1003 | | |
997 | 1004 | | |
998 | 1005 | | |
| |||
1061 | 1068 | | |
1062 | 1069 | | |
1063 | 1070 | | |
1064 | | - | |
1065 | | - | |
| 1071 | + | |
1066 | 1072 | | |
1067 | 1073 | | |
1068 | 1074 | | |
| |||
0 commit comments