1. 29 Aug, 2022 3 commits
    • Anshuman Khandual's avatar
      perf: Capture branch privilege information · 5402d25a
      Anshuman Khandual authored
      Platforms like arm64 could capture privilege level information for all the
      branch records. Hence this adds a new element in the struct branch_entry to
      record the privilege level information, which could be requested through a
      new event.attr.branch_sample_type based flag PERF_SAMPLE_BRANCH_PRIV_SAVE.
      This flag helps user choose whether privilege information is captured.
      Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lkml.kernel.org/r/20220824044822.70230-4-anshuman.khandual@arm.com
      5402d25a
    • Anshuman Khandual's avatar
      perf: Extend branch type classification · b190bc4a
      Anshuman Khandual authored
      branch_entry.type now has ran out of space to accommodate more branch types
      classification. This will prevent perf branch stack implementation on arm64
      (via BRBE) to capture all available branch types. Extending this bit field
      i.e branch_entry.type [4 bits] is not an option as it will break user space
      ABI both for little and big endian perf tools.
      
      Extend branch classification with a new field branch_entry.new_type via a
      new branch type PERF_BR_EXTEND_ABI in branch_entry.type. Perf tools which
      could decode PERF_BR_EXTEND_ABI, will then parse branch_entry.new_type as
      well.
      
      branch_entry.new_type is a 4 bit field which can hold upto 16 branch types.
      The first three branch types will hold various generic page faults followed
      by five architecture specific branch types, which can be overridden by the
      platform for specific use cases. These architecture specific branch types
      gets overridden on arm64 platform for BRBE implementation.
      
      New generic branch types
      
       - PERF_BR_NEW_FAULT_ALGN
       - PERF_BR_NEW_FAULT_DATA
       - PERF_BR_NEW_FAULT_INST
      
      New arch specific branch types
      
       - PERF_BR_NEW_ARCH_1
       - PERF_BR_NEW_ARCH_2
       - PERF_BR_NEW_ARCH_3
       - PERF_BR_NEW_ARCH_4
       - PERF_BR_NEW_ARCH_5
      Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lkml.kernel.org/r/20220824044822.70230-3-anshuman.khandual@arm.com
      b190bc4a
    • Anshuman Khandual's avatar
      perf: Add system error and not in transaction branch types · a724ec82
      Anshuman Khandual authored
      This expands generic branch type classification by adding two more entries
      there in i.e system error and not in transaction. This also updates the x86
      implementation to process X86_BR_NO_TX records as appropriate. This changes
      branch types reported to user space on x86 platform but it should not be a
      problem. The possible scenarios and impacts are enumerated here.
      
       --------------------------------------------------------------------------
       | kernel | perf tool |                     Impact                        |
       --------------------------------------------------------------------------
       |   old  |    old    |  Works as before                                  |
       --------------------------------------------------------------------------
       |   old  |    new    |  PERF_BR_UNKNOWN is processed                     |
       --------------------------------------------------------------------------
       |   new  |    old    |  PERF_BR_NO_TX is blocked via old PERF_BR_MAX     |
       --------------------------------------------------------------------------
       |   new  |    new    |  PERF_BR_NO_TX is recognized                      |
       --------------------------------------------------------------------------
      
      When PERF_BR_NO_TX is blocked via old PERF_BR_MAX (new kernel with old perf
      tool) the user space might throw up an warning complaining about an
      unrecognized branch types being reported, but it's expected. PERF_BR_SERROR
      & PERF_BR_NO_TX branch types will be used for BRBE implementation on arm64
      platform.
      
      PERF_BR_NO_TX complements 'abort' and 'in_tx' elements in perf_branch_entry
      which represent other transaction states for a given branch record. Because
      this completes the transaction state classification.
      Signed-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lkml.kernel.org/r/20220824044822.70230-2-anshuman.khandual@arm.com
      a724ec82
  2. 26 Aug, 2022 13 commits
  3. 22 Aug, 2022 1 commit
  4. 21 Aug, 2022 17 commits
  5. 20 Aug, 2022 6 commits
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.0' of... · 15b3f48a
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix module versioning broken on some architectures
      
       - Make dummy-tools enable CONFIG_PPC_LONG_DOUBLE_128
      
       - Remove -Wformat-zero-length, which has no warning instance
      
       - Fix the order between drivers and libs in modules.order
      
       - Fix false-positive warnings in clang-analyzer
      
      * tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check
        kbuild: fix the modules order between drivers and libs
        scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length
        kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__
        modpost: fix module versioning when a symbol lacks valid CRC
      15b3f48a
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of... · 16b3d851
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix alignment for cpu map masks in event encoding.
      
       - Support reading PERF_FORMAT_LOST, perf tool counterpart for a feature
         that was added in this merge window.
      
       - Sync perf tools copies of kernel headers: socket, msr-index, fscrypt,
         cpufeatures, i915_drm, kvm, vhost, perf_event.
      
      * tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Support reading PERF_FORMAT_LOST
        libperf: Add a test case for read formats
        libperf: Handle read format in perf_evsel__read()
        tools headers UAPI: Sync linux/perf_event.h with the kernel sources
        tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources
        tools headers UAPI: Sync KVM's vmx.h header with the kernel sources
        tools include UAPI: Sync linux/vhost.h with the kernel sources
        tools headers kvm s390: Sync headers with the kernel sources
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
        tools headers cpufeatures: Sync with the kernel sources
        tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf beauty: Update copy of linux/socket.h with the kernel sources
        perf cpumap: Fix alignment for masks in event encoding
        perf cpumap: Compute mask size in constant time
        perf cpumap: Synthetic events and const/static
        perf cpumap: Const map for max()
      16b3d851
    • Linus Torvalds's avatar
      Merge tag 's390-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · cc1807b9
      Linus Torvalds authored
      Pull s390 updates from Alexander Gordeev:
      
       - Fix a KVM crash on z12 and older machines caused by a wrong
         assumption that Query AP Configuration Information is always
         available.
      
       - Lower severity of excessive Hypervisor filesystem error messages
         when booting under KVM.
      
      * tag 's390-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/ap: fix crash on older machines based on QCI info missing
        s390/hypfs: avoid error message under KVM
      cc1807b9
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 32dd68f1
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix atomic sleep warnings at boot due to get_phb_number() taking a
         mutex with a spinlock held on some machines.
      
       - Add missing PMU selftests to .gitignores.
      
      Thanks to Guenter Roeck and Russell Currey.
      
      * tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        selftests/powerpc: Add missing PMU selftests to .gitignores
        powerpc/pci: Fix get_phb_number() locking
      32dd68f1
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · f31c32ef
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "A few minor fixes:
      
         - Fix buffer management in SRP to correct a regression with the login
           authentication feature from v5.17
      
         - Don't iterate over non-present ports in mlx5
      
         - Fix an error introduced by the foritify work in cxgb4
      
         - Two bug fixes for the recently merged ERDMA driver
      
         - Unbreak RDMA dmabuf support, a regresion from v5.19"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA: Handle the return code from dma_resv_wait_timeout() properly
        RDMA/erdma: Correct the max_qp and max_cq capacities of the device
        RDMA/erdma: Using the key in FMR WR instead of MR structure
        RDMA/cxgb4: fix accept failure due to increased cpl_t5_pass_accept_rpl size
        RDMA/mlx5: Use the proper number of ports
        IB/iser: Fix login with authentication
      f31c32ef
    • Guru Das Srinagesh's avatar
      scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check · 4be72c1b
      Guru Das Srinagesh authored
      This `clang-analyzer` check flags the use of memset(), suggesting a more
      secure version of the API, such as memset_s(), which does not exist in
      the kernel:
      
        warning: Call to function 'memset' is insecure as it does not provide
        security checks introduced in the C11 standard. Replace with analogous
        functions that support length arguments or provides boundary checks such
        as 'memset_s' in case of C11
        [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
      Signed-off-by: default avatarGuru Das Srinagesh <quic_gurus@quicinc.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      4be72c1b