Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Various fixes: - synchronize kernel and tooling headers - cgroup support fix - two tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/headers: Synchronize kernel ABI headers perf/cgroup: Fix perf cgroup hierarchy support perf tools: Unwind properly location after REJECT perf symbols: Fix memory corruption because of zero length symbols
This commit is contained in:
commit
9d9cc4aa00
|
@ -901,9 +901,11 @@ list_update_cgroup_event(struct perf_event *event,
|
||||||
cpuctx_entry = &cpuctx->cgrp_cpuctx_entry;
|
cpuctx_entry = &cpuctx->cgrp_cpuctx_entry;
|
||||||
/* cpuctx->cgrp is NULL unless a cgroup event is active in this CPU .*/
|
/* cpuctx->cgrp is NULL unless a cgroup event is active in this CPU .*/
|
||||||
if (add) {
|
if (add) {
|
||||||
|
struct perf_cgroup *cgrp = perf_cgroup_from_task(current, ctx);
|
||||||
|
|
||||||
list_add(cpuctx_entry, this_cpu_ptr(&cgrp_cpuctx_list));
|
list_add(cpuctx_entry, this_cpu_ptr(&cgrp_cpuctx_list));
|
||||||
if (perf_cgroup_from_task(current, ctx) == event->cgrp)
|
if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup))
|
||||||
cpuctx->cgrp = event->cgrp;
|
cpuctx->cgrp = cgrp;
|
||||||
} else {
|
} else {
|
||||||
list_del(cpuctx_entry);
|
list_del(cpuctx_entry);
|
||||||
cpuctx->cgrp = NULL;
|
cpuctx->cgrp = NULL;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#ifndef _ASM_X86_DISABLED_FEATURES_H
|
#ifndef _ASM_X86_DISABLED_FEATURES_H
|
||||||
#define _ASM_X86_DISABLED_FEATURES_H
|
#define _ASM_X86_DISABLED_FEATURES_H
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#ifndef _ASM_X86_REQUIRED_FEATURES_H
|
#ifndef _ASM_X86_REQUIRED_FEATURES_H
|
||||||
#define _ASM_X86_REQUIRED_FEATURES_H
|
#define _ASM_X86_REQUIRED_FEATURES_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI_ASM_X86_UNISTD_H
|
#ifndef _UAPI_ASM_X86_UNISTD_H
|
||||||
#define _UAPI_ASM_X86_UNISTD_H
|
#define _UAPI_ASM_X86_UNISTD_H
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
/* Copyright 2002 Andi Kleen */
|
/* Copyright 2002 Andi Kleen */
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
#include <asm/cpufeatures.h>
|
#include <asm/cpufeatures.h>
|
||||||
#include <asm/alternative-asm.h>
|
#include <asm/alternative-asm.h>
|
||||||
|
#include <asm/export.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We build a jump to memcpy_orig by default which gets NOPped out on
|
* We build a jump to memcpy_orig by default which gets NOPped out on
|
||||||
|
@ -41,6 +41,8 @@ ENTRY(memcpy)
|
||||||
ret
|
ret
|
||||||
ENDPROC(memcpy)
|
ENDPROC(memcpy)
|
||||||
ENDPROC(__memcpy)
|
ENDPROC(__memcpy)
|
||||||
|
EXPORT_SYMBOL(memcpy)
|
||||||
|
EXPORT_SYMBOL(__memcpy)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* memcpy_erms() - enhanced fast string memcpy. This is faster and
|
* memcpy_erms() - enhanced fast string memcpy. This is faster and
|
||||||
|
@ -275,6 +277,7 @@ ENTRY(memcpy_mcsafe_unrolled)
|
||||||
xorq %rax, %rax
|
xorq %rax, %rax
|
||||||
ret
|
ret
|
||||||
ENDPROC(memcpy_mcsafe_unrolled)
|
ENDPROC(memcpy_mcsafe_unrolled)
|
||||||
|
EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled)
|
||||||
|
|
||||||
.section .fixup, "ax"
|
.section .fixup, "ax"
|
||||||
/* Return -EFAULT for any failure */
|
/* Return -EFAULT for any failure */
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#ifndef _ASM_GENERIC_BITOPS___FLS_H_
|
#ifndef _ASM_GENERIC_BITOPS___FLS_H_
|
||||||
#define _ASM_GENERIC_BITOPS___FLS_H_
|
#define _ASM_GENERIC_BITOPS___FLS_H_
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
|
#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
|
||||||
#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
|
#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
|
#ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
|
||||||
#define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
|
#define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#ifndef _ASM_GENERIC_BITOPS_FLS_H_
|
#ifndef _ASM_GENERIC_BITOPS_FLS_H_
|
||||||
#define _ASM_GENERIC_BITOPS_FLS_H_
|
#define _ASM_GENERIC_BITOPS_FLS_H_
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
|
#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
|
||||||
#define _ASM_GENERIC_BITOPS_FLS64_H_
|
#define _ASM_GENERIC_BITOPS_FLS64_H_
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#ifndef _TOOLS_ASM_EXPORT_H
|
||||||
|
#define _TOOLS_ASM_EXPORT_H
|
||||||
|
|
||||||
|
#define EXPORT_SYMBOL(x)
|
||||||
|
#define EXPORT_SYMBOL_GPL(x)
|
||||||
|
|
||||||
|
#endif /* _TOOLS_ASM_EXPORT_H */
|
|
@ -1,4 +1,3 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#ifndef _LINUX_HASH_H
|
#ifndef _LINUX_HASH_H
|
||||||
#define _LINUX_HASH_H
|
#define _LINUX_HASH_H
|
||||||
/* Fast hashing routine for ints, longs and pointers.
|
/* Fast hashing routine for ints, longs and pointers.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef __ASM_GENERIC_IOCTLS_H
|
#ifndef __ASM_GENERIC_IOCTLS_H
|
||||||
#define __ASM_GENERIC_IOCTLS_H
|
#define __ASM_GENERIC_IOCTLS_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef __ASM_GENERIC_MMAN_COMMON_H
|
#ifndef __ASM_GENERIC_MMAN_COMMON_H
|
||||||
#define __ASM_GENERIC_MMAN_COMMON_H
|
#define __ASM_GENERIC_MMAN_COMMON_H
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef __ASM_GENERIC_MMAN_H
|
#ifndef __ASM_GENERIC_MMAN_H
|
||||||
#define __ASM_GENERIC_MMAN_H
|
#define __ASM_GENERIC_MMAN_H
|
||||||
|
|
||||||
#include <uapi/asm-generic/mman-common.h>
|
#include <asm-generic/mman-common.h>
|
||||||
|
|
||||||
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
|
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
|
||||||
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
|
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
|
/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -569,10 +570,9 @@ union bpf_attr {
|
||||||
* @flags: reserved for future use
|
* @flags: reserved for future use
|
||||||
* Return: 0 on success or negative error code
|
* Return: 0 on success or negative error code
|
||||||
*
|
*
|
||||||
* int bpf_sk_redirect_map(skb, map, key, flags)
|
* int bpf_sk_redirect_map(map, key, flags)
|
||||||
* Redirect skb to a sock in map using key as a lookup key for the
|
* Redirect skb to a sock in map using key as a lookup key for the
|
||||||
* sock in map.
|
* sock in map.
|
||||||
* @skb: pointer to skb
|
|
||||||
* @map: pointer to sockmap
|
* @map: pointer to sockmap
|
||||||
* @key: key to lookup sock in map
|
* @key: key to lookup sock in map
|
||||||
* @flags: reserved for future use
|
* @flags: reserved for future use
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI__LINUX_BPF_COMMON_H__
|
#ifndef _UAPI__LINUX_BPF_COMMON_H__
|
||||||
#define _UAPI__LINUX_BPF_COMMON_H__
|
#define _UAPI__LINUX_BPF_COMMON_H__
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI_LINUX_FCNTL_H
|
#ifndef _UAPI_LINUX_FCNTL_H
|
||||||
#define _UAPI_LINUX_FCNTL_H
|
#define _UAPI_LINUX_FCNTL_H
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI_LINUX_HW_BREAKPOINT_H
|
#ifndef _UAPI_LINUX_HW_BREAKPOINT_H
|
||||||
#define _UAPI_LINUX_HW_BREAKPOINT_H
|
#define _UAPI_LINUX_HW_BREAKPOINT_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef __LINUX_KVM_H
|
#ifndef __LINUX_KVM_H
|
||||||
#define __LINUX_KVM_H
|
#define __LINUX_KVM_H
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI_LINUX_MMAN_H
|
#ifndef _UAPI_LINUX_MMAN_H
|
||||||
#define _UAPI_LINUX_MMAN_H
|
#define _UAPI_LINUX_MMAN_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
/*
|
/*
|
||||||
* Performance events:
|
* Performance events:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI_LINUX_SCHED_H
|
#ifndef _UAPI_LINUX_SCHED_H
|
||||||
#define _UAPI_LINUX_SCHED_H
|
#define _UAPI_LINUX_SCHED_H
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _UAPI_LINUX_STAT_H
|
#ifndef _UAPI_LINUX_STAT_H
|
||||||
#define _UAPI_LINUX_STAT_H
|
#define _UAPI_LINUX_STAT_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
#ifndef _LINUX_VHOST_H
|
#ifndef _LINUX_VHOST_H
|
||||||
#define _LINUX_VHOST_H
|
#define _LINUX_VHOST_H
|
||||||
/* Userspace interface for in-kernel virtio accelerators. */
|
/* Userspace interface for in-kernel virtio accelerators. */
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||||
/*
|
/*
|
||||||
* Advanced Linux Sound Architecture - ALSA - Driver
|
* Advanced Linux Sound Architecture - ALSA - Driver
|
||||||
* Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
|
* Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
|
||||||
|
|
|
@ -606,9 +606,19 @@ static struct arch *arch__find(const char *name)
|
||||||
int symbol__alloc_hist(struct symbol *sym)
|
int symbol__alloc_hist(struct symbol *sym)
|
||||||
{
|
{
|
||||||
struct annotation *notes = symbol__annotation(sym);
|
struct annotation *notes = symbol__annotation(sym);
|
||||||
const size_t size = symbol__size(sym);
|
size_t size = symbol__size(sym);
|
||||||
size_t sizeof_sym_hist;
|
size_t sizeof_sym_hist;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add buffer of one element for zero length symbol.
|
||||||
|
* When sample is taken from first instruction of
|
||||||
|
* zero length symbol, perf still resolves it and
|
||||||
|
* shows symbol name in perf report and allows to
|
||||||
|
* annotate it.
|
||||||
|
*/
|
||||||
|
if (size == 0)
|
||||||
|
size = 1;
|
||||||
|
|
||||||
/* Check for overflow when calculating sizeof_sym_hist */
|
/* Check for overflow when calculating sizeof_sym_hist */
|
||||||
if (size > (SIZE_MAX - sizeof(struct sym_hist)) / sizeof(struct sym_hist_entry))
|
if (size > (SIZE_MAX - sizeof(struct sym_hist)) / sizeof(struct sym_hist_entry))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -154,6 +154,10 @@ do { \
|
||||||
yycolumn += yyleng; \
|
yycolumn += yyleng; \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
#define USER_REJECT \
|
||||||
|
yycolumn -= yyleng; \
|
||||||
|
REJECT
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%x mem
|
%x mem
|
||||||
|
@ -335,8 +339,8 @@ r{num_raw_hex} { return raw(yyscanner); }
|
||||||
{num_hex} { return value(yyscanner, 16); }
|
{num_hex} { return value(yyscanner, 16); }
|
||||||
|
|
||||||
{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
|
{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
|
||||||
{bpf_object} { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_OBJECT); }
|
{bpf_object} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); }
|
||||||
{bpf_source} { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_SOURCE); }
|
{bpf_source} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); }
|
||||||
{name} { return pmu_str_check(yyscanner); }
|
{name} { return pmu_str_check(yyscanner); }
|
||||||
"/" { BEGIN(config); return '/'; }
|
"/" { BEGIN(config); return '/'; }
|
||||||
- { return '-'; }
|
- { return '-'; }
|
||||||
|
|
Loading…
Reference in New Issue