1. 12 Apr, 2024 11 commits
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · b3812ff0
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Revert a quirk that prevented Secondary Bus Reset for LSI / Agere
         FW643.
      
         We thought the device was broken, but the reset does work correctly
         on other platforms, and the reset avoids leaking data out of VMs
         (Bjorn Helgaas)
      
       - Update MAINTAINERS to reflect that Gustavo Pimentel is no longer
         reachable (Manivannan Sadhasivam)
      
      * tag 'pci-v6.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        Revert "PCI: Mark LSI FW643 to avoid bus reset"
        MAINTAINERS: Drop Gustavo Pimentel as PCI DWC Maintainer
      b3812ff0
    • Linus Torvalds's avatar
      Merge tag 'block-6.9-20240412' of git://git.kernel.dk/linux · d7ad0581
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - MD pull request via Song:
             - UAF fix (Yu)
      
       - Avoid out-of-bounds shift in blk-iocost (Rik)
      
       - Fix for q->blkg_list corruption (Ming)
      
       - Relax virt boundary mask/size segment checking (Ming)
      
      * tag 'block-6.9-20240412' of git://git.kernel.dk/linux:
        block: fix that blk_time_get_ns() doesn't update time after schedule
        block: allow device to have both virt_boundary_mask and max segment size
        block: fix q->blkg_list corruption during disk rebind
        blk-iocost: avoid out of bounds shift
        raid1: fix use-after-free for original bio in raid1_write_request()
      d7ad0581
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.9-20240412' of git://git.kernel.dk/linux · c7adbe2e
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Fix for sigmask restoring while waiting for events (Alexey)
      
       - Typo fix in comment (Haiyue)
      
       - Fix for a msg_control retstore on SEND_ZC retries (Pavel)
      
      * tag 'io_uring-6.9-20240412' of git://git.kernel.dk/linux:
        io-uring: correct typo in comment for IOU_F_TWQ_LAZY_WAKE
        io_uring/net: restore msg_control on sendzc retry
        io_uring: Fix io_cqring_wait() not restoring sigmask on get_timespec64() failure
      c7adbe2e
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.9-rc4' of https://github.com/ceph/ceph-client · 90d3eaaf
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "Two CephFS fixes marked for stable and a MAINTAINERS update"
      
      * tag 'ceph-for-6.9-rc4' of https://github.com/ceph/ceph-client:
        MAINTAINERS: remove myself as a Reviewer for Ceph
        ceph: switch to use cap_delay_lock for the unlink delay list
        ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
      90d3eaaf
    • Linus Torvalds's avatar
      Kconfig: add some hidden tabs on purpose · d5cf50da
      Linus Torvalds authored
      Commit d96c3600 ("tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig
      entry") removed a hidden tab because it apparently showed breakage in
      some third-party kernel config parsing tool.
      
      It wasn't clear what tool it was, but let's make sure it gets fixed.
      Because if you can't parse tabs as whitespace, you should not be parsing
      the kernel Kconfig files.
      
      In fact, let's make such breakage more obvious than some esoteric ftrace
      record size option.  If you can't parse tabs, you can't have page sizes.
      
      Yes, tab-vs-space confusion is sadly a traditional Unix thing, and
      'make' is famous for being broken in this regard.  But no, that does not
      mean that it's ok.
      
      I'd add more random tabs to our Kconfig files, but I don't want to make
      things uglier than necessary.  But it *might* bbe necessary if it turns
      out we see more of this kind of silly tooling.
      
      Fixes: d96c3600 ("tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry")
      Link: https://lore.kernel.org/lkml/CAHk-=wj-hLLN_t_m5OL4dXLaxvXKy_axuoJYXif7iczbfgAevQ@mail.gmail.com/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d5cf50da
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 5939d451
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix the buffer_percent accounting as it is dependent on three
         variables:
      
           1) pages_read - number of subbuffers read
           2) pages_lost - number of subbuffers lost due to overwrite
           3) pages_touched - number of pages that a writer entered
      
         These three counters only increment, and to know how many active
         pages there are on the buffer at any given time, the pages_read and
         pages_lost are subtracted from pages_touched.
      
         But the pages touched was incremented whenever any writer went to the
         next subbuffer even if it wasn't the only one, so it was incremented
         more than it should be causing the counter for how many subbuffers
         currently have content incorrect, which caused the buffer_percent
         that holds waiters until the ring buffer is filled to a given
         percentage to wake up early.
      
       - Fix warning of unused functions when PERF_EVENTS is not configured in
      
       - Replace bad tab with space in Kconfig for FTRACE_RECORD_RECURSION_SIZE
      
       - Fix to some kerneldoc function comments in eventfs code.
      
      * tag 'trace-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        ring-buffer: Only update pages_touched when a new page is touched
        tracing: hide unused ftrace_event_id_fops
        tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry
        eventfs: Fix kernel-doc comments to functions
      5939d451
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_6.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · e00011a1
      Linus Torvalds authored
      Pull MIPS fix from Thomas Bogendoerfer:
       "Fix for syscall_get_nr() to make it work even if tracing is disabled"
      
      * tag 'mips-fixes_6.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: scall: Save thread_info.syscall unconditionally on entry
      e00011a1
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-04-12' of https://gitlab.freedesktop.org/drm/kernel · d1c13e80
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Looks like everyone woke up after holidays, this weeks pull has a
        bunch of stuff all over, 2 weeks worth of amdgpu is a lot of it, then
        i915/xe have a few, a bunch of msm fixes, then some scattered driver
        fixes.
      
        I expect things will settle down for rc5.
      
        client:
         - Protect connector modes with mode_config mutex
      
        ast:
         - Fix soft lockup
      
        host1x:
         - Do not setup DMA for virtual addresses
      
        ivpu:
         - Fix deadlock in context_xa
         - PCI fixes
         - Fixes to error handling
      
        nouveau:
         - gsp: Fix OOB access
         - Fix casting
      
        panfrost:
         - Fix error path in MMU code
      
        qxl:
         - Revert "drm/qxl: simplify qxl_fence_wait"
      
        vmwgfx:
         - Enable DMA for SEV mappings
      
        i915:
         - Couple CDCLK programming fixes
         - HDCP related fix
         - 4 Bigjoiner related fixes
         - Fix for a circular locking around GuC on reset+wedged case
      
        xe:
         - Fix double display mutex initializations
         - Fix u32 -> u64 implicit conversions
         - Fix RING_CONTEXT_CONTROL not marked as masked
      
        msm:
         - DP refcount leak fix on disconnect
         - Add missing newlines to prints in msm_fb and msm_kms
         - fix dpu debugfs entry permissions
         - Fix the interface table for the catalog of X1E80100
         - fix irq message printing
         - Bindings fix to add DP node as child of mdss for mdss node
         - Minor typo fix in DP driver API which handles port status change
         - fix CHRASHDUMP_READ()
         - fix HHB (highest bank bit) for a619 to fix UBWC corruption
      
        amdgpu:
         - GPU reset fixes
         - Fix some confusing logging
         - UMSCH fix
         - Aborted suspend fix
         - DCN 3.5 fixes
         - S4 fix
         - MES logging fixes
         - SMU 14 fixes
         - SDMA 4.4.2 fix
         - KASAN fix
         - SMU 13.0.10 fix
         - VCN partition fix
         - GFX11 fixes
         - DWB fixes
         - Plane handling fix
         - FAMS fix
         - DCN 3.1.6 fix
         - VSC SDP fixes
         - OLED panel fix
         - GFX 11.5 fix
      
        amdkfd:
         - GPU reset fixes
         - fix ioctl integer overflow"
      
      * tag 'drm-fixes-2024-04-12' of https://gitlab.freedesktop.org/drm/kernel: (65 commits)
        amdkfd: use calloc instead of kzalloc to avoid integer overflow
        drm/xe: Label RING_CONTEXT_CONTROL as masked
        drm/xe/xe_migrate: Cast to output precision before multiplying operands
        drm/xe/hwmon: Cast result to output precision on left shift of operand
        drm/xe/display: Fix double mutex initialization
        drm/amdgpu: differentiate external rev id for gfx 11.5.0
        drm/amd/display: Adjust dprefclk by down spread percentage.
        drm/amd/display: Set VSC SDP Colorimetry same way for MST and SST
        drm/amd/display: Program VSC SDP colorimetry for all DP sinks >= 1.4
        drm/amd/display: fix disable otg wa logic in DCN316
        drm/amd/display: Do not recursively call manual trigger programming
        drm/amd/display: always reset ODM mode in context when adding first plane
        drm/amdgpu: fix incorrect number of active RBs for gfx11
        drm/amd/display: Return max resolution supported by DWB
        amd/amdkfd: sync all devices to wait all processes being evicted
        drm/amdgpu: clear set_q_mode_offs when VM changed
        drm/amdgpu: Fix VCN allocation in CPX partition
        drm/amd/pm: fix the high voltage issue after unload
        drm/amd/display: Skip on writeback when it's not applicable
        drm/amdgpu: implement IRQ_STATE_ENABLE for SDMA v4.4.2
        ...
      d1c13e80
    • Yu Kuai's avatar
      block: fix that blk_time_get_ns() doesn't update time after schedule · 3ec48489
      Yu Kuai authored
      While monitoring the throttle time of IO from iocost, it's found that
      such time is always zero after the io_schedule() from ioc_rqos_throttle,
      for example, with the following debug patch:
      
      +       printk("%s-%d: %s enter %llu\n", current->comm, current->pid, __func__, blk_time_get_ns());
              while (true) {
                      set_current_state(TASK_UNINTERRUPTIBLE);
                      if (wait.committed)
                              break;
                      io_schedule();
              }
      +       printk("%s-%d: %s exit  %llu\n", current->comm, current->pid, __func__, blk_time_get_ns());
      
      It can be observerd that blk_time_get_ns() always return the same time:
      
      [ 1068.096579] fio-1268: ioc_rqos_throttle enter 1067901962288
      [ 1068.272587] fio-1268: ioc_rqos_throttle exit  1067901962288
      [ 1068.274389] fio-1268: ioc_rqos_throttle enter 1067901962288
      [ 1068.472690] fio-1268: ioc_rqos_throttle exit  1067901962288
      [ 1068.474485] fio-1268: ioc_rqos_throttle enter 1067901962288
      [ 1068.672656] fio-1268: ioc_rqos_throttle exit  1067901962288
      [ 1068.674451] fio-1268: ioc_rqos_throttle enter 1067901962288
      [ 1068.872655] fio-1268: ioc_rqos_throttle exit  1067901962288
      
      And I think the root cause is that 'PF_BLOCK_TS' is always cleared
      by blk_flush_plug() before scheduel(), hence blk_plug_invalidate_ts()
      will never be called:
      
      blk_time_get_ns
       plug->cur_ktime = ktime_get_ns();
       current->flags |= PF_BLOCK_TS;
      
      io_schedule:
       io_schedule_prepare
        blk_flush_plug
         __blk_flush_plug
          /* the flag is cleared, while time is not */
          current->flags &= ~PF_BLOCK_TS;
       schedule
       sched_update_worker
        /* the flag is not set, hence plug->cur_ktime is not cleared */
        if (tsk->flags & PF_BLOCK_TS)
         blk_plug_invalidate_ts()
      
      blk_time_get_ns
       /* got the time stashed before schedule */
       return plug->cur_ktime;
      
      Fix the problem by clearing cached time in __blk_flush_plug().
      
      Fixes: 06b23f92 ("block: update cached timestamp post schedule/preemption")
      Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
      Link: https://lore.kernel.org/r/20240411032349.3051233-2-yukuai1@huaweicloud.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3ec48489
    • Dave Airlie's avatar
      amdkfd: use calloc instead of kzalloc to avoid integer overflow · 3b0daecf
      Dave Airlie authored
      This uses calloc instead of doing the multiplication which might
      overflow.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      3b0daecf
    • Dave Airlie's avatar
      Merge tag 'drm-msm-next-2024-04-11' of https://gitlab.freedesktop.org/drm/msm into drm-fixes · 6d837271
      Dave Airlie authored
      Fixes for v6.9
      
      Display:
      - Fixes for PM refcount leak when DP goes to disconnected state and
        also when link training fails. This is also one of the issues found
        with the pm runtime series
      - Add missing newlines to prints in msm_fb and msm_kms
      - Change permissions of some dpu debugfs entries which write to const
        data from catalog to read-only to avoid protection faults
      - Fix the interface table for the catalog of X1E80100. This is an
        important fix to bringup DP for X1E80100.
      - Logging fix to print the callback symbol in the invalid IRQ message
        case rather than printing when its known to be NULL.
      - Bindings fix to add DP node as child of mdss for mdss node
      - Minor typo fix in DP driver API which handles port status change
      
      GPU:
      - fix CHRASHDUMP_READ()
      - fix HHB (highest bank bit) for a619 to fix UBWC corruption
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Rob Clark <robdclark@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvFwRUcHGWva7oDeydq1PTiZMduuykCD2MWaFrT4iMGZA@mail.gmail.com
      6d837271
  2. 11 Apr, 2024 29 commits