Commit 2dd3a8a1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v5.17-2022-02-17' of...

Merge tag 'perf-tools-fixes-for-v5.17-2022-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix corrupt inject files when only last branch option is enabled with
   ARM CoreSight ETM

 - Fix use-after-free for realloc(..., 0) in libsubcmd, found by gcc 12

 - Defer freeing string after possible strlen() on it in the BPF loader,
   found by gcc 12

 - Avoid early exit in 'perf trace' due SIGCHLD from non-workload
   processes

 - Fix arm64 perf_event_attr 'perf test's wrt --call-graph
   initialization

 - Fix libperf 32-bit build for 'perf test' wrt uint64_t printf

 - Fix perf_cpu_map__for_each_cpu macro in libperf, providing access to
   the CPU iterator

 - Sync linux/perf_event.h UAPI with the kernel sources

 - Update Jiri Olsa's email address in MAINTAINERS

* tag 'perf-tools-fixes-for-v5.17-2022-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf bpf: Defer freeing string after possible strlen() on it
  perf test: Fix arm64 perf_event_attr tests wrt --call-graph initialization
  libsubcmd: Fix use-after-free for realloc(..., 0)
  libperf: Fix perf_cpu_map__for_each_cpu macro
  perf cs-etm: Fix corrupt inject files when only last branch option is enabled
  perf cs-etm: No-op refactor of synth opt usage
  libperf: Fix 32-bit build for tests uint64_t printf
  tools headers UAPI: Sync linux/perf_event.h with the kernel sources
  perf trace: Avoid early exit due SIGCHLD from non-workload processes
  MAINTAINERS: Update Jiri's email address
parents edbd6c62 31ded153
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15147,7 +15147,7 @@ M: Ingo Molnar <mingo@redhat.com>
M:	Arnaldo Carvalho de Melo <acme@kernel.org>
R:	Mark Rutland <mark.rutland@arm.com>
R:	Alexander Shishkin <alexander.shishkin@linux.intel.com>
R:	Jiri Olsa <jolsa@redhat.com>
R:	Jiri Olsa <jolsa@kernel.org>
R:	Namhyung Kim <namhyung@kernel.org>
L:	linux-perf-users@vger.kernel.org
L:	linux-kernel@vger.kernel.org
+2 −0
Original line number Diff line number Diff line
@@ -465,6 +465,8 @@ struct perf_event_attr {
	/*
	 * User provided data if sigtrap=1, passed back to user via
	 * siginfo_t::si_perf_data, e.g. to permit user to identify the event.
	 * Note, siginfo_t::si_perf_data is long-sized, and sig_data will be
	 * truncated accordingly on 32 bit architectures.
	 */
	__u64	sig_data;
};
+1 −5
Original line number Diff line number Diff line
@@ -3,11 +3,7 @@
#define __LIBPERF_INTERNAL_CPUMAP_H

#include <linux/refcount.h>

/** A wrapper around a CPU to avoid confusion with the perf_cpu_map's map's indices. */
struct perf_cpu {
	int cpu;
};
#include <perf/cpumap.h>

/**
 * A sized, reference counted, sorted array of integers representing CPU
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,11 @@
#include <stdio.h>
#include <stdbool.h>

/** A wrapper around a CPU to avoid confusion with the perf_cpu_map's map's indices. */
struct perf_cpu {
	int cpu;
};

LIBPERF_API struct perf_cpu_map *perf_cpu_map__dummy_new(void);
LIBPERF_API struct perf_cpu_map *perf_cpu_map__default_new(void);
LIBPERF_API struct perf_cpu_map *perf_cpu_map__new(const char *cpu_list);
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ LIBPERF_0.0.1 {
	global:
		libperf_init;
		perf_cpu_map__dummy_new;
		perf_cpu_map__default_new;
		perf_cpu_map__get;
		perf_cpu_map__put;
		perf_cpu_map__new;
Loading