1. 06 Nov, 2022 1 commit
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 8391aa4b
      Linus Torvalds authored
      Pull `lTracing fixes for 6.1-rc3:
      
       - Fixed NULL pointer dereference in the ring buffer wait-waiters code
         for machines that have less CPUs than what nr_cpu_ids returns.
      
         The buffer array is of size nr_cpu_ids, but only the online CPUs get
         initialized.
      
       - Fixed use after free call in ftrace_shutdown.
      
       - Fix accounting of if a kprobe is enabled
      
       - Fix NULL pointer dereference on error path of fprobe rethook_alloc().
      
       - Fix unregistering of fprobe_kprobe_handler
      
       - Fix memory leak in kprobe test module
      
      * tag 'trace-v6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()
        tracing/fprobe: Fix to check whether fprobe is registered correctly
        fprobe: Check rethook_alloc() return in rethook initialization
        kprobe: reverse kp->flags when arm_kprobe failed
        ftrace: Fix use-after-free for dynamic ftrace_ops
        ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()
      8391aa4b
  2. 05 Nov, 2022 5 commits
  3. 04 Nov, 2022 8 commits
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.1-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 64c3dd0b
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "Dave and I had thought that this would be a very quiet cycle, but we
        thought wrong.
      
        At first there were the usual trickle of minor bugfixes, but then
        Zorro pulled -rc1 and noticed complaints about the stronger memcpy
        checks w.r.t. flex arrays.
      
        Analyzing how to fix that revealed a bunch of validation gaps in
        validating ondisk log items during recovery, and then a customer hit
        an infinite loop in the refcounting code on a corrupt filesystem.
      
        So. This largeish batch of fixes addresses all those problems, I hope.
      
        Summary:
      
         - Fix a UAF bug during log recovery
      
         - Fix memory leaks when mount fails
      
         - Detect corrupt bestfree information in a directory block
      
         - Fix incorrect return value type for the dax page fault handlers
      
         - Fix fortify complaints about memcpy of xfs log item objects
      
         - Strengthen inadequate validation of recovered log items
      
         - Fix incorrectly declared flex array in EFI log item structs
      
         - Log corrupt log items for debugging purposes
      
         - Fix infinite loop problems in the refcount code if the refcount
           btree node block keys are corrupt
      
         - Fix infinite loop problems in the refcount code if the refcount
           btree records suffer MSB bitflips
      
         - Add more sanity checking to continued defer ops to prevent
           overflows from one AG to the next or off EOFS"
      
      * tag 'xfs-6.1-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (28 commits)
        xfs: rename XFS_REFC_COW_START to _COWFLAG
        xfs: fix uninitialized list head in struct xfs_refcount_recovery
        xfs: fix agblocks check in the cow leftover recovery function
        xfs: check record domain when accessing refcount records
        xfs: remove XFS_FIND_RCEXT_SHARED and _COW
        xfs: refactor domain and refcount checking
        xfs: report refcount domain in tracepoints
        xfs: track cow/shared record domains explicitly in xfs_refcount_irec
        xfs: refactor refcount record usage in xchk_refcountbt_rec
        xfs: dump corrupt recovered log intent items to dmesg consistently
        xfs: move _irec structs to xfs_types.h
        xfs: actually abort log recovery on corrupt intent-done log items
        xfs: check deferred refcount op continuation parameters
        xfs: refactor all the EFI/EFD log item sizeof logic
        xfs: create a predicate to verify per-AG extents
        xfs: fix memcpy fortify errors in EFI log format copying
        xfs: make sure aglen never goes negative in xfs_refcount_adjust_extents
        xfs: fix memcpy fortify errors in RUI log format copying
        xfs: fix memcpy fortify errors in CUI log format copying
        xfs: fix memcpy fortify errors in BUI log format copying
        ...
      64c3dd0b
    • Linus Torvalds's avatar
      Merge tag 'landlock-6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux · 5d8401be
      Linus Torvalds authored
      Pull landlock fix from Mickaël Salaün:
       "Fix the test build for some distros"
      
      * tag 'landlock-6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
        selftests/landlock: Build without static libraries
      5d8401be
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · bd745027
      Linus Torvalds authored
      Pull hardening fix from Kees Cook:
      
       - Correctly report struct member size on memcpy overflow (Kees Cook)
      
      * tag 'hardening-v6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        fortify: Capture __bos() results in const temp vars
      bd745027
    • Linus Torvalds's avatar
      Merge tag 'efi-fixes-for-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · 1caa2f18
      Linus Torvalds authored
      Pull EFI fixes from Ard Biesheuvel:
      
       - A pair of tweaks to the EFI random seed code so that externally
         provided version of this config table are handled more robustly
      
       - Another fix for the v6.0 EFI variable refactor that turned out to
         break Apple machines which don't provide QueryVariableInfo()
      
       - Add some guard rails to the EFI runtime service call wrapper so we
         can recover from synchronous exceptions caused by firmware
      
      * tag 'efi-fixes-for-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        arm64: efi: Recover from synchronous exceptions occurring in firmware
        efi: efivars: Fix variable writes with unsupported query_variable_store()
        efi: random: Use 'ACPI reclaim' memory for random seed
        efi: random: reduce seed size to 32 bytes
        efi/tpm: Pass correct address to memblock_reserve
      1caa2f18
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 10d916c8
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There are not a lot of important fixes for the soc tree yet this time,
        but it's time to upstream what I got so far:
      
         - DT Fixes for Arm Juno and ST-Ericsson Ux500 to add missing critical
           temperature points
      
         - A number of fixes for the Arm SCMI firmware, addressing correctness
           issues in the code, in particular error handling and resource
           leaks.
      
         - One error handling fix for the new i.MX93 power domain driver
      
         - Several devicetree fixes for NXP i.MX6/8/9 and Layerscape chips,
           fixing incorrect or missing DT properties for MDIO controller
           nodes, CPLD, USB and regulators for various boards, as well as some
           fixes for DT schema checks.
      
         - MAINTAINERS file updates for HiSilicon LPC Bus and Broadcom git
           URLs"
      
      * tag 'soc-fixes-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (26 commits)
        arm64: dts: juno: Add thermal critical trip points
        firmware: arm_scmi: Fix deferred_tx_wq release on error paths
        firmware: arm_scmi: Fix devres allocation device in virtio transport
        firmware: arm_scmi: Make Rx chan_setup fail on memory errors
        firmware: arm_scmi: Make tx_prepare time out eventually
        firmware: arm_scmi: Suppress the driver's bind attributes
        firmware: arm_scmi: Cleanup the core driver removal callback
        MAINTAINERS: Update HiSilicon LPC BUS Driver maintainer
        ARM: dts: ux500: Add trips to battery thermal zones
        arm64: dts: ls208xa: specify clock frequencies for the MDIO controllers
        arm64: dts: ls1088a: specify clock frequencies for the MDIO controllers
        arm64: dts: lx2160a: specify clock frequencies for the MDIO controllers
        soc: imx: imx93-pd: Fix the error handling path of imx93_pd_probe()
        arm64: dts: imx93: correct gpio-ranges
        arm64: dts: imx93: correct s4mu interrupt names
        dt-bindings: power: gpcv2: add power-domains property
        arm64: dts: imx8: correct clock order
        ARM: dts: imx6dl-yapp4: Do not allow PM to switch PU regulator off on Q/QP
        ARM: dts: imx6qdl-gw59{10,13}: fix user pushbutton GPIO offset
        arm64: dts: imx8mn: Correct the usb power domain
        ...
      10d916c8
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-11-04-1' of git://anongit.freedesktop.org/drm/drm · fde25beb
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This is the weekly fixes for rc4. Misc fixes across rockchip, imx,
        amdgpu and i915.
      
        The biggest change is for amdkfd where the trap handler needs an
        updated fw from a header which makes it a bit larger. I hadn't noticed
        this particular file before so I'm going to figure out what the magic
        is for, but the fix should be fine for now.
      
        amdgpu:
         - DCN 3.1.4 fixes
         - DCN 3.2.x fixes
         - GC 11.x fixes
         - Virtual display fix
         - Fail suspend if resources can't be evicted
         - SR-IOV fix
         - Display PSR fix
      
        amdkfd:
         - Fix possible NULL pointer deref
         - GC 11.x trap handler fix
      
        i915:
         - Add locking around DKL PHY register accesses
         - Stop abusing swiotlb_max_segment
         - Filter out invalid outputs more sensibly
         - Setup DDC fully before output init
         - Simplify intel_panel_add_edid_alt_fixed_modes()
         - Grab mode_config.mutex during LVDS init to avoid WARNs
      
        rockchip:
         - fix probing issues
         - fix framebuffer without iommu
         - fix vop selection
         - fix NULL ptr access
      
        imx:
         - Fix Kconfig
         - fix mode_valid function"
      
      * tag 'drm-fixes-2022-11-04-1' of git://anongit.freedesktop.org/drm/drm: (35 commits)
        drm/amdkfd: update GFX11 CWSR trap handler
        drm/amd/display: Investigate tool reported FCLK P-state deviations
        drm/amd/display: Add DSC delay factor workaround
        drm/amd/display: Round up DST_after_scaler to nearest int
        drm/amd/display: Use forced DSC bpp in DML
        drm/amd/display: Fix DCN32 DSC delay calculation
        drm/amdgpu: Disable GPU reset on SRIOV before remove pci.
        drm/amdgpu: disable GFXOFF during compute for GFX11
        drm/amd: Fail the suspend if resources can't be evicted
        drm/amdkfd: Fix NULL pointer dereference in svm_migrate_to_ram()
        drm/amdgpu: correct MES debugfs versions
        drm/amdgpu: set fb_modifiers_not_supported in vkms
        drm/amd/display: cursor update command incomplete
        drm/amd/display: Enable timing sync on DCN32
        drm/amd/display: Set memclk levels to be at least 1 for dcn32
        drm/amd/display: Update latencies on DCN321
        drm/amd/display: Limit dcn32 to 1950Mhz display clock
        drm/amd/display: Ignore Cable ID Feature
        drm/amd/display: Update DSC capabilitie for DCN314
        drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid
        ...
      fde25beb
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · db385e0b
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "Fixes in clk drivers and some clk rate range fixes in the core as
        well:
      
         - Make sure the struct clk_rate_request is more sane
      
         - Remove a WARN_ON that was triggering for clks with no parents that
           can change frequency
      
         - Fix bad i2c bus transactions on Renesas rs9
      
         - Actually return an error in clk_mt8195_topck_probe() on an error
           path
      
         - Keep the GPU memories powered while the clk isn't enabled on
           Qualcomm's sc7280 SoC
      
         - Fix the parent clk for HSCIF modules on Renesas' R-Car V4H SoC"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: qcom: Update the force mem core bit for GPU clocks
        clk: Initialize max_rate in struct clk_rate_request
        clk: Initialize the clk_rate_request even if clk_core is NULL
        clk: Remove WARN_ON NULL parent in clk_core_init_rate_req()
        clk: renesas: r8a779g0: Fix HSCIF parent clocks
        clk: renesas: r8a779g0: Add SASYNCPER clocks
        clk: mediatek: clk-mt8195-topckgen: Fix error return code in clk_mt8195_topck_probe()
        clk: sifive: select by default if SOC_SIFIVE
        clk: rs9: Fix I2C accessors
      db385e0b
    • Shang XiaoJing's avatar
      tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd() · 66f0919c
      Shang XiaoJing authored
      test_gen_kprobe_cmd() only free buf in fail path, hence buf will leak
      when there is no failure. Move kfree(buf) from fail path to common path
      to prevent the memleak. The same reason and solution in
      test_gen_kretprobe_cmd().
      
      unreferenced object 0xffff888143b14000 (size 2048):
        comm "insmod", pid 52490, jiffies 4301890980 (age 40.553s)
        hex dump (first 32 bytes):
          70 3a 6b 70 72 6f 62 65 73 2f 67 65 6e 5f 6b 70  p:kprobes/gen_kp
          72 6f 62 65 5f 74 65 73 74 20 64 6f 5f 73 79 73  robe_test do_sys
        backtrace:
          [<000000006d7b836b>] kmalloc_trace+0x27/0xa0
          [<0000000009528b5b>] 0xffffffffa059006f
          [<000000008408b580>] do_one_initcall+0x87/0x2a0
          [<00000000c4980a7e>] do_init_module+0xdf/0x320
          [<00000000d775aad0>] load_module+0x3006/0x3390
          [<00000000e9a74b80>] __do_sys_finit_module+0x113/0x1b0
          [<000000003726480d>] do_syscall_64+0x35/0x80
          [<000000003441e93b>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
      
      Link: https://lore.kernel.org/all/20221102072954.26555-1-shangxiaojing@huawei.com/
      
      Fixes: 64836248 ("tracing: Add kprobe event command generation test module")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
      Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      66f0919c
  4. 03 Nov, 2022 26 commits