1. 23 Aug, 2022 1 commit
    • Kajol Jain's avatar
      powerpc/papr_scm: Fix nvdimm event mappings · 9b1ac046
      Kajol Jain authored
      Commit 4c08d4bb ("powerpc/papr_scm: Add perf interface support")
      added performance monitoring support for papr-scm nvdimm devices via
      perf interface. Commit also added an array in papr_scm_priv
      structure called "nvdimm_events_map", which got filled based on the
      result of H_SCM_PERFORMANCE_STATS hcall.
      
      Currently there is an assumption that the order of events in the
      stats buffer, returned by the hypervisor is same. And order also
      happens to matches with the events specified in nvdimm driver code.
      But this assumption is not documented in Power Architecture
      Platform Requirements (PAPR) document. Although the order
      of events happens to be same on current generation od system, but
      it might not be true in future generation systems. Fix the issue, by
      adding a static mapping for nvdimm events to corresponding stat-id,
      and removing the dynamic map from papr_scm_priv structure. Also
      remove the function papr_scm_pmu_check_events from papr_scm.c file,
      as we no longer need to copy stat-ids dynamically.
      
      Fixes: 4c08d4bb ("powerpc/papr_scm: Add perf interface support")
      Reported-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Reviewed-by: default avatarVaibhav Jain <vaibhav@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220804074852.55157-1-kjain@linux.ibm.com
      9b1ac046
  2. 22 Aug, 2022 1 commit
  3. 21 Aug, 2022 17 commits
  4. 20 Aug, 2022 15 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
    • Masahiro Yamada's avatar
      kbuild: fix the modules order between drivers and libs · 11314751
      Masahiro Yamada authored
      Commit b2c88554 ("kbuild: update modules.order only when contained
      modules are updated") accidentally changed the modules order.
      
      Prior to that commit, the modules order was determined based on
      vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order.
      
      Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m,
      drivers-y/m.
      
      Presumably, there was no practical issue because the modules in drivers
      and libs are orthogonal, but there is no reason to have this distortion.
      
      Get back to the original order.
      
      Fixes: b2c88554 ("kbuild: update modules.order only when contained modules are updated")
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      11314751
    • Nathan Chancellor's avatar
      scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length · 370655bc
      Nathan Chancellor authored
      There are no instances of this warning in the tree across several
      difference architectures and configurations. This was added by
      commit 26ea6bb1 ("kbuild, LLVMLinux: Supress warnings unless W=1-3")
      back in 2014, where it might have been necessary, but there are no
      instances of it now so stop disabling it to increase warning coverage
      for clang.
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      370655bc
    • Jiri Slaby's avatar
      kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__ · 0df499ea
      Jiri Slaby authored
      There is a test in powerpc's Kconfig which checks __LONG_DOUBLE_128__
      and sets CONFIG_PPC_LONG_DOUBLE_128 if it is understood by the compiler.
      
      We currently don't handle it, so this results in PPC_LONG_DOUBLE_128 not
      being in super-config generated by dummy-tools. So take this into
      account in the gcc script and preprocess __LONG_DOUBLE_128__ as "1".
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      0df499ea
    • Masahiro Yamada's avatar
      modpost: fix module versioning when a symbol lacks valid CRC · 5b8a9a8f
      Masahiro Yamada authored
      Since commit 7b453719 ("kbuild: link symbol CRCs at final link,
      removing CONFIG_MODULE_REL_CRCS"), module versioning is broken on
      some architectures. Loading a module fails with "disagrees about
      version of symbol module_layout".
      
      On such architectures (e.g. ARCH=sparc build with sparc64_defconfig),
      modpost shows a warning, like follows:
      
        WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
        Is "_mcount" prototyped in <asm/asm-prototypes.h>?
      
      Previously, it was a harmless warning (CRC check was just skipped),
      but now wrong CRCs are used for comparison because invalid CRCs are
      just skipped.
      
        $ sparc64-linux-gnu-nm -n vmlinux
          [snip]
        0000000000c2cea0 r __ksymtab__kstrtol
        0000000000c2ceb8 r __ksymtab__kstrtoul
        0000000000c2ced0 r __ksymtab__local_bh_enable
        0000000000c2cee8 r __ksymtab__mcount
        0000000000c2cf00 r __ksymtab__printk
        0000000000c2cf18 r __ksymtab__raw_read_lock
        0000000000c2cf30 r __ksymtab__raw_read_lock_bh
          [snip]
        0000000000c53b34 D __crc__kstrtol
        0000000000c53b38 D __crc__kstrtoul
        0000000000c53b3c D __crc__local_bh_enable
        0000000000c53b40 D __crc__printk
        0000000000c53b44 D __crc__raw_read_lock
        0000000000c53b48 D __crc__raw_read_lock_bh
      
      Please notice __crc__mcount is missing here.
      
      When the module subsystem looks up a CRC that comes after, it results
      in reading out a wrong address. For example, when __crc__printk is
      needed, the module subsystem reads 0xc53b44 instead of 0xc53b40.
      
      All CRC entries must be output for correct index accessing. Invalid
      CRCs will be unused, but are needed to keep the one-to-one mapping
      between __ksymtab_* and __crc_*.
      
      The best is to fix all modpost warnings, but several warnings are still
      remaining on less popular architectures.
      
      Fixes: 7b453719 ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS")
      Reported-by: default avatarmatoro <matoro_mailinglist_kernel@matoro.tk>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarmatoro <matoro_mailinglist_kernel@matoro.tk>
      5b8a9a8f
    • Linus Torvalds's avatar
      Merge tag 'block-6.0-2022-08-19' of git://git.kernel.dk/linux-block · b9bce6e5
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes that should go into this release:
      
         - Small series of patches for ublk (ZiyangZhang)
      
         - Remove dead function (Yu)
      
         - Fix for running a block queue in case of resource starvation
           (Yufen)"
      
      * tag 'block-6.0-2022-08-19' of git://git.kernel.dk/linux-block:
        blk-mq: run queue no matter whether the request is the last request
        blk-mq: remove unused function blk_mq_queue_stopped()
        ublk_drv: do not add a re-issued request aborted previously to ioucmd's task_work
        ublk_drv: update comment for __ublk_fail_req()
        ublk_drv: check ubq_daemon_is_dying() in __ublk_rq_task_work()
        ublk_drv: update iod->addr for UBLK_IO_NEED_GET_DATA
      b9bce6e5
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block · beaf1397
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes for regressions in this cycle:
      
         - Two instances of using the wrong "has async data" helper (Pavel)
      
         - Fixup zero-copy address import (Pavel)
      
         - Bump zero-copy notification slot limit (Pavel)"
      
      * tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block:
        io_uring/net: use right helpers for async_data
        io_uring/notif: raise limit on notification slots
        io_uring/net: improve zc addr import error handling
        io_uring/net: use right helpers for async recycle
      beaf1397
    • Linus Torvalds's avatar
      Merge tag 'ata-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 044610f8
      Linus Torvalds authored
      Pull ATA fixes from Damien Le Moal:
      
       - Add a missing command name definition for ata_get_cmd_name(), from
         me.
      
       - A fix to address a performance regression due to the default
         max_sectors queue limit for ATA devices connected to AHCI adapters
         being too small, from John.
      
      * tag 'ata-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: libata: Set __ATA_BASE_SHT max_sectors
        ata: libata-eh: Add missing command name
      044610f8
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 4d099c33
      Linus Torvalds authored
      Pull MMC host fixes from Ulf Hansson:
      
       - meson-gx: Fix error handling in ->probe()
      
       - mtk-sd: Fix a command problem when using cqe off/disable
      
       - pxamci: Fix error handling in ->probe()
      
       - sdhci-of-dwcmshc: Fix broken support for the BlueField-3 variant
      
      * tag 'mmc-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC
        mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
        mmc: mtk-sd: Clear interrupts when cqe off/disable
        mmc: pxamci: Fix another error handling path in pxamci_probe()
        mmc: pxamci: Fix an error handling path in pxamci_probe()
      4d099c33
    • John Garry's avatar
      ata: libata: Set __ATA_BASE_SHT max_sectors · a357f7b4
      John Garry authored
      Commit 0568e612 ("ata: libata-scsi: cap ata_device->max_sectors
      according to shost->max_sectors") inadvertently capped the max_sectors
      value for some SATA disks to a value which is lower than we would want.
      
      For a device which supports LBA48, we would previously have request queue
      max_sectors_kb and max_hw_sectors_kb values of 1280 and 32767 respectively.
      
      For AHCI controllers, the value chosen for shost max sectors comes from
      the minimum of the SCSI host default max sectors in
      SCSI_DEFAULT_MAX_SECTORS (1024) and the shost DMA device mapping limit.
      
      This means that we would now set the max_sectors_kb and max_hw_sectors_kb
      values for a disk which supports LBA48 at 512, ignoring DMA mapping limit.
      
      As report by Oliver at [0], this caused a performance regression.
      
      Fix by picking a large enough max sectors value for ATA host controllers
      such that we don't needlessly reduce max_sectors_kb for LBA48 disks.
      
      [0] https://lore.kernel.org/linux-ide/YvsGbidf3na5FpGb@xsang-OptiPlex-9020/T/#m22d9fc5ad15af66066dd9fecf3d50f1b1ef11da3
      
      Fixes: 0568e612 ("ata: libata-scsi: cap ata_device->max_sectors according to shost->max_sectors")
      Reported-by: default avatarOliver Sang <oliver.sang@intel.com>
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      a357f7b4
  5. 19 Aug, 2022 6 commits
    • Linus Torvalds's avatar
      Merge tag 'execve-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 50cd95ac
      Linus Torvalds authored
      Pull execve fix from Kees Cook:
      
       - Replace remaining kmap() uses with kmap_local_page() (Fabio M. De
         Francesco)
      
      * tag 'execve-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        exec: Replace kmap{,_atomic}() with kmap_local_page()
      50cd95ac
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · e45c8901
      Linus Torvalds authored
      Pull hardening fixes from Kees Cook:
      
       - Also undef LATENT_ENTROPY_PLUGIN for per-file disabling (Andrew
         Donnellan)
      
       - Return EFAULT on copy_from_user() failures in LoadPin (Kees Cook)
      
      * tag 'hardening-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file
        LoadPin: Return EFAULT on copy_from_user() failures
      e45c8901
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 8fd00059
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A fix to make the ISA extension static keys writable after init. This
         manifests at least as a crash when loading modules (including KVM).
      
       - A fixup for a build warning related to a poorly formed comment in our
         perf driver.
      
      * tag 'riscv-for-linus-6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        perf: riscv legacy: fix kerneldoc comment warning
        riscv: Ensure isa-ext static keys are writable
      8fd00059
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · ca052cfd
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
      
         - Fix unexpected sign extension of KVM_ARM_DEVICE_ID_MASK
      
         - Tidy-up handling of AArch32 on asymmetric systems
      
        x86:
      
         - Fix 'missing ENDBR' BUG for fastop functions
      
        Generic:
      
         - Some cleanup and static analyzer patches
      
         - More fixes to KVM_CREATE_VM unwind paths"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device()
        KVM: Drop unnecessary initialization of "npages" in hva_to_pfn_slow()
        x86/kvm: Fix "missing ENDBR" BUG for fastop functions
        x86/kvm: Simplify FOP_SETCC()
        x86/ibt, objtool: Add IBT_NOSEAL()
        KVM: Rename mmu_notifier_* to mmu_invalidate_*
        KVM: Rename KVM_PRIVATE_MEM_SLOTS to KVM_INTERNAL_MEM_SLOTS
        KVM: MIPS: remove unnecessary definition of KVM_PRIVATE_MEM_SLOTS
        KVM: Move coalesced MMIO initialization (back) into kvm_create_vm()
        KVM: Unconditionally get a ref to /dev/kvm module when creating a VM
        KVM: Properly unwind VM creation if creating debugfs fails
        KVM: arm64: Reject 32bit user PSTATE on asymmetric systems
        KVM: arm64: Treat PMCR_EL1.LC as RES1 on asymmetric systems
        KVM: arm64: Fix compile error due to sign extension
      ca052cfd
    • Linus Torvalds's avatar
      Merge tag 'for-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 42c54d54
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few short fixes and a lockdep warning fix (needs moving some code):
      
         - tree-log replay fixes:
            - fix error handling when looking up extent refs
            - fix warning when setting inode number of links
      
         - relocation fixes:
            - reset block group read-only status when relocation fails
            - unset control structure if transaction fails when starting
              to process a block group
            - add lockdep annotations to fix a warning during relocation
              where blocks temporarily belong to another tree and can lead
              to reversed dependencies
      
         - tree-checker verifies that extent items don't overlap"
      
      * tag 'for-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: tree-checker: check for overlapping extent items
        btrfs: fix warning during log replay when bumping inode link count
        btrfs: fix lost error handling when looking up extended ref on log replay
        btrfs: fix lockdep splat with reloc root extent buffers
        btrfs: move lockdep class helpers to locking.c
        btrfs: unset reloc control if transaction commit fails in prepare_to_relocate()
        btrfs: reset RO counter on block group if we fail to relocate
      42c54d54
    • Linus Torvalds's avatar
      Merge tag '5.20-rc2-ksmbd-smb3-server-fixes' of git://git.samba.org/ksmbd · a3a78b63
      Linus Torvalds authored
      Pull ksmbd server fixes from Steve French:
      
       - important sparse file fix
      
       - allocation size fix
      
       - fix incorrect rc on bad share
      
       - share config fix
      
      * tag '5.20-rc2-ksmbd-smb3-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: don't remove dos attribute xattr on O_TRUNC open
        ksmbd: remove unnecessary generic_fillattr in smb2_open
        ksmbd: request update to stale share config
        ksmbd: return STATUS_BAD_NETWORK_NAME error status if share is not configured
      a3a78b63