1. 29 Sep, 2024 6 commits
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs · 9f9a5347
      Linus Torvalds authored
      Pull more bcachefs updates from Kent Overstreet:
       "Assorted minor syzbot fixes, and for bigger stuff:
      
        Fix two disk accounting rewrite bugs:
      
         - Disk accounting keys use the version field of bkey so that journal
           replay can tell which updates have been applied to the btree.
      
           This is set in the transaction commit path, after we've gotten our
           journal reservation (and our time ordering), but the
           BCH_TRANS_COMMIT_skip_accounting_apply flag that journal replay
           uses was incorrectly skipping this for new updates generated prior
           to journal replay.
      
           This fixes the underlying cause of an assertion pop in
           disk_accounting_read.
      
         - A couple of fixes for disk accounting + device removal.
      
           Checking if acocunting replicas entries were marked in the
           superblock was being done at the wrong point, when deltas in the
           journal could still zero them out, and then additionally we'd try
           to add a missing replicas entry to the superblock without checking
           if it referred to an invalid (removed) device.
      
        A whole slew of repair fixes:
      
         - fix infinite loop in propagate_key_to_snapshot_leaves(), this fixes
           an infinite loop when repairing a filesystem with many snapshots
      
         - fix incorrect transaction restart handling leading to occasional
           "fsck counted ..." warnings
      
         - fix warning in __bch2_fsck_err() for bkey fsck errors
      
         - check_inode() in fsck now correctly checks if the filesystem was
           clean
      
         - there shouldn't be pending logged ops if the fs was clean, we now
           check for this
      
         - remove_backpointer() doesn't remove a dirent that doesn't actually
           point to the inode
      
         - many more fsck errors are AUTOFIX"
      
      * tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs: (35 commits)
        bcachefs: check_subvol_path() now prints subvol root inode
        bcachefs: remove_backpointer() now checks if dirent points to inode
        bcachefs: dirent_points_to_inode() now warns on mismatch
        bcachefs: Fix lost wake up
        bcachefs: Check for logged ops when clean
        bcachefs: BCH_FS_clean_recovery
        bcachefs: Convert disk accounting BUG_ON() to WARN_ON()
        bcachefs: Fix BCH_TRANS_COMMIT_skip_accounting_apply
        bcachefs: Check for accounting keys with bversion=0
        bcachefs: rename version -> bversion
        bcachefs: Don't delete unlinked inodes before logged op resume
        bcachefs: Fix BCH_SB_ERRS() so we can reorder
        bcachefs: Fix fsck warnings from bkey validation
        bcachefs: Move transaction commit path validation to as late as possible
        bcachefs: Fix disk accounting attempting to mark invalid replicas entry
        bcachefs: Fix unlocked access to c->disk_sb.sb in bch2_replicas_entry_validate()
        bcachefs: Fix accounting read + device removal
        bcachefs: bch_accounting_mode
        bcachefs: fix transaction restart handling in check_extents(), check_dirents()
        bcachefs: kill inode_walker_entry.seen_this_pos
        ...
      9f9a5347
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d37421e6
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fix TDX MMIO #VE fault handling, and add two new Intel model numbers
        for 'Pantherlake' and 'Diamond Rapids'"
      
      * tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Add two Intel CPU model numbers
        x86/tdx: Fix "in-kernel MMIO" check
      d37421e6
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ec03de73
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "lockdep:
          - Fix potential deadlock between lockdep and RCU (Zhiguo Niu)
          - Use str_plural() to address Coccinelle warning (Thorsten Blum)
          - Add debuggability enhancement (Luis Claudio R. Goncalves)
      
        static keys & calls:
          - Fix static_key_slow_dec() yet again (Peter Zijlstra)
          - Handle module init failure correctly in static_call_del_module()
            (Thomas Gleixner)
          - Replace pointless WARN_ON() in static_call_module_notify() (Thomas
            Gleixner)
      
        <linux/cleanup.h>:
          - Add usage and style documentation (Dan Williams)
      
        rwsems:
          - Move is_rwsem_reader_owned() and rwsem_owner() under
            CONFIG_DEBUG_RWSEMS (Waiman Long)
      
        atomic ops, x86:
          - Redeclare x86_32 arch_atomic64_{add,sub}() as void (Uros Bizjak)
          - Introduce the read64_nonatomic macro to x86_32 with cx8 (Uros
            Bizjak)"
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      
      * tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
        jump_label: Fix static_key_slow_dec() yet again
        static_call: Replace pointless WARN_ON() in static_call_module_notify()
        static_call: Handle module init failure correctly in static_call_del_module()
        locking/lockdep: Simplify character output in seq_line()
        lockdep: fix deadlock issue between lockdep and rcu
        lockdep: Use str_plural() to fix Coccinelle warning
        cleanup: Add usage and style documentation
        lockdep: suggest the fix for "lockdep bfs error:-1" on print_bfs_bug
        locking/atomic/x86: Redeclare x86_32 arch_atomic64_{add,sub}() as void
        locking/atomic/x86: Introduce the read64_nonatomic macro to x86_32 with cx8
      ec03de73
    • Linus Torvalds's avatar
      Merge tag 'cocci-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux · 68e4b0e0
      Linus Torvalds authored
      Pull coccinelle updates from Julia Lawall:
       "Extend string_choices.cocci to use more available helpers
      
        Ten patches from Hongbo Li extending string_choices.cocci with the
        complete set of functions offered by include/linux/string_choices.h.
      
        One patch from myself reducing the number of redundant cases that are
        checked by Coccinelle, giving a small performance improvement"
      
      * tag 'cocci-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
        Reduce Coccinelle choices in string_choices.cocci
        coccinelle: Remove unnecessary parentheses for only one possible change.
        coccinelle: Add rules to find str_yes_no() replacements
        coccinelle: Add rules to find str_on_off() replacements
        coccinelle: Add rules to find str_write_read() replacements
        coccinelle: Add rules to find str_read_write() replacements
        coccinelle: Add rules to find str_enable{d}_disable{d}() replacements
        coccinelle: Add rules to find str_lo{w}_hi{gh}() replacements
        coccinelle: Add rules to find str_hi{gh}_lo{w}() replacements
        coccinelle: Add rules to find str_false_true() replacements
        coccinelle: Add rules to find str_true_false() replacements
      68e4b0e0
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-next-6.12-rc1-fixes' of... · e7ebdb51
      Linus Torvalds authored
      Merge tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fix from Shuah Khan:
       "One urgent fix to vDSO as automated testing is failing due to this
        bug"
      
      * tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: vDSO: align stack for O2-optimized memcpy
      e7ebdb51
    • Ingo Molnar's avatar
      Merge branch 'locking/core' into locking/urgent, to pick up pending commits · ae39e0bd
      Ingo Molnar authored
      Merge all pending locking commits into a single branch.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ae39e0bd
  2. 28 Sep, 2024 34 commits
    • Julia Lawall's avatar
      Reduce Coccinelle choices in string_choices.cocci · 4003ba66
      Julia Lawall authored
      The isomorphism neg_if_exp negates the test of a ?: conditional,
      making it unnecessary to have an explicit case for a negated test
      with the branches inverted.
      
      At the same time, we can disable neg_if_exp in cases where a
      different API function may be more suitable for a negated test.
      
      Finally, in the non-patch cases, E matches an expression with
      parentheses around it, so there is no need to mention ()
      explicitly in the pattern.  The () are still needed in the patch
      cases, because we want to drop them, if they are present.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      4003ba66
    • Hongbo Li's avatar
      coccinelle: Remove unnecessary parentheses for only one possible change. · f584e375
      Hongbo Li authored
      The parentheses are only needed if there is a disjunction, ie a
      set of possible changes. If there is only one pattern, we can
      remove these parentheses. Just like the format:
      
        -  x
        +  y
      
      not:
      
        (
        -  x
        +  y
        )
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      f584e375
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_yes_no() replacements · 253244cd
      Hongbo Li authored
      As other rules done, we add rules for str_yes_no()
      to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      253244cd
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_on_off() replacements · 9b5b4810
      Hongbo Li authored
      As other rules done, we add rules for str_on_off()
      to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      9b5b4810
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_write_read() replacements · c81ca023
      Hongbo Li authored
      As other rules done, we add rules for str_write_read()
      to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      c81ca023
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_read_write() replacements · ba4b514a
      Hongbo Li authored
      As other rules done, we add rules for str_read_write()
      to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      ba4b514a
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_enable{d}_disable{d}() replacements · dd2275d3
      Hongbo Li authored
      As other rules done, we add rules for str_enable{d}_
      disable{d}() to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      dd2275d3
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_lo{w}_hi{gh}() replacements · 5b7ca450
      Hongbo Li authored
      As other rules done, we add rules for str_lo{w}_hi{gh}()
      to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      5b7ca450
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_hi{gh}_lo{w}() replacements · d4c75440
      Hongbo Li authored
      As other rules done, we add rules for str_hi{gh}_lo{w}()
      to check the relative opportunities.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      d4c75440
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_false_true() replacements · 8a0236ba
      Hongbo Li authored
      As done with str_true_false(), add checks for str_false_true()
      opportunities. A simple test can find over 9 cases currently
      exist in the tree.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      8a0236ba
    • Hongbo Li's avatar
      coccinelle: Add rules to find str_true_false() replacements · 716bf84e
      Hongbo Li authored
      After str_true_false() has been introduced in the tree,
      we can add rules for finding places where str_true_false()
      can be used. A simple test can find over 10 locations.
      Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      716bf84e
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 3efc5736
      Linus Torvalds authored
      Pull x86 kvm updates from Paolo Bonzini:
       "x86:
      
         - KVM currently invalidates the entirety of the page tables, not just
           those for the memslot being touched, when a memslot is moved or
           deleted.
      
           This does not traditionally have particularly noticeable overhead,
           but Intel's TDX will require the guest to re-accept private pages
           if they are dropped from the secure EPT, which is a non starter.
      
           Actually, the only reason why this is not already being done is a
           bug which was never fully investigated and caused VM instability
           with assigned GeForce GPUs, so allow userspace to opt into the new
           behavior.
      
         - Advertise AVX10.1 to userspace (effectively prep work for the
           "real" AVX10 functionality that is on the horizon)
      
         - Rework common MSR handling code to suppress errors on userspace
           accesses to unsupported-but-advertised MSRs
      
           This will allow removing (almost?) all of KVM's exemptions for
           userspace access to MSRs that shouldn't exist based on the vCPU
           model (the actual cleanup is non-trivial future work)
      
         - Rework KVM's handling of x2APIC ICR, again, because AMD (x2AVIC)
           splits the 64-bit value into the legacy ICR and ICR2 storage,
           whereas Intel (APICv) stores the entire 64-bit value at the ICR
           offset
      
         - Fix a bug where KVM would fail to exit to userspace if one was
           triggered by a fastpath exit handler
      
         - Add fastpath handling of HLT VM-Exit to expedite re-entering the
           guest when there's already a pending wake event at the time of the
           exit
      
         - Fix a WARN caused by RSM entering a nested guest from SMM with
           invalid guest state, by forcing the vCPU out of guest mode prior to
           signalling SHUTDOWN (the SHUTDOWN hits the VM altogether, not the
           nested guest)
      
         - Overhaul the "unprotect and retry" logic to more precisely identify
           cases where retrying is actually helpful, and to harden all retry
           paths against putting the guest into an infinite retry loop
      
         - Add support for yielding, e.g. to honor NEED_RESCHED, when zapping
           rmaps in the shadow MMU
      
         - Refactor pieces of the shadow MMU related to aging SPTEs in
           prepartion for adding multi generation LRU support in KVM
      
         - Don't stuff the RSB after VM-Exit when RETPOLINE=y and AutoIBRS is
           enabled, i.e. when the CPU has already flushed the RSB
      
         - Trace the per-CPU host save area as a VMCB pointer to improve
           readability and cleanup the retrieval of the SEV-ES host save area
      
         - Remove unnecessary accounting of temporary nested VMCB related
           allocations
      
         - Set FINAL/PAGE in the page fault error code for EPT violations if
           and only if the GVA is valid. If the GVA is NOT valid, there is no
           guest-side page table walk and so stuffing paging related metadata
           is nonsensical
      
         - Fix a bug where KVM would incorrectly synthesize a nested VM-Exit
           instead of emulating posted interrupt delivery to L2
      
         - Add a lockdep assertion to detect unsafe accesses of vmcs12
           structures
      
         - Harden eVMCS loading against an impossible NULL pointer deref
           (really truly should be impossible)
      
         - Minor SGX fix and a cleanup
      
         - Misc cleanups
      
        Generic:
      
         - Register KVM's cpuhp and syscore callbacks when enabling
           virtualization in hardware, as the sole purpose of said callbacks
           is to disable and re-enable virtualization as needed
      
         - Enable virtualization when KVM is loaded, not right before the
           first VM is created
      
           Together with the previous change, this simplifies a lot the logic
           of the callbacks, because their very existence implies
           virtualization is enabled
      
         - Fix a bug that results in KVM prematurely exiting to userspace for
           coalesced MMIO/PIO in many cases, clean up the related code, and
           add a testcase
      
         - Fix a bug in kvm_clear_guest() where it would trigger a buffer
           overflow _if_ the gpa+len crosses a page boundary, which thankfully
           is guaranteed to not happen in the current code base. Add WARNs in
           more helpers that read/write guest memory to detect similar bugs
      
        Selftests:
      
         - Fix a goof that caused some Hyper-V tests to be skipped when run on
           bare metal, i.e. NOT in a VM
      
         - Add a regression test for KVM's handling of SHUTDOWN for an SEV-ES
           guest
      
         - Explicitly include one-off assets in .gitignore. Past Sean was
           completely wrong about not being able to detect missing .gitignore
           entries
      
         - Verify userspace single-stepping works when KVM happens to handle a
           VM-Exit in its fastpath
      
         - Misc cleanups"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (127 commits)
        Documentation: KVM: fix warning in "make htmldocs"
        s390: Enable KVM_S390_UCONTROL config in debug_defconfig
        selftests: kvm: s390: Add VM run test case
        KVM: SVM: let alternatives handle the cases when RSB filling is required
        KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid
        KVM: x86/mmu: Use KVM_PAGES_PER_HPAGE() instead of an open coded equivalent
        KVM: x86/mmu: Add KVM_RMAP_MANY to replace open coded '1' and '1ul' literals
        KVM: x86/mmu: Fold mmu_spte_age() into kvm_rmap_age_gfn_range()
        KVM: x86/mmu: Morph kvm_handle_gfn_range() into an aging specific helper
        KVM: x86/mmu: Honor NEED_RESCHED when zapping rmaps and blocking is allowed
        KVM: x86/mmu: Add a helper to walk and zap rmaps for a memslot
        KVM: x86/mmu: Plumb a @can_yield parameter into __walk_slot_rmaps()
        KVM: x86/mmu: Move walk_slot_rmaps() up near for_each_slot_rmap_range()
        KVM: x86/mmu: WARN on MMIO cache hit when emulating write-protected gfn
        KVM: x86/mmu: Detect if unprotect will do anything based on invalid_list
        KVM: x86/mmu: Subsume kvm_mmu_unprotect_page() into the and_retry() version
        KVM: x86: Rename reexecute_instruction()=>kvm_unprotect_and_retry_on_failure()
        KVM: x86: Update retry protection fields when forcing retry on emulation failure
        KVM: x86: Apply retry protection to "unprotect on failure" path
        KVM: x86: Check EMULTYPE_WRITE_PF_TO_SP before unprotecting gfn
        ...
      3efc5736
    • Linus Torvalds's avatar
      Merge tag 's390-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · e08d2278
      Linus Torvalds authored
      Pull more s390 updates from Vasily Gorbik:
      
       - Clean up and improve vdso code: use SYM_* macros for function and
         data annotations, add CFI annotations to fix GDB unwinding, optimize
         the chacha20 implementation
      
       - Add vfio-ap driver feature advertisement for use by libvirt and
         mdevctl
      
      * tag 's390-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/vfio-ap: Driver feature advertisement
        s390/vdso: Use one large alternative instead of an alternative branch
        s390/vdso: Use SYM_DATA_START_LOCAL()/SYM_DATA_END() for data objects
        tools: Add additional SYM_*() stubs to linkage.h
        s390/vdso: Use macros for annotation of asm functions
        s390/vdso: Add CFI annotations to __arch_chacha20_blocks_nostack()
        s390/vdso: Fix comment within __arch_chacha20_blocks_nostack()
        s390/vdso: Get rid of permutation constants
      e08d2278
    • Linus Torvalds's avatar
      Merge tag 'modules-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 6f81a446
      Linus Torvalds authored
      Pull module updates from Luis Chamberlain:
       "There are a few fixes / cleanups from Vincent, Chunhui, and Petr, but
        the most important part of this pull request is the Rust community
        stepping up to help maintain both C / Rust code for future Rust module
        support. We grow the set of modules maintainers by three now, and with
        this hope to scale to help address what's needed to properly support
        future Rust module support.
      
        A lot of exciting stuff coming in future kernel releases.
      
        This has been on linux-next for ~ 3 weeks now with no issues"
      
      * tag 'modules-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        module: Refine kmemleak scanned areas
        module: abort module loading when sysfs setup suffer errors
        MAINTAINERS: scale modules with more reviewers
        module: Clean up the description of MODULE_SIG_<type>
        module: Split modules_install compression and in-kernel decompression
      6f81a446
    • Linus Torvalds's avatar
      Merge tag 'fbdev-for-6.12-rc1-2' of... · f95c1390
      Linus Torvalds authored
      Merge tag 'fbdev-for-6.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
      
      Pull fbdev fixes from Helge Deller:
      
       - crash fix in fbcon_putcs
      
       - avoid a possible string memory overflow in sisfb
      
       - minor code optimizations in omapfb and fbcon
      
      * tag 'fbdev-for-6.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
        fbdev: sisfb: Fix strbuf array overflow
        fbcon: break earlier in search_fb_in_map and search_for_mapped_con
        fbdev: omapfb: Call of_node_put(ep) only once in omapdss_of_find_source_for_first_ep()
        fbcon: Fix a NULL pointer dereference issue in fbcon_putcs
      f95c1390
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2024-09-28' of https://gitlab.freedesktop.org/drm/kernel · 994aeacb
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular fixes for the week to end the merge window, i915 and xe have a
        few each, amdgpu makes up most of it with a bunch of SR-IOV related
        fixes amongst others.
      
        i915:
         - Fix BMG support to UHBR13.5
         - Two PSR fixes
         - Fix colorimetry detection for DP
      
        xe:
         - Fix macro for checking minimum GuC version
         - Fix CCS offset calculation for some BMG SKUs
         - Fix locking on memory usage reporting via fdinfo and BO destroy
         - Fix GPU page fault handler on a closed VM
         - Fix overflow in oa batch buffer
      
        amdgpu:
         - MES 12 fix
         - KFD fence sync fix
         - SR-IOV fixes
         - VCN 4.0.6 fix
         - SDMA 7.x fix
         - Bump driver version to note cleared VRAM support
         - SWSMU fix
         - CU occupancy logic fix
         - SDMA queue fix"
      
      * tag 'drm-next-2024-09-28' of https://gitlab.freedesktop.org/drm/kernel: (79 commits)
        drm/amd/pm: update workload mask after the setting
        drm/amdgpu: bump driver version for cleared VRAM
        drm/amdgpu: fix vbios fetching for SR-IOV
        drm/amdgpu: fix PTE copy corruption for sdma 7
        drm/amdkfd: Add SDMA queue quantum support for GFX12
        drm/amdgpu/vcn: enable AV1 on both instances
        drm/amdkfd: Fix CU occupancy for GFX 9.4.3
        drm/amdkfd: Update logic for CU occupancy calculations
        drm/amdgpu: skip coredump after job timeout in SRIOV
        drm/amdgpu: sync to KFD fences before clearing PTEs
        drm/amdgpu/mes12: set enable_level_process_quantum_check
        drm/i915/dp: Fix colorimetry detection
        drm/amdgpu/mes12: reduce timeout
        drm/amdgpu/mes11: reduce timeout
        drm/amdgpu: use GEM references instead of TTMs v2
        drm/amd/display: Allow backlight to go below `AMDGPU_DM_DEFAULT_MIN_BACKLIGHT`
        drm/amd/display: Fix kdoc entry for 'tps' in 'dc_process_dmub_dpia_set_tps_notification'
        drm/amdgpu: update golden regs for gfx12
        drm/amdgpu: clean up vbios fetching code
        drm/amd/display: handle nulled pipe context in DCE110's set_drr()
        ...
      994aeacb
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.12-rc1' of https://github.com/ceph/ceph-client · 894b3c35
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "Three CephFS fixes from Xiubo and Luis and a bunch of assorted
        cleanups"
      
      * tag 'ceph-for-6.12-rc1' of https://github.com/ceph/ceph-client:
        ceph: remove the incorrect Fw reference check when dirtying pages
        ceph: Remove empty definition in header file
        ceph: Fix typo in the comment
        ceph: fix a memory leak on cap_auths in MDS client
        ceph: flush all caps releases when syncing the whole filesystem
        ceph: rename ceph_flush_cap_releases() to ceph_flush_session_cap_releases()
        libceph: use min() to simplify code in ceph_dns_resolve_name()
        ceph: Convert to use jiffies macro
        ceph: Remove unused declarations
      894b3c35
    • Linus Torvalds's avatar
      Merge tag 'v6.12-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 9717d534
      Linus Torvalds authored
      Pull smb server fixes from Steve French:
      
       - fix querying dentry for char/block special files
      
       - small cleanup patches
      
      * tag 'v6.12-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: Correct typos in multiple comments across various files
        ksmbd: fix open failure from block and char device file
        ksmbd: remove unsafe_memcpy use in session setup
        ksmbd: Replace one-element arrays with flexible-array members
        ksmbd: fix warning: comparison of distinct pointer types lacks a cast
      9717d534
    • Linus Torvalds's avatar
      Merge tag '6.12rc-more-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · f04ff5a0
      Linus Torvalds authored
      Pull xmb client fixes from Steve French:
      
       - Noisy log message cleanup
      
       - Important netfs fix for cifs crash in generic/074
      
       - Three minor improvements to use of hashing (multichannel and mount
         improvements)
      
       - Fix decryption crash for large read with small esize
      
      * tag '6.12rc-more-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb: client: make SHA-512 TFM ephemeral
        smb: client: make HMAC-MD5 TFM ephemeral
        smb: client: stop flooding dmesg in smb2_calc_signature()
        smb: client: allocate crypto only for primary server
        smb: client: fix UAF in async decryption
        netfs: Fix write oops in generic/346 (9p) and generic/074 (cifs)
      f04ff5a0
    • Kent Overstreet's avatar
    • Kent Overstreet's avatar
    • Kent Overstreet's avatar
      bcachefs: dirent_points_to_inode() now warns on mismatch · a6508079
      Kent Overstreet authored
      if an inode backpointer points to a dirent that doesn't point back,
      that's an error we should warn about.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      a6508079
    • Alan Huang's avatar
      bcachefs: Fix lost wake up · e057a290
      Alan Huang authored
      If the reader acquires the read lock and then the writer enters the slow
      path, while the reader proceeds to the unlock path, the following scenario
      can occur without the change:
      
      writer: pcpu_read_count(lock) return 1 (so __do_six_trylock will return 0)
      reader: this_cpu_dec(*lock->readers)
      reader: smp_mb()
      reader: state = atomic_read(&lock->state) (there is no waiting flag set)
      writer: six_set_bitmask()
      
      then the writer will sleep forever.
      Signed-off-by: default avatarAlan Huang <mmpgouride@gmail.com>
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      e057a290
    • Kent Overstreet's avatar
      bcachefs: Check for logged ops when clean · d50d7a5f
      Kent Overstreet authored
      If we shut down successfully, there shouldn't be any logged ops to
      resume.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      d50d7a5f
    • Kent Overstreet's avatar
      bcachefs: BCH_FS_clean_recovery · 1c0ee43b
      Kent Overstreet authored
      Add a filesystem flag to indicate whether we did a clean recovery -
      using c->sb.clean after we've got rw is incorrect, since c->sb is
      updated whenever we write the superblock.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      1c0ee43b
    • Kent Overstreet's avatar
      bcachefs: Convert disk accounting BUG_ON() to WARN_ON() · 9773547b
      Kent Overstreet authored
      We had a bug where disk accounting keys didn't always have their version
      field set in journal replay; change the BUG_ON() to a WARN(), and
      exclude this case since it's now checked for elsewhere (in the bkey
      validate function).
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      9773547b
    • Kent Overstreet's avatar
      bcachefs: Fix BCH_TRANS_COMMIT_skip_accounting_apply · a3581ca3
      Kent Overstreet authored
      This was added to avoid double-counting accounting keys in journal
      replay. But applied incorrectly (easily done since it applies to the
      transaction commit, not a particular update), it leads to skipping
      in-mem accounting for real accounting updates, and failure to give them
      a version number - which leads to journal replay becoming very confused
      the next time around.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      a3581ca3
    • Kent Overstreet's avatar
    • Kent Overstreet's avatar
      bcachefs: rename version -> bversion · cf49f8a8
      Kent Overstreet authored
      give bversions a more distinct name, to aid in grepping
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      cf49f8a8
    • Kent Overstreet's avatar
      bcachefs: Don't delete unlinked inodes before logged op resume · fd65378d
      Kent Overstreet authored
      Previously, check_inode() would delete unlinked inodes if they weren't
      on the deleted list - this code dating from before there was a deleted
      list.
      
      But, if we crash during a logged op (truncate or finsert/fcollapse) of
      an unlinked file, logged op resume will get confused if the inode has
      already been deleted - instead, just add it to the deleted list if it
      needs to be there; delete_dead_inodes runs after logged op resume.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      fd65378d
    • Kent Overstreet's avatar
      bcachefs: Fix BCH_SB_ERRS() so we can reorder · 8d65b15f
      Kent Overstreet authored
      BCH_SB_ERRS() has a field for the actual enum val so that we can reorder
      to reorganize, but the way BCH_SB_ERR_MAX was defined didn't allow for
      this.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      8d65b15f
    • Kent Overstreet's avatar
      bcachefs: Fix fsck warnings from bkey validation · 5612daaf
      Kent Overstreet authored
      __bch2_fsck_err() warns if the current task has a btree_trans object and
      it wasn't passed in, because if it has to prompt for user input it has
      to be able to unlock it.
      
      But plumbing the btree_trans through bkey_validate(), as well as
      transaction restarts, is problematic - so instead make bkey fsck errors
      FSCK_AUTOFIX, which doesn't need to warn.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      5612daaf
    • Kent Overstreet's avatar
      bcachefs: Move transaction commit path validation to as late as possible · 7c980a43
      Kent Overstreet authored
      In order to check for accounting keys with version=0, we need to run
      validation after they've been assigned version numbers.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      7c980a43
    • Kent Overstreet's avatar
      bcachefs: Fix disk accounting attempting to mark invalid replicas entry · 431312b5
      Kent Overstreet authored
      This fixes the following bug, where a disk accounting key has an invalid
      replicas entry, and we attempt to add it to the superblock:
      
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): starting version 1.12: rebalance_work_acct_fix opts=metadata_replicas=2,data_replicas=2,foreground_target=ssd,background_target=hdd,nopromote_whole_extents,verbose,fsck,fix_errors=yes
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): recovering from clean shutdown, journal seq 15211644
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): accounting_read...
      accounting not marked in superblock replicas
        replicas cached: 1/1 [0], fixing
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): sb invalid before write: Invalid superblock section replicas_v0: invalid device 0 in entry cached: 1/1 [0]
      replicas_v0 (size 88):
      user: 2 [3 5] user: 2 [1 4] cached: 1 [2] btree: 2 [1 2] user: 2 [2 5] cached: 1 [0] cached: 1 [4] journal: 2 [1 5] user: 2 [1 2] user: 2 [2 3] user: 2 [3 4] user: 2 [4 5] cached: 1 [1] cached: 1 [3] cached: 1 [5] journal: 2 [1 2] journal: 2 [2 5] btree: 2 [2 5] user: 2 [1 3] user: 2 [1 5] user: 2 [2 4]
      
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): inconsistency detected - emergency read only at journal seq 15211644
      accounting not marked in superblock replicas
        replicas user: 1/1 [3], fixing
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): sb invalid before write: Invalid superblock section replicas_v0: invalid device 0 in entry cached: 1/1 [0]
      replicas_v0 (size 96):
      user: 2 [3 5] user: 2 [1 3] cached: 1 [2] btree: 2 [1 2] user: 2 [2 4] cached: 1 [0] cached: 1 [4] journal: 2 [1 5] user: 1 [3] user: 2 [1 5] user: 2 [3 4] user: 2 [4 5] cached: 1 [1] cached: 1 [3] cached: 1 [5] journal: 2 [1 2] journal: 2 [2 5] btree: 2 [2 5] user: 2 [1 2] user: 2 [1 4] user: 2 [2 3] user: 2 [2 5]
      
      accounting not marked in superblock replicas
        replicas user: 1/2 [3 7], fixing
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): sb invalid before write: Invalid superblock section replicas_v0: invalid device 7 in entry user: 1/2 [3 7]
      replicas_v0 (size 96):
      user: 2 [3 7] user: 2 [1 3] cached: 1 [2] btree: 2 [1 2] user: 2 [2 4] cached: 1 [0] cached: 1 [4] journal: 2 [1 5] user: 1 [3] user: 2 [1 5] user: 2 [3 4] user: 2 [4 5] cached: 1 [1] cached: 1 [3] cached: 1 [5] journal: 2 [1 2] journal: 2 [2 5] btree: 2 [2 5] user: 2 [1 2] user: 2 [1 4] user: 2 [2 3] user: 2 [2 5] user: 2 [3 5]
      
       done
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): alloc_read... done
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): stripes_read... done
      bcachefs (3c0860e8-07ca-4276-8954-11c1774be868): snapshots_read... done
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      431312b5