1. 29 7月, 2019 10 次提交
    • A
      libbpf: fix missing __WORDSIZE definition · 8aa259b1
      Andrii Nakryiko 提交于
      hashmap.h depends on __WORDSIZE being defined. It is defined by
      glibc/musl in different headers. It's an explicit goal for musl to be
      "non-detectable" at compilation time, so instead include glibc header if
      glibc is explicitly detected and fall back to musl header otherwise.
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NAndrii Nakryiko <andriin@fb.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexei Starovoitov <ast@fb.com>
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Fixes: e3b92422 ("libbpf: add resizable non-thread safe internal hashmap")
      Link: https://lkml.kernel.org/r/20190718173021.2418606-1-andriin@fb.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8aa259b1
    • V
      perf tools: Fix perf.data documentation units for memory size · 2e9a06dd
      Vince Weaver 提交于
      The perf.data-file-format documentation incorrectly says the
      HEADER_TOTAL_MEM results are in bytes.  The results are in kilobytes
      (perf reads the value from /proc/meminfo)
      Signed-off-by: NVince Weaver <vincent.weaver@maine.edu>
      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>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907251155500.22624@macbook-airSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2e9a06dd
    • N
      perf header: Fix use of unitialized value warning · 20f9781f
      Numfor Mbiziwo-Tiapo 提交于
      When building our local version of perf with MSAN (Memory Sanitizer) and
      running the perf record command, MSAN throws a use of uninitialized
      value warning in "tools/perf/util/util.c:333:6".
      
      This warning stems from the "buf" variable being passed into "write".
      It originated as the variable "ev" with the type union perf_event*
      defined in the "perf_event__synthesize_attr" function in
      "tools/perf/util/header.c".
      
      In the "perf_event__synthesize_attr" function they allocate space with a malloc
      call using ev, then go on to only assign some of the member variables before
      passing "ev" on as a parameter to the "process" function therefore "ev"
      contains uninitialized memory. Changing the malloc call to zalloc to initialize
      all the members of "ev" which gets rid of the warning.
      
      To reproduce this warning, build perf by running:
      make -C tools/perf CLANG=1 CC=clang EXTRA_CFLAGS="-fsanitize=memory\
       -fsanitize-memory-track-origins"
      
      (Additionally, llvm might have to be installed and clang might have to
      be specified as the compiler - export CC=/usr/bin/clang)
      
      then running:
      tools/perf/perf record -o - ls / | tools/perf/perf --no-pager annotate\
       -i - --stdio
      
      Please see the cover letter for why false positive warnings may be
      generated.
      Signed-off-by: NNumfor Mbiziwo-Tiapo <nums@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Drayton <mbd@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/20190724234500.253358-2-nums@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      20f9781f
    • V
      perf header: Fix divide by zero error if f_header.attr_size==0 · 7622236c
      Vince Weaver 提交于
      So I have been having lots of trouble with hand-crafted perf.data files
      causing segfaults and the like, so I have started fuzzing the perf tool.
      
      First issue found:
      
      If f_header.attr_size is 0 in the perf.data file, then perf will crash
      with a divide-by-zero error.
      
      Committer note:
      
      Added a pr_err() to tell the user why the command failed.
      Signed-off-by: NVince Weaver <vincent.weaver@maine.edu>
      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>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907231100440.14532@macbook-airSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7622236c
    • A
      tools headers UAPI: Sync if_link.h with the kernel · e54599c9
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        07a4ddec ("bonding: add an option to specify a delay between peer notifications")
      
      And silence this build warning:
      
        Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Vincent Bernat <vincent@bernat.ch>
      Link: https://lkml.kernel.org/n/tip-3liw4exxh8goc0rq9xryl2kv@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e54599c9
    • A
      tools headers UAPI: Sync sched.h with the kernel · c093de6b
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        a509a7cd ("sched/uclamp: Extend sched_setattr() to support utilization clamping")
        1d6362fa ("sched/core: Allow sched_setattr() to use the current policy")
        7f192e3c ("fork: add clone3")
      
      And silence this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h'
        diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.h
      
      No changes in tools/ due to the above.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Brauner <christian@brauner.io>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Patrick Bellasi <patrick.bellasi@arm.com>
      Link: https://lkml.kernel.org/n/tip-mtrpsjrux5hgyr5uf8l1aa46@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c093de6b
    • A
      tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl · 0f58163c
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        6d101f24 ("USB: add usbfs ioctl to retrieve the connection parameters")
      
      And address this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/usbdevice_fs.h' differs from latest version at 'include/uapi/linux/usbdevice_fs.h'
        diff -u tools/include/uapi/linux/usbdevice_fs.h include/uapi/linux/usbdevice_fs.h
      
      Which ends up autogenerating a ioctl_cmd->string table used by 'perf
      trace':
      
        $ tools/perf/trace/beauty/usbdevfs_ioctl.sh > before
        $ cp include/uapi/linux/usbdevice_fs.h tools/include/uapi/linux/usbdevice_fs.h
        $ tools/perf/trace/beauty/usbdevfs_ioctl.sh > after
        $ diff -u before after
        --- before 2019-07-26 15:26:55.513636844 -0300
        +++ after 2019-07-26 15:29:11.650518677 -0300
        @@ -23,6 +23,7 @@
                [2] = "BULK",
                [30] = "DROP_PRIVILEGES",
                [31] = "GET_SPEED",
        +       [32] = "CONNINFO_EX",
                [3] = "RESETEP",
                [4] = "SETINTERFACE",
                [5] = "SETCONFIGURATION",
        $
      
      Now 'perf trace' ioctl beautifier will translate this new ioctl to a
      string and at some point will allow filtering the 'ioctl' syscall with
      something like this in a system wide strace-like sessin:
      
        # perf trace -e ioctl/cmd=USBDEVFS_CONNINFO_EX/
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-tkdfbgzqypwco96b309c0ovd@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0f58163c
    • A
      tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC() · 7ee52615
      Arnaldo Carvalho de Melo 提交于
      In addition to _IOW() and _IOR(), to handle this case:
      
        #define USBDEVFS_CONNINFO_EX(len)  _IOC(_IOC_READ, 'U', 32, len)
      
      That will happen in the next sync of this header file.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-3br5e4t64e4lp0goo84che3s@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7ee52615
    • A
      tools headers UAPI: Update tools's copy of drm.h headers · 95dc663a
      Arnaldo Carvalho de Melo 提交于
      Picking the changes from:
      
        c5d3e39c ("drm/i915: Engine discovery query")
        a88b6e4c ("drm/i915: Allow specification of parallel execbuf")
        ee113690 ("drm/i915/execlists: Virtual engine bonding")
        6d06779e ("drm/i915: Load balancing across a virtual engine")
        b81dde71 ("drm/i915: Allow userspace to clone contexts on creation")
        8319f44c ("drm/i915: Re-expose SINGLE_TIMELINE flags for context creation")
        e620f7b3 ("drm/i915: Extend I915_CONTEXT_PARAM_SSEU to support local ctx->engine[]")
        976b55f0 ("drm/i915: Allow a context to define its set of engines")
        7f3f317a ("drm/i915: Restore control over ppgtt for context creation ABI")
        75b3f1cb ("drm: Fix drm.h uapi header for GNU/kFreeBSD")
      
      Silencing these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h'
        diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h
        Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
        diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
      
      Now 'perf trace' and other code that might use the tools/perf/trace/beauty autogenerated
      tables will be able to translate this new ioctl code into a string:
      
        $ tools/perf/trace/beauty/drm_ioctl.sh > before
        $ cp include/uapi/drm/i915_drm.h tools/include/uapi/drm/i915_drm.h
        $ tools/perf/trace/beauty/drm_ioctl.sh > after
        $ diff -u before after
        --- before 2019-07-26 13:02:22.052723640 -0300
        +++ after 2019-07-26 13:02:35.354906036 -0300
        @@ -163,4 +163,6 @@
                [DRM_COMMAND_BASE + 0x37] = "I915_PERF_ADD_CONFIG",
                [DRM_COMMAND_BASE + 0x38] = "I915_PERF_REMOVE_CONFIG",
                [DRM_COMMAND_BASE + 0x39] = "I915_QUERY",
        +       [DRM_COMMAND_BASE + 0x3a] = "I915_GEM_VM_CREATE",
        +       [DRM_COMMAND_BASE + 0x3b] = "I915_GEM_VM_DESTROY",
         };
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: James Clarke <jrtc27@jrtc27.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://lkml.kernel.org/n/tip-a9173whgu3h1vo24jgdg5do8@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      95dc663a
    • A
      tools headers UAPI: Update tools's copy of mman.h headers · b830f94f
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        8aa3c927 ("mm/mmap: move common defines to mman-common.h")
        22fcea6f ("mm: move MAP_SYNC to asm-generic/mman-common.h")
        0bf5f949 ("mm: fix the MAP_UNINITIALIZED flag")
      
      To address the following perf build warnings:
      
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h'
        diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h'
        diff -u tools/include/uapi/asm-generic/mman.h include/uapi/asm-generic/mman.h
      
      That ends up just moving a bit the auto-generated code->string tables:
      
        $ tools/perf/trace/beauty/mmap_flags.sh > before
        $ cp include/uapi/asm-generic/mman.h tools/include/uapi/asm-generic/mman.h
        $ cp include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman-common.h
        $ tools/perf/trace/beauty/mmap_flags.sh > after
        $ diff -u before after
        --- before 2019-07-26 12:45:02.948335904 -0300
        +++ after 2019-07-26 12:48:05.342893539 -0300
        @@ -4,15 +4,15 @@
                [ilog2(0x02) + 1] = "PRIVATE",
                [ilog2(0x10) + 1] = "FIXED",
                [ilog2(0x20) + 1] = "ANONYMOUS",
        +       [ilog2(0x008000) + 1] = "POPULATE",
        +       [ilog2(0x010000) + 1] = "NONBLOCK",
        +       [ilog2(0x020000) + 1] = "STACK",
        +       [ilog2(0x040000) + 1] = "HUGETLB",
        +       [ilog2(0x080000) + 1] = "SYNC",
                [ilog2(0x100000) + 1] = "FIXED_NOREPLACE",
                [ilog2(0x0100) + 1] = "GROWSDOWN",
                [ilog2(0x0800) + 1] = "DENYWRITE",
                [ilog2(0x1000) + 1] = "EXECUTABLE",
                [ilog2(0x2000) + 1] = "LOCKED",
                [ilog2(0x4000) + 1] = "NORESERVE",
        -       [ilog2(0x8000) + 1] = "POPULATE",
        -       [ilog2(0x10000) + 1] = "NONBLOCK",
        -       [ilog2(0x20000) + 1] = "STACK",
        -       [ilog2(0x40000) + 1] = "HUGETLB",
        -       [ilog2(0x80000) + 1] = "SYNC",
         };
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-fzqvzni9megaurmsp0k4vy27@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b830f94f
  2. 26 7月, 2019 2 次提交
    • A
      tools headers UAPI: Update tools's copy of kvm.h headers · e0d99c4d
      Arnaldo Carvalho de Melo 提交于
      Picking the changes from:
      
        66bb8a06 ("KVM: x86: PMU Event Filter")
        f087a029 ("KVM: nVMX: Stash L1's CR3 in vmcs01.GUEST_CR3 on nested entry w/o EPT")
        99adb567 ("KVM: arm/arm64: Add save/restore support for firmware workaround state")
      
      Silencing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
        diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
        diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
      
      Now 'perf trace' and other code that might use the tools/perf/trace/beauty autogenerated
      tables will be able to translate this new ioctl code into a string:
      
        $ tools/perf/trace/beauty/kvm_ioctl.sh > before
        $
        $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
        $ tools/perf/trace/beauty/kvm_ioctl.sh > after
        $ diff -u before after
        --- before 2019-07-26 12:32:47.959220236 -0300
        +++ after 2019-07-26 12:33:05.766464871 -0300
        @@ -79,6 +79,7 @@
              [0xac] = "SET_ONE_REG",
              [0xad] = "KVMCLOCK_CTRL",
              [0xb0] = "GET_REG_LIST",
        +     [0xb2] = "SET_PMU_EVENT_FILTER",
              [0xb7] = "SMI",
              [0xba] = "MEMORY_ENCRYPT_OP",
              [0xbb] = "MEMORY_ENCRYPT_REG_REGION",
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Eric Hankland <ehankland@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Sean Christopherson <sean.j.christopherson@intel.com>
      Link: https://lkml.kernel.org/n/tip-py1gcmt6rboehlwg6zvagfg2@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e0d99c4d
    • A
      tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up... · 820571af
      Arnaldo Carvalho de Melo 提交于
      tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open
      
        05a70a8e ("unistd: protect clone3 via __ARCH_WANT_SYS_CLONE3")
        8f3220a8 ("arch: wire-up clone3() syscall")
        7615d9e1 ("arch: wire-up pidfd_open()")
      
      Silencing the following tools/perf build warnings
      
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
        diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
        Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
      
      Now 'perf trace -e pidfd*,clone*' will trace those syscalls as well as the
      others with those prefixes.
      
        $ diff -u /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c
        --- /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before	2019-07-26 12:24:55.020944201 -0300
        +++ /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c	2019-07-26 12:25:03.919047217 -0300
        @@ -344,5 +344,7 @@
              [431] = "fsconfig",
              [432] = "fsmount",
              [433] = "fspick",
        +     [434] = "pidfd_open",
        +     [435] = "clone3",
         };
        -#define SYSCALLTBL_x86_64_MAX_ID 433
        +#define SYSCALLTBL_x86_64_MAX_ID 435
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Christian Brauner <christian@brauner.io>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-0isnnqxtr1ihz6p8wzjiy47d@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      820571af
  3. 25 7月, 2019 5 次提交
  4. 24 7月, 2019 1 次提交
    • I
      Merge tag 'perf-urgent-for-mingo-5.3-20190723' of... · 49902052
      Ingo Molnar 提交于
      Merge tag 'perf-urgent-for-mingo-5.3-20190723' 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.data:
      
        Alexey Budankov:
      
        - Fix loading of compressed data split across adjacent records
      
        Jiri Olsa:
      
        - Fix buffer size setting for processing CPU topology perf.data header.
      
      perf stat:
      
        Jiri Olsa:
      
        - Fix segfault for event group in repeat mode
      
        Cong Wang:
      
        - Always separate "stalled cycles per insn" line, it was being appended to
          the "instructions" line.
      
      perf script:
      
        Andi Kleen:
      
        - Fix --max-blocks man page description.
      
        - Improve man page description of metrics.
      
        - Fix off by one in brstackinsn IPC computation.
      
      perf probe:
      
        Arnaldo Carvalho de Melo:
      
        - Avoid calling freeing routine multiple times for same pointer.
      
      perf build:
      
        - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings
          treated as errors, breaking the build.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      49902052
  5. 23 7月, 2019 15 次提交
  6. 22 7月, 2019 7 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 83768245
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Several netfilter fixes including a nfnetlink deadlock fix from
          Florian Westphal and fix for dropping VRF packets from Miaohe Lin.
      
       2) Flow offload fixes from Pablo Neira Ayuso including a fix to restore
          proper block sharing.
      
       3) Fix r8169 PHY init from Thomas Voegtle.
      
       4) Fix memory leak in mac80211, from Lorenzo Bianconi.
      
       5) Missing NULL check on object allocation in cxgb4, from Navid
          Emamdoost.
      
       6) Fix scaling of RX power in sfp phy driver, from Andrew Lunn.
      
       7) Check that there is actually an ip header to access in skb->data in
          VRF, from Peter Kosyh.
      
       8) Remove spurious rcu unlock in hv_netvsc, from Haiyang Zhang.
      
       9) One more tweak the the TCP fragmentation memory limit changes, to be
          less harmful to applications setting small SO_SNDBUF values. From
          Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (40 commits)
        tcp: be more careful in tcp_fragment()
        hv_netvsc: Fix extra rcu_read_unlock in netvsc_recv_callback()
        vrf: make sure skb->data contains ip header to make routing
        connector: remove redundant input callback from cn_dev
        qed: Prefer pcie_capability_read_word()
        igc: Prefer pcie_capability_read_word()
        cxgb4: Prefer pcie_capability_read_word()
        be2net: Synchronize be_update_queues with dev_watchdog
        bnx2x: Prevent load reordering in tx completion processing
        net: phy: sfp: hwmon: Fix scaling of RX power
        net: sched: verify that q!=NULL before setting q->flags
        chelsio: Fix a typo in a function name
        allocate_flower_entry: should check for null deref
        net: hns3: typo in the name of a constant
        kbuild: add net/netfilter/nf_tables_offload.h to header-test blacklist.
        tipc: Fix a typo
        mac80211: don't warn about CW params when not using them
        mac80211: fix possible memory leak in ieee80211_assign_beacon
        nl80211: fix NL80211_HE_MAX_CAPABILITY_LEN
        nl80211: fix VENDOR_CMD_RAW_DATA
        ...
      83768245
    • S
      pidfd: fix a poll race when setting exit_state · b191d649
      Suren Baghdasaryan 提交于
      There is a race between reading task->exit_state in pidfd_poll and
      writing it after do_notify_parent calls do_notify_pidfd. Expected
      sequence of events is:
      
      CPU 0                            CPU 1
      ------------------------------------------------
      exit_notify
        do_notify_parent
          do_notify_pidfd
        tsk->exit_state = EXIT_DEAD
                                        pidfd_poll
                                           if (tsk->exit_state)
      
      However nothing prevents the following sequence:
      
      CPU 0                            CPU 1
      ------------------------------------------------
      exit_notify
        do_notify_parent
          do_notify_pidfd
                                         pidfd_poll
                                            if (tsk->exit_state)
        tsk->exit_state = EXIT_DEAD
      
      This causes a polling task to wait forever, since poll blocks because
      exit_state is 0 and the waiting task is not notified again. A stress
      test continuously doing pidfd poll and process exits uncovered this bug.
      
      To fix it, we make sure that the task's exit_state is always set before
      calling do_notify_pidfd.
      
      Fixes: b53b0b9d ("pidfd: add polling support")
      Cc: kernel-team@android.com
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: NSuren Baghdasaryan <surenb@google.com>
      Signed-off-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      Link: https://lore.kernel.org/r/20190717172100.261204-1-joel@joelfernandes.org
      [christian@brauner.io: adapt commit message and drop unneeded changes from wait_task_zombie]
      Signed-off-by: NChristian Brauner <christian@brauner.io>
      b191d649
    • E
      tcp: be more careful in tcp_fragment() · b617158d
      Eric Dumazet 提交于
      Some applications set tiny SO_SNDBUF values and expect
      TCP to just work. Recent patches to address CVE-2019-11478
      broke them in case of losses, since retransmits might
      be prevented.
      
      We should allow these flows to make progress.
      
      This patch allows the first and last skb in retransmit queue
      to be split even if memory limits are hit.
      
      It also adds the some room due to the fact that tcp_sendmsg()
      and tcp_sendpage() might overshoot sk_wmem_queued by about one full
      TSO skb (64KB size). Note this allowance was already present
      in stable backports for kernels < 4.15
      
      Note for < 4.15 backports :
       tcp_rtx_queue_tail() will probably look like :
      
      static inline struct sk_buff *tcp_rtx_queue_tail(const struct sock *sk)
      {
      	struct sk_buff *skb = tcp_send_head(sk);
      
      	return skb ? tcp_write_queue_prev(sk, skb) : tcp_write_queue_tail(sk);
      }
      
      Fixes: f070ef2a ("tcp: tcp_fragment() should apply sane memory limits")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NAndrew Prout <aprout@ll.mit.edu>
      Tested-by: NAndrew Prout <aprout@ll.mit.edu>
      Tested-by: NJonathan Lemon <jonathan.lemon@gmail.com>
      Tested-by: NMichal Kubecek <mkubecek@suse.cz>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Acked-by: NYuchung Cheng <ycheng@google.com>
      Acked-by: NChristoph Paasch <cpaasch@apple.com>
      Cc: Jonathan Looney <jtl@netflix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b617158d
    • H
      hv_netvsc: Fix extra rcu_read_unlock in netvsc_recv_callback() · be4363bd
      Haiyang Zhang 提交于
      There is an extra rcu_read_unlock left in netvsc_recv_callback(),
      after a previous patch that removes RCU from this function.
      This patch removes the extra RCU unlock.
      
      Fixes: 345ac089 ("hv_netvsc: pass netvsc_device to receive callback")
      Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be4363bd
    • L
      Linus 5.3-rc1 · 5f9e832c
      Linus Torvalds 提交于
      5f9e832c
    • P
      vrf: make sure skb->data contains ip header to make routing · 107e47cc
      Peter Kosyh 提交于
      vrf_process_v4_outbound() and vrf_process_v6_outbound() do routing
      using ip/ipv6 addresses, but don't make sure the header is available
      in skb->data[] (skb_headlen() is less then header size).
      
      Case:
      
      1) igb driver from intel.
      2) Packet size is greater then 255.
      3) MPLS forwards to VRF device.
      
      So, patch adds pskb_may_pull() calls in vrf_process_v4/v6_outbound()
      functions.
      Signed-off-by: NPeter Kosyh <p.kosyh@gmail.com>
      Reviewed-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      107e47cc
    • V
      connector: remove redundant input callback from cn_dev · 903e9d1b
      Vasily Averin 提交于
      A small cleanup: this callback is never used.
      Originally fixed by Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
      for OpenVZ7 bug OVZ-6877
      
      cc: stanislav.kinsburskiy@gmail.com
      Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      903e9d1b