Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf trace: Fix non-listed archs in the syscalltbl routines

This fixes a build breakage on 32-bit arm, where the
syscalltbl__id_at_idx() function was missing.

Committer notes:

Generating a proper syscall table from a copy of
arch/arm/tools/syscall.tbl ends up being too big a patch for this rc
stage, I started doing it but while testing noticed some other problems
with using BPF to collect pointer args on arm7 (32-bit) will maybe
continue trying to make it work on the next cycle...

Fixes: 7a2fb5619cc1fb53 ("perf trace: Fix iteration of syscall ids in syscalltbl->entries")
Suggested-by: Howard Chu <howardchu95@gmail.com>
Signed-off-by: <jslaby@suse.cz>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/lkml/3a592835-a14f-40be-8961-c0cee7720a94@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jiri Slaby and committed by
Arnaldo Carvalho de Melo
5d35634e 7fbff3c0

+10
+10
tools/perf/util/syscalltbl.c
··· 46 46 #include <asm/syscalls.c> 47 47 const int syscalltbl_native_max_id = SYSCALLTBL_LOONGARCH_MAX_ID; 48 48 static const char *const *syscalltbl_native = syscalltbl_loongarch; 49 + #else 50 + const int syscalltbl_native_max_id = 0; 51 + static const char *const syscalltbl_native[] = { 52 + [0] = "unknown", 53 + }; 49 54 #endif 50 55 51 56 struct syscall { ··· 185 180 int syscalltbl__id(struct syscalltbl *tbl, const char *name) 186 181 { 187 182 return audit_name_to_syscall(name, tbl->audit_machine); 183 + } 184 + 185 + int syscalltbl__id_at_idx(struct syscalltbl *tbl __maybe_unused, int idx) 186 + { 187 + return idx; 188 188 } 189 189 190 190 int syscalltbl__strglobmatch_next(struct syscalltbl *tbl __maybe_unused,