Ben Hutchings
fdb2f4c79a
perf pmu: Suppress potential format-truncation warning
...
commit 11a64a05dc649815670b1be9fe63d205cb076401 upstream.
Depending on which functions are inlined in util/pmu.c, the snprintf()
calls in perf_pmu__parse_{scale,unit,per_pkg,snapshot}() might trigger a
warning:
util/pmu.c: In function 'pmu_aliases':
util/pmu.c:178:31: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
snprintf(path, PATH_MAX, "%s/%s.unit", dir, name);
^~
I found this when trying to build perf from Linux 3.16 with gcc 8.
However I can reproduce the problem in mainline if I force
__perf_pmu__new_alias() to be inlined.
Suppress this by using scnprintf() as has been done elsewhere in perf.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20181111184524.fux4taownc6ndbx6@decadent.org.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-09 16:16:43 +01:00
..
arch
perf probe powerpc: Ignore SyS symbols irrespective of endianness
2018-10-10 08:53:20 +02:00
bench
perf bench: Fix numa report output code
2018-08-24 13:12:32 +02:00
Documentation
perf top/report: Add tips about a list option
2016-10-05 19:51:53 -03:00
jvmti
perf jit: Fix build issue on Ubuntu
2016-10-17 11:25:34 -03:00
pmu-events
perf tools: Fix build with ARCH=x86_64
2018-01-23 19:57:07 +01:00
python
perf python: Add tracepoint example
2016-07-12 16:23:35 -03:00
scripts
perf script python: Fix export-to-postgresql.py occasional failure
2018-10-18 09:13:21 +02:00
tests
perf tests: Fix indexing when invoking subtests
2018-11-10 07:42:56 -08:00
trace
perf trace: Check if MAP_32BIT is defined (again)
2017-01-26 08:24:36 +01:00
ui
perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
2017-07-27 15:08:06 -07:00
util
perf pmu: Suppress potential format-truncation warning
2019-01-09 16:16:43 +01:00
.gitignore
perf tools: Add arch/*/include/generated/ to .gitignore
2016-05-30 12:41:46 -03:00
Build
perf tools: Set and pass DOCDIR to builtin-report.c
2016-01-12 12:42:07 -03:00
builtin-annotate.c
perf annotate: Add branch stack / basic block
2016-09-08 13:44:03 -03:00
builtin-bench.c
builtin-buildid-cache.c
tools: Introduce str_error_r()
2016-07-12 15:19:47 -03:00
builtin-buildid-list.c
builtin-config.c
perf config: Reimplement show_config() using config_set__for_each
2016-06-23 17:23:00 -03:00
builtin-data.c
perf data ctf: Add '--all' option for 'perf data convert'
2016-06-28 10:54:57 -03:00
builtin-diff.c
perf diff: Fix -o/--order option behavior (again)
2017-02-14 15:25:42 -08:00
builtin-evlist.c
perf evlist: Rename for_each() macros to for_each_entry()
2016-06-23 11:26:15 -03:00
builtin-help.c
tools: Introduce str_error_r()
2016-07-12 15:19:47 -03:00
builtin-inject.c
perf symbols: Remove symbol_filter_t machinery
2016-09-05 11:14:50 -03:00
builtin-kmem.c
perf symbols: Remove symbol_filter_t machinery
2016-09-05 11:14:50 -03:00
builtin-kvm.c
perf kvm: Use NSEC_PER_USEC
2016-08-23 15:37:33 -03:00
builtin-list.c
perf list: Support long jevents descriptions
2016-10-03 21:35:47 -03:00
builtin-lock.c
builtin-mem.c
perf mem: Fix --all-user/--all-kernel options
2017-01-26 08:24:35 +01:00
builtin-probe.c
perf probe: Return errno when not hitting any event
2018-03-22 09:17:40 +01:00
builtin-record.c
perf record: Add support for using symbols in address filters
2016-09-29 11:17:02 -03:00
builtin-report.c
perf report: Enable group view with hierarchy
2016-09-13 16:43:41 -03:00
builtin-sched.c
perf sched: Use linux/time64.h
2016-08-23 15:37:33 -03:00
builtin-script.c
perf symbols: Remove symbol_filter_t machinery
2016-09-05 11:14:50 -03:00
builtin-stat.c
perf stat: Fix core dump when flag T is used
2018-05-30 07:50:45 +02:00
builtin-timechart.c
perf timechart: Use NSEC_PER_U?SEC
2016-08-23 15:37:33 -03:00
builtin-top.c
perf top: Fix top.call-graph config option reading
2018-05-30 07:50:45 +02:00
builtin-trace.c
perf trace: Add mmap alias for s390
2018-04-13 19:48:17 +02:00
builtin-version.c
builtin.h
perf tools: Remove needless 'extern' from function prototypes
2016-03-23 15:06:35 -03:00
check-headers.sh
tools include uapi: Grab copies of stat.h and fcntl.h
2018-06-05 10:28:56 +02:00
command-list.txt
perf tools: Do not show trace command if it's not compiled in
2016-01-08 12:46:17 -03:00
CREDITS
design.txt
Makefile
perf tools: Disable parallelism for 'make clean'
2018-11-10 07:42:57 -08:00
Makefile.config
perf tools: Fix build with ARCH=x86_64
2018-01-23 19:57:07 +01:00
Makefile.perf
perf tools: Move headers check into bash script
2018-06-05 10:28:56 +02:00
MANIFEST
tools include: Introduce linux/bug.h, from the kernel sources
2018-06-05 10:28:56 +02:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf powerpc: Fix build-test failure
2016-09-08 13:44:07 -03:00
perf-with-kcore.sh
perf.c
perf tools: Just pr_debug() about not being able to read cacheline_size
2016-07-15 10:08:29 -03:00
perf.h
perf tools: Allow overriding MAX_NR_CPUS at compile time
2018-09-19 22:47:13 +02:00