linux-stable/tools/perf
Thomas Richter 0b56244bda perf bench numa: Address compiler error on s390
[ Upstream commit f8ac1c4784 ]

The compilation on s390 results in this error:

  # make DEBUG=y bench/numa.o
  ...
  bench/numa.c: In function ‘__bench_numa’:
  bench/numa.c:1749:81: error: ‘%d’ directive output may be truncated
              writing between 1 and 11 bytes into a region of size between
              10 and 20 [-Werror=format-truncation=]
  1749 |        snprintf(tname, sizeof(tname), "process%d:thread%d", p, t);
                                                               ^~
  ...
  bench/numa.c:1749:64: note: directive argument in the range
                 [-2147483647, 2147483646]
  ...
  #

The maximum length of the %d replacement is 11 characters because of the
negative sign.  Therefore extend the array by two more characters.

Output after:

  # make  DEBUG=y bench/numa.o > /dev/null 2>&1; ll bench/numa.o
  -rw-r--r-- 1 root root 418320 May 19 09:11 bench/numa.o
  #

Fixes: 3aff8ba0a4 ("perf bench numa: Avoid possible truncation when using snprintf()")
Suggested-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/20220520081158.2990006-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:57:34 +02:00
..
arch perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform 2022-05-25 09:57:34 +02:00
bench perf bench numa: Address compiler error on s390 2022-05-25 09:57:34 +02:00
dlfilters perf tests: Add dlfilter test 2021-08-11 09:35:44 -03:00
Documentation perf doc: Fix typos all over the place 2021-09-27 09:32:28 -03:00
examples/bpf
include perf build: Move perf_dlfilters.h in the source tree 2021-08-11 09:35:24 -03:00
jvmti
pmu-events perf vendor events: Update metrics for SkyLake Server 2022-04-08 14:24:15 +02:00
python
scripts perf scripts python: intel-pt-events.py: Fix printing of switch events 2022-01-05 12:42:40 +01:00
tests perf tests: Remove bash construct from record+zstd_comp_decomp.sh 2021-11-25 09:48:33 +01:00
trace perf beauty: Cover more flags in the move_mount syscall argument beautifier 2021-09-10 18:15:22 -03:00
ui perf annotate: Avoid TUI crash when navigating in the annotation of recursive functions 2022-01-20 09:13:15 +01:00
util perf build: Fix check for btf__load_from_kernel_by_id() in libbpf 2022-05-25 09:57:34 +02:00
.gitignore perf tools: Ignore Documentation dependency file 2021-09-11 15:36:16 -03:00
Build
builtin-annotate.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-bench.c perf bench: Add benchmark for evlist open/close operations 2021-08-10 11:32:37 -03:00
builtin-buildid-cache.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-buildid-list.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-c2c.c Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
builtin-config.c
builtin-daemon.c
builtin-data.c perf data: Correct -h output 2021-08-31 15:12:00 -03:00
builtin-diff.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-evlist.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-ftrace.c
builtin-help.c
builtin-inject.c perf inject: Fix segfault due to perf_data__fd() without open 2021-12-22 09:32:48 +01:00
builtin-kallsyms.c
builtin-kmem.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-kvm.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-list.c
builtin-lock.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-mem.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-probe.c perf probe: Do not show @plt function by default 2021-07-07 10:28:10 -03:00
builtin-record.c Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
builtin-report.c perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event 2022-04-27 14:38:59 +02:00
builtin-sched.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-script.c perf script: Always allow field 'data_src' for auxtrace 2022-04-27 14:38:59 +02:00
builtin-stat.c perf stat: Fix forked applications enablement of counters 2022-04-08 14:23:51 +02:00
builtin-timechart.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-top.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-trace.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-version.c
builtin.h
check-headers.sh perf report: Add tools/arch/x86/include/asm/amd-ibs.h 2021-09-10 18:13:20 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Fix check for btf__load_from_kernel_by_id() in libbpf 2022-05-25 09:57:34 +02:00
Makefile.perf perf build: Suppress 'rm dlfilter' build message 2021-10-31 12:51:41 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf tools: Fix perf's libperf_print callback 2022-04-13 20:59:20 +02:00
perf.h