1. 20 Jun, 2022 5 commits
    • Matthew Wilcox (Oracle)'s avatar
      filemap: Correct the conditions for marking a folio as accessed · 5ccc944d
      Matthew Wilcox (Oracle) authored
      We had an off-by-one error which meant that we never marked the first page
      in a read as accessed.  This was visible as a slowdown when re-reading
      a file as pages were being evicted from cache too soon.  In reviewing
      this code, we noticed a second bug where a multi-page folio would be
      marked as accessed multiple times when doing reads that were less than
      the size of the folio.
      
      Abstract the comparison of whether two file positions are in the same
      folio into a new function, fixing both of these bugs.
      Reported-by: default avatarYu Kuai <yukuai3@huawei.com>
      Reviewed-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      5ccc944d
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 78ca5588
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Eight fixes, all in drivers (ufs, scsi_debug, storvsc, iscsi, ibmvfc).
      
        Apart from the ufs command clearing updates, these are mostly minor
        and obvious fixes"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ibmvfc: Store vhost pointer during subcrq allocation
        scsi: ibmvfc: Allocate/free queue resource only during probe/remove
        scsi: storvsc: Correct reporting of Hyper-V I/O size limits
        scsi: ufs: Fix a race between the interrupt handler and the reset handler
        scsi: ufs: Support clearing multiple commands at once
        scsi: ufs: Simplify ufshcd_clear_cmd()
        scsi: iscsi: Exclude zero from the endpoint ID range
        scsi: scsi_debug: Fix zone transition to full condition
      78ca5588
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.19-2022-06-19' of... · c5b3a094
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.19-2022-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool fixes from Arnaldo Carvalho de Melo:
      
       - Don't set data source if it's not a memory operation in ARM SPE
         (Statistical Profiling Extensions).
      
       - Fix handling of exponent floating point values in perf stat
         expressions.
      
       - Don't leak fd on failure on libperf open.
      
       - Fix 'perf test' CPU topology test for PPC guest systems.
      
       - Fix undefined behaviour on breakpoint account 'perf test' entry.
      
       - Record only user callchains on the "Check ARM64 callgraphs are
         complete in FP mode" 'perf test' entry.
      
       - Fix "perf stat CSV output linter" test on s390.
      
       - Sync batch of kernel headers with tools/perf/.
      
      * tag 'perf-tools-fixes-for-v5.19-2022-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        tools headers UAPI: Sync linux/prctl.h with the kernel sources
        perf metrics: Ensure at least 1 id per metric
        tools headers arm64: Sync arm64's cputype.h with the kernel sources
        tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources
        perf arm-spe: Don't set data source if it's not a memory operation
        perf expr: Allow exponents on floating point values
        perf test topology: Use !strncmp(right platform) to fix guest PPC comparision check
        perf test: Record only user callchains on the "Check Arm64 callgraphs are complete in fp mode" test
        perf beauty: Update copy of linux/socket.h with the kernel sources
        perf test: Fix variable length array undefined behavior in bp_account
        libperf evsel: Open shouldn't leak fd on failure
        perf test: Fix "perf stat CSV output linter" test on s390
        perf unwind: Fix uninitialized variable
      c5b3a094
    • Linus Torvalds's avatar
      Merge tag 'slab-for-5.19-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab · 59b785fe
      Linus Torvalds authored
      Pull slab fixes from Vlastimil Babka:
      
       - A slub fix for PREEMPT_RT locking semantics from Sebastian.
      
       - A slub fix for state corruption due to a possible race scenario from
         Jann.
      
      * tag 'slab-for-5.19-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
        mm/slub: add missing TID updates on slab deactivation
        mm/slub: Move the stackdepot related allocation out of IRQ-off section.
      59b785fe
    • Gerd Hoffmann's avatar
      udmabuf: add back sanity check · 05b252cc
      Gerd Hoffmann authored
      Check vm_fault->pgoff before using it.  When we removed the warning, we
      also removed the check.
      
      Fixes: 7b26e4e2 ("udmabuf: drop WARN_ON() check.")
      Reported-by: zdi-disclosures@trendmicro.com
      Suggested-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      05b252cc
  2. 19 Jun, 2022 24 commits
  3. 18 Jun, 2022 9 commits
  4. 17 Jun, 2022 2 commits
    • Kirill A. Shutemov's avatar
      x86/tdx: Handle load_unaligned_zeropad() page-cross to a shared page · 1e776965
      Kirill A. Shutemov authored
      load_unaligned_zeropad() can lead to unwanted loads across page boundaries.
      The unwanted loads are typically harmless. But, they might be made to
      totally unrelated or even unmapped memory. load_unaligned_zeropad()
      relies on exception fixup (#PF, #GP and now #VE) to recover from these
      unwanted loads.
      
      In TDX guests, the second page can be shared page and a VMM may configure
      it to trigger #VE.
      
      The kernel assumes that #VE on a shared page is an MMIO access and tries to
      decode instruction to handle it. In case of load_unaligned_zeropad() it
      may result in confusion as it is not MMIO access.
      
      Fix it by detecting split page MMIO accesses and failing them.
      load_unaligned_zeropad() will recover using exception fixups.
      
      The issue was discovered by analysis and reproduced artificially. It was
      not triggered during testing.
      
      [ dhansen: fix up changelogs and comments for grammar and clarity,
      	   plus incorporate Kirill's off-by-one fix]
      Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Link: https://lkml.kernel.org/r/20220614120135.14812-4-kirill.shutemov@linux.intel.com
      1e776965
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.19-2' of git://git.linux-nfs.org/projects/anna/linux-nfs · 4b35035b
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
      
       - Add FMODE_CAN_ODIRECT support to NFSv4 so opens don't fail
      
       - Fix trunking detection & cl_max_connect setting
      
       - Avoid pnfs_update_layout() livelocks
      
       - Don't keep retrying pNFS if the server replies with NFS4ERR_UNAVAILABLE
      
      * tag 'nfs-for-5.19-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFSv4: Add FMODE_CAN_ODIRECT after successful open of a NFS4.x file
        sunrpc: set cl_max_connect when cloning an rpc_clnt
        pNFS: Avoid a live lock condition in pnfs_update_layout()
        pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
      4b35035b