Commit 22f12a0e authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-urgent-for-mingo-5.4-20191017' of...

Merge tag 'perf-urgent-for-mingo-5.4-20191017' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

perf buildid-cache:

  Adrian Hunter:

  - Fix mode setting in copyfile_mode_ns() when copying /proc/kcore.

perf evlist:

  Andi Kleen:

  - Fix freeing id arrays.

tools headers:

  - Sync sched.h anc kvm.h headers with the kernel sources.

perf jvmti:

  Thomas Richter:

  - Link against tools/lib/ctype.o to have weak strlcpy().

perf annotate:

  Gustavo A. R. Silva:

  - Fix multiple memory and file descriptor leaks, found by coverity.

perf c2c/kmem:

  Yunfeng Ye:

   - Fix leaks in error handling paths in 'perf c2c', 'perf kmem',  found by
     internal static analysis tool.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 13301c6b 1abecfca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@
#define SVM_EXIT_MWAIT         0x08b
#define SVM_EXIT_MWAIT_COND    0x08c
#define SVM_EXIT_XSETBV        0x08d
#define SVM_EXIT_RDPRU         0x08e
#define SVM_EXIT_NPF           0x400
#define SVM_EXIT_AVIC_INCOMPLETE_IPI		0x401
#define SVM_EXIT_AVIC_UNACCELERATED_ACCESS	0x402
+5 −1
Original line number Diff line number Diff line
@@ -86,6 +86,8 @@
#define EXIT_REASON_PML_FULL            62
#define EXIT_REASON_XSAVES              63
#define EXIT_REASON_XRSTORS             64
#define EXIT_REASON_UMWAIT              67
#define EXIT_REASON_TPAUSE              68

#define VMX_EXIT_REASONS \
	{ EXIT_REASON_EXCEPTION_NMI,         "EXCEPTION_NMI" }, \
@@ -144,7 +146,9 @@
	{ EXIT_REASON_RDSEED,                "RDSEED" }, \
	{ EXIT_REASON_PML_FULL,              "PML_FULL" }, \
	{ EXIT_REASON_XSAVES,                "XSAVES" }, \
	{ EXIT_REASON_XRSTORS,               "XRSTORS" }
	{ EXIT_REASON_XRSTORS,               "XRSTORS" }, \
	{ EXIT_REASON_UMWAIT,                "UMWAIT" }, \
	{ EXIT_REASON_TPAUSE,                "TPAUSE" }

#define VMX_ABORT_SAVE_GUEST_MSR_FAIL        1
#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL       2
+2 −0
Original line number Diff line number Diff line
@@ -999,6 +999,7 @@ struct kvm_ppc_resize_hpt {
#define KVM_CAP_ARM_PTRAUTH_GENERIC 172
#define KVM_CAP_PMU_EVENT_FILTER 173
#define KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 174
#define KVM_CAP_HYPERV_DIRECT_TLBFLUSH 175

#ifdef KVM_CAP_IRQ_ROUTING

@@ -1145,6 +1146,7 @@ struct kvm_dirty_tlb {
#define KVM_REG_S390		0x5000000000000000ULL
#define KVM_REG_ARM64		0x6000000000000000ULL
#define KVM_REG_MIPS		0x7000000000000000ULL
#define KVM_REG_RISCV		0x8000000000000000ULL

#define KVM_REG_SIZE_SHIFT	52
#define KVM_REG_SIZE_MASK	0x00f0000000000000ULL
+28 −2
Original line number Diff line number Diff line
@@ -33,8 +33,31 @@
#define CLONE_NEWNET		0x40000000	/* New network namespace */
#define CLONE_IO		0x80000000	/* Clone io context */

/*
 * Arguments for the clone3 syscall
#ifndef __ASSEMBLY__
/**
 * struct clone_args - arguments for the clone3 syscall
 * @flags:       Flags for the new process as listed above.
 *               All flags are valid except for CSIGNAL and
 *               CLONE_DETACHED.
 * @pidfd:       If CLONE_PIDFD is set, a pidfd will be
 *               returned in this argument.
 * @child_tid:   If CLONE_CHILD_SETTID is set, the TID of the
 *               child process will be returned in the child's
 *               memory.
 * @parent_tid:  If CLONE_PARENT_SETTID is set, the TID of
 *               the child process will be returned in the
 *               parent's memory.
 * @exit_signal: The exit_signal the parent process will be
 *               sent when the child exits.
 * @stack:       Specify the location of the stack for the
 *               child process.
 * @stack_size:  The size of the stack for the child process.
 * @tls:         If CLONE_SETTLS is set, the tls descriptor
 *               is set to tls.
 *
 * The structure is versioned by size and thus extensible.
 * New struct members must go at the end of the struct and
 * must be properly 64bit aligned.
 */
struct clone_args {
	__aligned_u64 flags;
@@ -46,6 +69,9 @@ struct clone_args {
	__aligned_u64 stack_size;
	__aligned_u64 tls;
};
#endif

#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */

/*
 * Scheduling policies
+9 −5
Original line number Diff line number Diff line
@@ -2635,6 +2635,7 @@ static int build_cl_output(char *cl_sort, bool no_source)
	bool add_sym   = false;
	bool add_dso   = false;
	bool add_src   = false;
	int ret = 0;

	if (!buf)
		return -ENOMEM;
@@ -2653,7 +2654,8 @@ static int build_cl_output(char *cl_sort, bool no_source)
			add_dso = true;
		} else if (strcmp(tok, "offset")) {
			pr_err("unrecognized sort token: %s\n", tok);
			return -EINVAL;
			ret = -EINVAL;
			goto err;
		}
	}

@@ -2676,13 +2678,15 @@ static int build_cl_output(char *cl_sort, bool no_source)
		add_sym ? "symbol," : "",
		add_dso ? "dso," : "",
		add_src ? "cl_srcline," : "",
		"node") < 0)
		return -ENOMEM;
		"node") < 0) {
		ret = -ENOMEM;
		goto err;
	}

	c2c.show_src = add_src;

err:
	free(buf);
	return 0;
	return ret;
}

static int setup_coalesce(const char *coalesce, bool no_source)
Loading