1. 19 May, 2021 1 commit
    • Thomas Richter's avatar
      perf test: Fix libpfm4 support (63) test error for nested event groups · 316a76a5
      Thomas Richter authored
      Compiling perf with make LIBPFM4=1 includes libpfm support and
      enables test case 63 'Test libpfm4 support'. This test reports an error
      on all platforms for subtest 63.2 'test groups of --pfm-events'.
      The reported error message is 'nested event groups not supported'
      
       # ./perf test -F 63
       63: Test libpfm4 support                                            :
       63.1: test of individual --pfm-events                               :
       Error:
       failed to parse event stereolab : event not found
       Error:
       failed to parse event stereolab,instructions : event not found
       Error:
       failed to parse event instructions,stereolab : event not found
        Ok
       63.2: test groups of --pfm-events                                   :
       Error:
       nested event groups not supported    <------ Error message here
       Error:
       failed to parse event {stereolab} : event not found
       Error:
       failed to parse event {instructions,cycles},{instructions,stereolab} :\
      	 event not found
       Ok
       #
      
      This patch addresses the error message 'nested event groups not supported'.
      The root cause is function parse_libpfm_events_option() which parses the
      event string '{},{instructions}' and can not handle a leading empty
      group notation '{},...'.
      
      The code detects the first (empty) group indicator '{' but does not
      terminate group processing on the following group closing character '}'.
      So when the second group indicator '{' is detected, the code assumes
      a nested group and returns an error.
      
      With the error message fixed, also change the expected event number to
      one for the test case to succeed.
      
      While at it also fix a memory leak. In good case the function does not
      free the duplicated string given as first parameter.
      
      Output after:
       # ./perf test -F 63
       63: Test libpfm4 support                                            :
       63.1: test of individual --pfm-events                               :
       Error:
       failed to parse event stereolab : event not found
       Error:
       failed to parse event stereolab,instructions : event not found
       Error:
       failed to parse event instructions,stereolab : event not found
        Ok
       63.2: test groups of --pfm-events                                   :
       Error:
       failed to parse event {stereolab} : event not found
       Error:
       failed to parse event {instructions,cycles},{instructions,stereolab} : \
      	 event not found
        Ok
       #
      Error message 'nested event groups not supported' is gone.
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-By: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/lkml/20210517140931.2559364-1-tmricht@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      316a76a5
  2. 17 May, 2021 3 commits
    • Arnaldo Carvalho de Melo's avatar
      tools arch kvm: Sync kvm headers with the kernel sources · 3c91e8ef
      Arnaldo Carvalho de Melo authored
      To pick up the changes from:
      
        70f094f4 ("KVM: nVMX: Properly pad 'struct kvm_vmx_nested_state_hdr'")
      
      That don't entail changes in tooling.
      
      This silences these tools/perf build warnings:
      
        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
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3c91e8ef
    • Milian Wolff's avatar
      perf buildid-list: Initialize zstd_data · c67d7349
      Milian Wolff authored
      Fixes segmentation fault when trying to obtain buildid list (e.g. via
      perf-archive) from a zstd-compressed `perf.data` file:
      
      ```
          $ perf record -z ls
          ...
          [ perf record: Captured and wrote 0,010 MB perf.data, compressed (original 0,001 MB, ratio is 2,190) ]
          $ memcheck perf buildid-list
          ...
          ==57268== Invalid read of size 4
          ==57268==    at 0x5260D88: ZSTD_decompressStream (in /usr/lib/libzstd.so.1.4.9)
          ==57268==    by 0x4BB51B: zstd_decompress_stream (zstd.c:100)
          ==57268==    by 0x425C6C: perf_session__process_compressed_event (session.c:73)
          ==57268==    by 0x427450: perf_session__process_user_event (session.c:1631)
          ==57268==    by 0x42A609: reader__process_events (session.c:2207)
          ==57268==    by 0x42A609: __perf_session__process_events (session.c:2264)
          ==57268==    by 0x42A609: perf_session__process_events (session.c:2297)
          ==57268==    by 0x343A62: perf_session__list_build_ids (builtin-buildid-list.c:88)
          ==57268==    by 0x343A62: cmd_buildid_list (builtin-buildid-list.c:120)
          ==57268==    by 0x3C7732: run_builtin (perf.c:313)
          ==57268==    by 0x331157: handle_internal_command (perf.c:365)
          ==57268==    by 0x331157: run_argv (perf.c:409)
          ==57268==    by 0x331157: main (perf.c:539)
          ==57268==  Address 0x7470 is not stack'd, malloc'd or (recently) free'd
      ```
      Signed-off-by: default avatarMilian Wolff <milian.wolff@kdab.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20210429185759.59870-1-milian.wolff@kdab.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c67d7349
    • Linus Torvalds's avatar
      Merge tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 8ac91e6c
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few more fixes:
      
         - fix fiemap to print extents that could get misreported due to
           internal extent splitting and logical merging for fiemap output
      
         - fix RCU stalls during delayed iputs
      
         - fix removed dentries still existing after log is synced"
      
      * tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix removed dentries still existing after log is synced
        btrfs: return whole extents in fiemap
        btrfs: avoid RCU stalls while running delayed iputs
        btrfs: return 0 for dev_extent_hole_check_zoned hole_start in case of error
      8ac91e6c
  3. 16 May, 2021 7 commits
    • Linus Torvalds's avatar
      Linux 5.13-rc2 · d07f6ca9
      Linus Torvalds authored
      d07f6ca9
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.13-rc2' of... · 28183dbf
      Linus Torvalds authored
      Merge tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are two driver fixes for driver core changes that happened in
        5.13-rc1.
      
        The clk driver fix resolves a many-reported issue with booting some
        devices, and the USB typec fix resolves the reported problem of USB
        systems on some embedded boards.
      
        Both of these have been in linux-next this week with no reported
        issues"
      
      * tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        clk: Skip clk provider registration when np is NULL
        usb: typec: tcpm: Don't block probing of consumers of "connector" nodes
      28183dbf
    • Linus Torvalds's avatar
      Merge tag 'staging-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 6942d81a
      Linus Torvalds authored
      Pull staging and IIO driver fixes from Greg KH:
       "Here are some small IIO driver fixes and one Staging driver fix for
        5.13-rc2.
      
        Nothing major, just some resolutions for reported problems:
      
         - gcc-11 bogus warning fix for rtl8723bs
      
         - iio driver tiny fixes
      
        All of these have been in linux-next for many days with no reported
        issues"
      
      * tag 'staging-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        iio: tsl2583: Fix division by a zero lux_val
        iio: core: return ENODEV if ioctl is unknown
        iio: core: fix ioctl handlers removal
        iio: gyro: mpu3050: Fix reported temperature value
        iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER
        iio: proximity: pulsedlight: Fix rumtime PM imbalance on error
        iio: light: gp2ap002: Fix rumtime PM imbalance on error
        staging: rtl8723bs: avoid bogus gcc warning
      6942d81a
    • Linus Torvalds's avatar
      Merge tag 'usb-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 4a668429
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 5.13-rc2. They consist of a number
        of resolutions for reported issues:
      
         - typec fixes for found problems
      
         - xhci fixes and quirk additions
      
         - dwc3 driver fixes
      
         - minor fixes found by Coverity
      
         - cdc-wdm fixes for reported problems
      
        All of these have been in linux-next for a few days with no reported
        issues"
      
      * tag 'usb-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
        usb: core: hub: fix race condition about TRSMRCY of resume
        usb: typec: tcpm: Fix SINK_DISCOVERY current limit for Rp-default
        xhci: Add reset resume quirk for AMD xhci controller.
        usb: xhci: Increase timeout for HC halt
        xhci: Do not use GFP_KERNEL in (potentially) atomic context
        xhci: Fix giving back cancelled URBs even if halted endpoint can't reset
        xhci-pci: Allow host runtime PM as default for Intel Alder Lake xHCI
        usb: musb: Fix an error message
        usb: typec: tcpm: Fix wrong handling for Not_Supported in VDM AMS
        usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work
        usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4
        usb: fotg210-hcd: Fix an error message
        docs: usb: function: Modify path name
        usb: dwc3: omap: improve extcon initialization
        usb: typec: ucsi: Put fwnode in any case during ->probe()
        usb: typec: tcpm: Fix wrong handling in GET_SINK_CAP
        usb: dwc2: Remove obsolete MODULE_ constants from platform.c
        usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe()
        usb: dwc3: imx8mp: detect dwc3 core node via compatible string
        usb: dwc3: gadget: Return success always for kick transfer in ep queue
        ...
      4a668429
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8ce36481
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "Two fixes for timers:
      
         - Use the ALARM feature check in the alarmtimer core code insted of
           the old method of checking for the set_alarm() callback.
      
           Drivers can have that callback set but the feature bit cleared. If
           such a RTC device is selected then alarms wont work.
      
         - Use a proper define to let the preprocessor check whether Hyper-V
           VDSO clocksource should be active.
      
           The code used a constant in an enum with #ifdef, which evaluates to
           always false and disabled the clocksource for VDSO"
      
      * tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86
        alarmtimer: Check RTC features instead of ops
      8ce36481
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · f44e58bb
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - two patches for error path fixes
      
       - a small series for fixing a regression with swiotlb with Xen on Arm
      
      * tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/swiotlb: check if the swiotlb has already been initialized
        arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required
        xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h
        xen/unpopulated-alloc: fix error return code in fill_list()
        xen/gntdev: fix gntdev_mmap() error exit path
      f44e58bb
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.13_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ccb013c2
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
       "The three SEV commits are not really urgent material. But we figured
        since getting them in now will avoid a huge amount of conflicts
        between future SEV changes touching tip, the kvm and probably other
        trees, sending them to you now would be best.
      
        The idea is that the tip, kvm etc branches for 5.14 will all base
        ontop of -rc2 and thus everything will be peachy. What is more, those
        changes are purely mechanical and defines movement so they should be
        fine to go now (famous last words).
      
        Summary:
      
         - Enable -Wundef for the compressed kernel build stage
      
         - Reorganize SEV code to streamline and simplify future development"
      
      * tag 'x86_urgent_for_v5.13_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/compressed: Enable -Wundef
        x86/msr: Rename MSR_K8_SYSCFG to MSR_AMD64_SYSCFG
        x86/sev: Move GHCB MSR protocol and NAE definitions in a common header
        x86/sev-es: Rename sev-es.{ch} to sev.{ch}
      ccb013c2
  4. 15 May, 2021 27 commits
  5. 14 May, 2021 2 commits