1. 11 Oct, 2024 1 commit
  2. 10 Oct, 2024 5 commits
  3. 08 Oct, 2024 2 commits
  4. 07 Oct, 2024 2 commits
    • Maíra Canal's avatar
      drm/vc4: Stop the active perfmon before being destroyed · 0b2ad4f6
      Maíra Canal authored
      Upon closing the file descriptor, the active performance monitor is not
      stopped. Although all perfmons are destroyed in `vc4_perfmon_close_file()`,
      the active performance monitor's pointer (`vc4->active_perfmon`) is still
      retained.
      
      If we open a new file descriptor and submit a few jobs with performance
      monitors, the driver will attempt to stop the active performance monitor
      using the stale pointer in `vc4->active_perfmon`. However, this pointer
      is no longer valid because the previous process has already terminated,
      and all performance monitors associated with it have been destroyed and
      freed.
      
      To fix this, when the active performance monitor belongs to a given
      process, explicitly stop it before destroying and freeing it.
      
      Cc: stable@vger.kernel.org # v4.17+
      Cc: Boris Brezillon <bbrezillon@kernel.org>
      Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
      Fixes: 65101d8c ("drm/vc4: Expose performance counters to userspace")
      Signed-off-by: default avatarMaíra Canal <mcanal@igalia.com>
      Reviewed-by: default avatarJuan A. Suarez <jasuarez@igalia.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20241004123817.890016-2-mcanal@igalia.com
      0b2ad4f6
    • Maíra Canal's avatar
      drm/v3d: Stop the active perfmon before being destroyed · 7d1fd363
      Maíra Canal authored
      When running `kmscube` with one or more performance monitors enabled
      via `GALLIUM_HUD`, the following kernel panic can occur:
      
      [   55.008324] Unable to handle kernel paging request at virtual address 00000000052004a4
      [   55.008368] Mem abort info:
      [   55.008377]   ESR = 0x0000000096000005
      [   55.008387]   EC = 0x25: DABT (current EL), IL = 32 bits
      [   55.008402]   SET = 0, FnV = 0
      [   55.008412]   EA = 0, S1PTW = 0
      [   55.008421]   FSC = 0x05: level 1 translation fault
      [   55.008434] Data abort info:
      [   55.008442]   ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
      [   55.008455]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
      [   55.008467]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
      [   55.008481] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001046c6000
      [   55.008497] [00000000052004a4] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
      [   55.008525] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
      [   55.008542] Modules linked in: rfcomm [...] vc4 v3d snd_soc_hdmi_codec drm_display_helper
      gpu_sched drm_shmem_helper cec drm_dma_helper drm_kms_helper i2c_brcmstb
      drm drm_panel_orientation_quirks snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd backlight
      [   55.008799] CPU: 2 PID: 166 Comm: v3d_bin Tainted: G         C         6.6.47+rpt-rpi-v8 #1  Debian 1:6.6.47-1+rpt1
      [   55.008824] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT)
      [   55.008838] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [   55.008855] pc : __mutex_lock.constprop.0+0x90/0x608
      [   55.008879] lr : __mutex_lock.constprop.0+0x58/0x608
      [   55.008895] sp : ffffffc080673cf0
      [   55.008904] x29: ffffffc080673cf0 x28: 0000000000000000 x27: ffffff8106188a28
      [   55.008926] x26: ffffff8101e78040 x25: ffffff8101baa6c0 x24: ffffffd9d989f148
      [   55.008947] x23: ffffffda1c2a4008 x22: 0000000000000002 x21: ffffffc080673d38
      [   55.008968] x20: ffffff8101238000 x19: ffffff8104f83188 x18: 0000000000000000
      [   55.008988] x17: 0000000000000000 x16: ffffffda1bd04d18 x15: 00000055bb08bc90
      [   55.009715] x14: 0000000000000000 x13: 0000000000000000 x12: ffffffda1bd4cbb0
      [   55.010433] x11: 00000000fa83b2da x10: 0000000000001a40 x9 : ffffffda1bd04d04
      [   55.011162] x8 : ffffff8102097b80 x7 : 0000000000000000 x6 : 00000000030a5857
      [   55.011880] x5 : 00ffffffffffffff x4 : 0300000005200470 x3 : 0300000005200470
      [   55.012598] x2 : ffffff8101238000 x1 : 0000000000000021 x0 : 0300000005200470
      [   55.013292] Call trace:
      [   55.013959]  __mutex_lock.constprop.0+0x90/0x608
      [   55.014646]  __mutex_lock_slowpath+0x1c/0x30
      [   55.015317]  mutex_lock+0x50/0x68
      [   55.015961]  v3d_perfmon_stop+0x40/0xe0 [v3d]
      [   55.016627]  v3d_bin_job_run+0x10c/0x2d8 [v3d]
      [   55.017282]  drm_sched_main+0x178/0x3f8 [gpu_sched]
      [   55.017921]  kthread+0x11c/0x128
      [   55.018554]  ret_from_fork+0x10/0x20
      [   55.019168] Code: f9400260 f1001c1f 54001ea9 927df000 (b9403401)
      [   55.019776] ---[ end trace 0000000000000000 ]---
      [   55.020411] note: v3d_bin[166] exited with preempt_count 1
      
      This issue arises because, upon closing the file descriptor (which happens
      when we interrupt `kmscube`), the active performance monitor is not
      stopped. Although all perfmons are destroyed in `v3d_perfmon_close_file()`,
      the active performance monitor's pointer (`v3d->active_perfmon`) is still
      retained.
      
      If `kmscube` is run again, the driver will attempt to stop the active
      performance monitor using the stale pointer in `v3d->active_perfmon`.
      However, this pointer is no longer valid because the previous process has
      already terminated, and all performance monitors associated with it have
      been destroyed and freed.
      
      To fix this, when the active performance monitor belongs to a given
      process, explicitly stop it before destroying and freeing it.
      
      Cc: stable@vger.kernel.org # v5.15+
      Closes: https://github.com/raspberrypi/linux/issues/6389
      Fixes: 26a4dc29 ("drm/v3d: Expose performance counters to userspace")
      Signed-off-by: default avatarMaíra Canal <mcanal@igalia.com>
      Reviewed-by: default avatarJuan A. Suarez <jasuarez@igalia.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20241004130625.918580-2-mcanal@igalia.com
      7d1fd363
  5. 03 Oct, 2024 1 commit
  6. 02 Oct, 2024 2 commits
  7. 01 Oct, 2024 6 commits
  8. 30 Sep, 2024 2 commits
  9. 29 Sep, 2024 12 commits
    • Linus Torvalds's avatar
      Linux 6.12-rc1 · 9852d85e
      Linus Torvalds authored
      9852d85e
    • Linus Torvalds's avatar
      x86: kvm: fix build error · 3f749bef
      Linus Torvalds authored
      The cpu_emergency_register_virt_callback() function is used
      unconditionally by the x86 kvm code, but it is declared (and defined)
      conditionally:
      
        #if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD)
        void cpu_emergency_register_virt_callback(cpu_emergency_virt_cb *callback);
        ...
      
      leading to a build error when neither KVM_INTEL nor KVM_AMD support is
      enabled:
      
        arch/x86/kvm/x86.c: In function ‘kvm_arch_enable_virtualization’:
        arch/x86/kvm/x86.c:12517:9: error: implicit declaration of function ‘cpu_emergency_register_virt_callback’ [-Wimplicit-function-declaration]
        12517 |         cpu_emergency_register_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        arch/x86/kvm/x86.c: In function ‘kvm_arch_disable_virtualization’:
        arch/x86/kvm/x86.c:12522:9: error: implicit declaration of function ‘cpu_emergency_unregister_virt_callback’ [-Wimplicit-function-declaration]
        12522 |         cpu_emergency_unregister_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Fix the build by defining empty helper functions the same way the old
      cpu_emergency_disable_virtualization() function was dealt with for the
      same situation.
      
      Maybe we could instead have made the call sites conditional, since the
      callers (kvm_arch_{en,dis}able_virtualization()) have an empty weak
      fallback.  I'll leave that to the kvm people to argue about, this at
      least gets the build going for that particular config.
      
      Fixes: 590b09b1 ("KVM: x86: Register "emergency disable" callbacks when virt is enabled")
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Sean Christopherson <seanjc@google.com>
      Cc: Kai Huang <kai.huang@intel.com>
      Cc: Chao Gao <chao.gao@intel.com>
      Cc: Farrah Chen <farrah.chen@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f749bef
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox · e7ed3436
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - fix kconfig dependencies (mhu-v3, omap2+)
      
       - use devie name instead of genereic imx_mu_chan as interrupt name
         (imx)
      
       - enable sa8255p and qcs8300 ipc controllers (qcom)
      
       - Fix timeout during suspend mode (bcm2835)
      
       - convert to use use of_property_match_string (mailbox)
      
       - enable mt8188 (mediatek)
      
       - use devm_clk_get_enabled helpers (spreadtrum)
      
       - fix device-id typo (rockchip)
      
      * tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox:
        mailbox, remoteproc: omap2+: fix compile testing
        dt-bindings: mailbox: qcom-ipcc: Document QCS8300 IPCC
        dt-bindings: mailbox: qcom-ipcc: document the support for SA8255p
        dt-bindings: mailbox: mtk,adsp-mbox: Add compatible for MT8188
        mailbox: Use of_property_match_string() instead of open-coding
        mailbox: bcm2835: Fix timeout during suspend mode
        mailbox: sprd: Use devm_clk_get_enabled() helpers
        mailbox: rockchip: fix a typo in module autoloading
        mailbox: imx: use device name in interrupt name
        mailbox: ARM_MHU_V3 should depend on ARM64
      e7ed3436
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.12-rc1-additional_fixes' of... · 907537f5
      Linus Torvalds authored
      Merge tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
      
      Pull i2c fixes from Wolfram Sang:
      
       - fix DesignWare driver ENABLE-ABORT sequence, ensuring ABORT can
         always be sent when needed
      
       - check for PCLK in the SynQuacer controller as an optional clock,
         allowing ACPI to directly provide the clock rate
      
       - KEBA driver Kconfig dependency fix
      
       - fix XIIC driver power suspend sequence
      
      * tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled
        i2c: keba: I2C_KEBA should depend on KEBA_CP500
        i2c: synquacer: Deal with optional PCLK correctly
        i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled
      907537f5
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping · b81b78da
      Linus Torvalds authored
      Pull dma-mapping fix from Christoph Hellwig:
      
       - handle chained SGLs in the new tracing code (Christoph Hellwig)
      
      * tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping:
        dma-mapping: fix DMA API tracing for chained scatterlists
      b81b78da
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 3ed7df08
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "These are mostly minor updates.
      
        There are two drivers (lpfc and mpi3mr) which missed the initial
        pull and a core change to retry a start/stop unit which affect
        suspend/resume"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
        scsi: lpfc: Update lpfc version to 14.4.0.5
        scsi: lpfc: Support loopback tests with VMID enabled
        scsi: lpfc: Revise TRACE_EVENT log flag severities from KERN_ERR to KERN_WARNING
        scsi: lpfc: Ensure DA_ID handling completion before deleting an NPIV instance
        scsi: lpfc: Fix kref imbalance on fabric ndlps from dev_loss_tmo handler
        scsi: lpfc: Restrict support for 32 byte CDBs to specific HBAs
        scsi: lpfc: Update phba link state conditional before sending CMF_SYNC_WQE
        scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd()
        scsi: mpi3mr: Update driver version to 8.12.0.0.50
        scsi: mpi3mr: Improve wait logic while controller transitions to READY state
        scsi: mpi3mr: Update MPI Headers to revision 34
        scsi: mpi3mr: Use firmware-provided timestamp update interval
        scsi: mpi3mr: Enhance the Enable Controller retry logic
        scsi: sd: Fix off-by-one error in sd_read_block_characteristics()
        scsi: pm8001: Do not overwrite PCI queue mapping
        scsi: scsi_debug: Remove a useless memset()
        scsi: pmcraid: Convert comma to semicolon
        scsi: sd: Retry START STOP UNIT commands
        scsi: mpi3mr: A performance fix
        scsi: ufs: qcom: Update MODE_MAX cfg_bw value
        ...
      3ed7df08
    • 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
  10. 28 Sep, 2024 7 commits