Skip to content
  1. Jun 27, 2022
  2. Jun 26, 2022
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20220626' of https://github.com/jcmvbkbc/linux-xtensa · e963d685
      Linus Torvalds authored
      Pull xtensa fixes from Max Filippov:
      
       - fix OF reference leaks in xtensa arch code
      
       - replace '.bss' with '.section .bss' to fix entry.S build with old
         assembler
      
      * tag 'xtensa-20220626' of https://github.com/jcmvbkbc/linux-xtensa:
        xtensa: change '.bss' to '.section .bss'
        xtensa: xtfpga: Fix refcount leak bug in setup
        xtensa: Fix refcount leak bug in time.c
      e963d685
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 8100775d
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - A fix for a CMA change that broke booting guests with > 2G RAM on
         Power8 hosts.
      
       - Fix the RTAS call filter to allow a special case that applications
         rely on.
      
       - A change to our execve path, to make the execve syscall exit
         tracepoint work.
      
       - Three fixes to wire up our various RNGs earlier in boot so they're
         available for use in the initial seeding in random_init().
      
       - A build fix for when KASAN is enabled along with
         STRUCTLEAK_BYREF_ALL.
      
      Thanks to Andrew Donnellan, Aneesh Kumar K.V, Christophe Leroy, Jason
      Donenfeld, Nathan Lynch, Naveen N. Rao, Sathvika Vasireddy, Sumit
      Dubey2, Tyrel Datwyler, and Zi Yan.
      
      * tag 'powerpc-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/powernv: wire up rng during setup_arch
        powerpc/prom_init: Fix build failure with GCC_PLUGIN_STRUCTLEAK_BYREF_ALL and KASAN
        powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address
        powerpc: Enable execve syscall exit tracepoint
        powerpc/pseries: wire up rng during setup_arch()
        powerpc/microwatt: wire up rng during setup_arch()
        powerpc/mm: Move CMA reservations after initmem_init()
      8100775d
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.19-2' of... · 393ed5d8
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix modpost to detect EXPORT_SYMBOL marked as __init or__exit
      
       - Update the supported arch list in the LLVM document
      
       - Avoid the second link of vmlinux for CONFIG_TRIM_UNUSED_KSYMS
      
       - Avoid false __KSYM___this_module define in include/generated/autoksyms.h
      
      * tag 'kbuild-fixes-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: Ignore __this_module in gen_autoksyms.sh
        kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt)
        Documentation/llvm: Update Supported Arch table
        modpost: fix section mismatch check for exported init/exit sections
      393ed5d8
    • Linus Torvalds's avatar
      Merge tag 'exfat-for-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · 97d4d026
      Linus Torvalds authored
      Pull exfat fix from Namjae Jeon:
      
       - Use updated exfat_chain directly instead of snapshot values in
         rename.
      
      * tag 'exfat-for-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: use updated exfat_chain directly during renaming
      97d4d026
    • Linus Torvalds's avatar
      Merge tag '5.19-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 918c30df
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Fixes addressing important multichannel, and reconnect issues.
      
        Multichannel mounts when the server network interfaces changed, or ip
        addresses changed, uncovered problems, especially in reconnect, but
        the patches for this were held up until recently due to some lock
        conflicts that are now addressed.
      
        Included in this set of fixes:
      
         - three fixes relating to multichannel reconnect, dynamically
           adjusting the list of server interfaces to avoid problems during
           reconnect
      
         - a lock conflict fix related to the above
      
         - two important fixes for negotiate on secondary channels (null
           netname can unintentionally cause multichannel to be disabled to
           some servers)
      
         - a reconnect fix (reporting incorrect IP address in some cases)"
      
      * tag '5.19-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update cifs_ses::ip_addr after failover
        cifs: avoid deadlocks while updating iface
        cifs: periodically query network interfaces from server
        cifs: during reconnect, update interface if necessary
        cifs: change iface_list from array to sorted linked list
        smb3: use netname when available on secondary channels
        smb3: fix empty netname context on secondary channels
      918c30df
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Synch KVM's svm.h header with the kernel · f8d86619
      Arnaldo Carvalho de Melo authored
      To pick up the changes from:
      
        d5af44dd ("x86/sev: Provide support for SNP guest request NAEs")
        0afb6b66 ("x86/sev: Use SEV-SNP AP creation to start secondary CPUs")
        dc3f3d24 ("x86/mm: Validate memory when changing the C-bit")
        cbd3d4f7
      
       ("x86/sev: Check SEV-SNP features support")
      
      That gets these new SVM exit reasons:
      
      +       { SVM_VMGEXIT_PSC,              "vmgexit_page_state_change" }, \
      +       { SVM_VMGEXIT_GUEST_REQUEST,    "vmgexit_guest_request" }, \
      +       { SVM_VMGEXIT_EXT_GUEST_REQUEST, "vmgexit_ext_guest_request" }, \
      +       { SVM_VMGEXIT_AP_CREATION,      "vmgexit_ap_creation" }, \
      +       { SVM_VMGEXIT_HV_FEATURES,      "vmgexit_hypervisor_feature" }, \
      
      Addressing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h'
        diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h
      
      This causes these changes:
      
        CC      /tmp/build/perf-urgent/arch/x86/util/kvm-stat.o
        LD      /tmp/build/perf-urgent/arch/x86/util/perf-in.o
        LD      /tmp/build/perf-urgent/arch/x86/perf-in.o
        LD      /tmp/build/perf-urgent/arch/perf-in.o
        LD      /tmp/build/perf-urgent/perf-in.o
        LINK    /tmp/build/perf-urgent/perf
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f8d86619
    • Arnaldo Carvalho de Melo's avatar
      tools include UAPI: Sync linux/vhost.h with the kernel sources · e2213a2d
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
        84d7c8fd ("vhost-vdpa: introduce uAPI to set group ASID")
        2d1fcb77 ("vhost-vdpa: uAPI to get virtqueue group id")
        a0c95f20 ("vhost-vdpa: introduce uAPI to get the number of address spaces")
        3ace88bd ("vhost-vdpa: introduce uAPI to get the number of virtqueue groups")
        175d493c
      
       ("vhost: move the backend feature bits to vhost_types.h")
      
      Silencing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
      To pick up these changes and support them:
      
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before
        $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after
        $ diff -u before after
        --- before	2022-06-26 12:04:35.982003781 -0300
        +++ after	2022-06-26 12:04:43.819972476 -0300
        @@ -28,6 +28,7 @@
         	[0x74] = "VDPA_SET_CONFIG",
         	[0x75] = "VDPA_SET_VRING_ENABLE",
         	[0x77] = "VDPA_SET_CONFIG_CALL",
        +	[0x7C] = "VDPA_SET_GROUP_ASID",
         };
         static const char *vhost_virtio_ioctl_read_cmds[] = {
         	[0x00] = "GET_FEATURES",
        @@ -39,5 +40,8 @@
         	[0x76] = "VDPA_GET_VRING_NUM",
         	[0x78] = "VDPA_GET_IOVA_RANGE",
         	[0x79] = "VDPA_GET_CONFIG_SIZE",
        +	[0x7A] = "VDPA_GET_AS_NUM",
        +	[0x7B] = "VDPA_GET_VRING_GROUP",
         	[0x80] = "VDPA_GET_VQS_COUNT",
        +	[0x81] = "VDPA_GET_GROUP_NUM",
         };
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Gautam Dawar <gautam.dawar@xilinx.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/lkml/Yrh3xMYbfeAD0MFL@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e2213a2d
    • Gang Li's avatar
      perf stat: Enable ignore_missing_thread · 448ce0e6
      Gang Li authored
      perf already support ignore_missing_thread for -p, but not yet
      applied to `perf stat -p <pid>`. This patch enables ignore_missing_thread
      for `perf stat -p <pid>`.
      
      Committer notes:
      
      And here is a refresher about the 'ignore_missing_thread' knob, from a
      previous patch using it:
      
        ca800068
      
       ("perf evsel: Enable ignore_missing_thread for pid option")
      
        ---
          While monitoring a multithread process with pid option, perf sometimes
          may return sys_perf_event_open failure with 3(No such process) if any of
          the process's threads die before we open the event. However, we want
          perf continue monitoring the remaining threads and do not exit with
          error.
        ---
      
      Signed-off-by: default avatarGang Li <ligang.bdlg@bytedance.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220622030037.15005-1-ligang.bdlg@bytedance.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      448ce0e6
    • Raul Silvera's avatar
      perf inject: Adjust output data offset for backward compatibility · 37ed2cdd
      Raul Silvera authored
      
      
      When 'perf inject' creates a new file, it reuses the data offset from
      the input file. If there has been a change on the size of the header, as
      happened in v5.12 -> v5.13, the new offsets will be wrong, resulting in
      a corrupted output file.
      
      This change adds the function perf_session__data_offset to compute the
      data offset based on the current header size, and uses that instead of
      the offset from the original input file.
      
      Signed-off-by: default avatarRaul Silvera <rsilvera@google.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Colin Ian King <colin.king@intel.com>
      Cc: Dave Marchevsky <davemarchevsky@fb.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220621152725.2668041-1-rsilvera@google.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      37ed2cdd
    • Arnaldo Carvalho de Melo's avatar
      perf trace beauty: Fix generation of errno id->str table on ALT Linux · 3713e249
      Arnaldo Carvalho de Melo authored
      
      
      For some reason using:
      
               cat <<EoFuncBegin
        static const char *errno_to_name__$arch(int err)
        {
               switch (err) {
        EoFuncBegin
      
      In tools/perf/trace/beauty/arch_errno_names.sh isn't working on ALT
      Linux sisyphus (development version), which could be some distro
      specific glitch, so just get this done in an alternative way that works
      everywhere while giving notice to the people working on that distro to
      try and figure our what really took place.
      
      Cc: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3713e249
    • Adrian Hunter's avatar
      perf build-id: Fix caching files with a wrong build ID · ab66fdac
      Adrian Hunter authored
      Build ID events associate a file name with a build ID.  However, when
      using perf inject, there is no guarantee that the file on the current
      machine at the current time has that build ID. Fix by comparing the
      build IDs and skip adding to the cache if they are different.
      
      Example:
      
        $ echo "int main() {return 0;}" > prog.c
        $ gcc -o prog prog.c
        $ perf record --buildid-all ./prog
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.019 MB perf.data ]
        $ file-buildid() { file $1 | awk -F= '{print $2}' | awk -F, '{print $1}' ; }
        $ file-buildid prog
        444ad9be165d8058a48ce2ffb4e9f55854a3293e
        $ file-buildid ~/.debug/$(pwd)/prog/444ad9be165d8058a48ce2ffb4e9f55854a3293e/elf
        444ad9be165d8058a48ce2ffb4e9f55854a3293e
        $ echo "int main() {return 1;}" > prog.c
        $ gcc -o prog prog.c
        $ file-buildid prog
        885524d5aaa24008a3e2b06caa3ea95d013c0fc5
      
      Before:
      
        $ perf buildid-cache --purge $(pwd)/prog
        $ perf inject -i perf.data -o junk
        $ file-buildid ~/.debug/$(pwd)/prog/444ad9be165d8058a48ce2ffb4e9f55854a3293e/elf
        885524d5aaa24008a3e2b06caa3ea95d013c0fc5
        $
      
      After:
      
        $ perf buildid-cache --purge $(pwd)/prog
        $ perf inject -i perf.data -o junk
        $ file-buildid ~/.debug/$(pwd)/prog/444ad9be165d8058a48ce2ffb4e9f55854a3293e/elf
      
        $
      
      Fixes: 454c407e
      
       ("perf: add perf-inject builtin")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: https://lore.kernel.org/r/20220621125144.5623-1-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ab66fdac
    • Arnaldo Carvalho de Melo's avatar
      tools headers cpufeatures: Sync with the kernel sources · 4b3f7644
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        d6d0c7f6 ("x86/cpufeatures: Add PerfMonV2 feature bit")
        296d5a17 ("KVM: SEV-ES: Use V_TSC_AUX if available instead of RDTSC/MSR_TSC_AUX intercepts")
        f3090339 ("x86/cpufeatures: Add virtual TSC_AUX feature bit")
        8ad7e8f6 ("x86/fpu/xsave: Support XSAVEC in the kernel")
        59bd54a8 ("x86/tdx: Detect running as a TDX guest in early boot")
        a77d41ac
      
       ("x86/cpufeatures: Add AMD Fam19h Branch Sampling feature")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
        diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
        diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Babu Moger <babu.moger@amd.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/lkml/YrDkgmwhLv+nKeOo@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4b3f7644
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync drm/i915_drm.h with the kernel sources · 0fdd435c
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        ecf8eca5 ("drm/i915/xehp: Add compute engine ABI")
        991b4de3 ("drm/i915/uapi: Add kerneldoc for engine class enum")
        c94fde8f ("drm/i915/uapi: Add DRM_I915_QUERY_GEOMETRY_SUBSLICES")
        1c671ad7 ("drm/i915/doc: Link query items to their uapi structs")
        a2e54026 ("drm/i915/doc: Convert perf UAPI comments to kerneldoc")
        462ac1cd ("drm/i915/doc: Convert drm_i915_query_topology_info comment to kerneldoc")
        034d47b2 ("drm/i915/uapi: Document DRM_I915_QUERY_HWCONFIG_BLOB")
        78e1fb31
      
       ("drm/i915/uapi: Add query for hwconfig blob")
      
      That don't add any new ioctl, so no changes in tooling.
      
      This silences this perf build warning:
      
        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
      
      Cc: John Harrison <John.C.Harrison@intel.com>
      Cc: Matt Atwood <matthew.s.atwood@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://lore.kernel.org/lkml/YrDi4ALYjv9Mdocq@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0fdd435c
    • Adrian Hunter's avatar
      perf inject: Fix missing free in copy_kcore_dir() · 342cb0d8
      Adrian Hunter authored
      Free string allocated by asprintf().
      
      Fixes: d8fc0855
      
       ("perf inject: Keep a copy of kcore_dir")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: https://lore.kernel.org/r/20220620103904.7960-1-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      342cb0d8
    • Helge Deller's avatar
      parisc: Enable ARCH_HAS_STRICT_MODULE_RWX · 0a1355db
      Helge Deller authored
      
      
      Fix a boot crash on a c8000 machine as reported by Dave.  Basically it changes
      patch_map() to return an alias mapping to the to-be-patched code in order to
      prevent writing to write-protected memory.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Suggested-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: stable@vger.kernel.org   # v5.2+
      Link: https://lore.kernel.org/all/e8ec39e8-25f8-e6b4-b7ed-4cb23efc756e@bell.net/
      0a1355db