summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-05-04dm-ima: use active table's size if availableBenjamin Marzinski
It is possible that the dm_ima_measure_on_* functions run at the same time as a table is getting swapped, but before the md->ima.active_table is updated by dm_ima_measure_on_device_resume(). Instead of using the current device size, use the size of the active table that is being measured (assuming there is one), so the information is consistent. Also, don't allocate a separate string to hold the capactiy. Just print it directly to the measurement buffer. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: Fail more gracefully in dm_ima_measure_on_*Benjamin Marzinski
In all the dm_ima_measure_on_* functions besides dm_ima_measure_on_table_load(), even if measuring the event fails, it's still possible to update dm->ima, so that it continues to correctly track the device state. This means that one measurement failure won't cause future measurements to record the wrong data. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: Handle race between rename and table swapBenjamin Marzinski
a device rename could happen after do_resume() removed the inactive table that it was swapping to out of the hash cell, but before it was made the active table. In this case, the table metadata would still have the old name. Update the swapped table's metadata to avoid this. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: Fix issues with dm_ima_measure_on_device_renameBenjamin Marzinski
dm_ima_measure_on_device_rename() can be called on a device before it ever loads a table, so it needs to handle the case where there is no table metadata. Also, it was only updating the table_metadata on the active table. If there was an inactive table when the device was renamed and that table was later swapped in as the active table, it would still have the old name. dm_ima_measure_on_device_rename() was also needlessly allocating new memory for the updated table metadata, instead of just reusing the existing memory. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: remove new_map from dm_ima_measure_on_device_clearBenjamin Marzinski
Now that two processes can't modify md->ima in dm_ima_measure_on_device_clear() at the same time, there's no need to track if an inactive table was actually removed. We might as well clean it up unconditionally, on the off chance that a previous ima measurement failed and left md->ima.inactive_table behind. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04ASoC: codecs: ab8500: Remove suspicious codeUwe Kleine-König (The Capable Hub)
anc_configure() passed values from drvdata->anc_fir_values[], drvdata->anc_iir_values[] and drvdata->sid_fir_values[] as register offset to snd_soc_component_read(). The content of these arrays are user controllable via the component controls "ANC FIR Coefficients", "ANC IIR Coefficients" and "Sidetone FIR Coefficients" which I assume are supposed to hold register values, not register offsets. Without a datasheet for that component and given that before commit a201aef1a88b ("ASoC: codecs: ab8500: Fix casting of private data") the arrays overlapped with driver control structures and thus didn't work properly since 2012, drop that functionality and let someone repair it who has an actual need for it. With the core functionally removed several code parts become essentially unused and are removed, too. Reported-by: Sashiko (gemini/gemini-3.1-pro-preview) Link: https://sashiko.dev/#/patchset/20260428192255.2294705-2-u.kleine-koenig%40baylibre.com Fixes: 679d7abdc754 ("ASoC: codecs: Add AB8500 codec-driver") Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20260430154524.338912-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-04dm-ima: Fix UAF errors and measuring incorrect contextBenjamin Marzinski
the dm-ima code did not keep the dm_ima_measure_on_* functions from running at the same time. This could lead to various errors. If two processes were updating the device state, one could update the state first, but the other could measure the state first, causing the the current device state to appear incorrect. If a table load happened while a device was resuming, the IMA measurement could report the wrong table being active. And if two dm_ima_measure_on_* functions ran at the same time, one of them could free data that the other was accessing, causing a crash. All the core dm functions that call a dm_ima_measure_on_* function update the device state they want to measure under the _hash_lock, except for do_resume(). But holding the _hash_lock is not a good way to synchronize these functions. It's a global mutex, that is needed in many dm operations, and the dm_ima_measure_* functions can sleep, blocking any dm operation on any device that needs the _hash_lock. To serialize and order the IMA measurement functions, the dm_ima_measurements now has two counters, update_idx and measure_idx. update_idx is incremented while holding the _hash_lock and saved, along with the device name and uuid, in a dm_ima_context struct. Once the _hash_lock is dropped, the dm_ima_measure_* function is called. It waits until measure_idx matches the saved value of update_idx, ensuring that the updates and measurements happen in the same order if there are multiple processes changing the device at the same time. Then it measures the device, updates measure_idx, and wakes up any other process waiting to do a measurement. This makes sure that the measurements are serialized and done in the order that the _hash_lock was acquired in. But they only block other measurements for the same device, which are unlikely to happen at the same time. do_resume() is trickier, because it removes the inactive table while holding the _hash_lock, but doesn't hold it while updating md->map. To make sure it is also ordered, the IMA code grabs the _hash_lock after md->map is updated. Then it makes sure that the device isn't being removed and that another do_resume() hasn't already changed the active table again, and serializes like the other functions do. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: don't copy the active table to the inactive tableBenjamin Marzinski
If an inactive table was cleared, dm_ima_measure_on_table_clear() was copying the ima.active_table to ima.inactive_table. This is not what device-mapper does, and it makes the IMA measurements show an inactive table when there isn't one. Also, once this is removed, the code no longer needs to keep checking if the active and the inactive table point to the same memory. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: Remove status_flags from dm_ima_measure_on_table_load()Benjamin Marzinski
There is no status flag that is is used for STATUSTYPE_IMA type status() calls, and STATUSTYPE_IMA itself is not a valid status flag. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: remove broken last_target_measured logicBenjamin Marzinski
When it ran out of space for adding more targets to the ima_buf, dm_ima_measure_on_table_load() would measure the dm device early, and then add the rest of the targets and measure it again. last_target_measured was intended to flag the last target measured so that the device wouldn't get remeasured, if no new targets were added after the early measurement. But the way to code works, the dm device will never be measured early unless there is another target to add to the ima_buf. Instead, if there is only one more target to add, that target was getting added to the ima_buf, but it wasn't getting remeasured, because last_target_measured was set. Since dm_ima_measure_on_table_load() only measures a device early when there are more targets to add, the final measurement must always happen, and last_target_measured is unneeded. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-ima: remove dm_ima_reset_data()Benjamin Marzinski
There's no point in saving the string length of DM_IMA_VERSION_STR. It's a constant, so the compiler will precompute it. dm_create() will already zero out the rest of dm->ima. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm-raid: only requeue bios when dm is suspendingBenjamin Marzinski
returning DM_MAPIO_REQUEUE from the target map() function only requeues the bio during noflush suspends. During regular operations or during flushing suspends, it fails the bio. Failing the bio during flushing suspends is the correct behavior here. We cannot handle the bio, and we cannot suspends while it is outstanding. But during normal operations, we should not push the bio back to dm. Instead, wait for the reshape to be resumed. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04dm vdo: use get_random_u32() where appropriateDavid Carlier
Use the typed random integer helpers instead of get_random_bytes() when filling a single integer variable. The helpers return the value directly, require no pointer or size argument, and better express intent. Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Matthew Sakai <msakai@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-05-04drm/sysfb: vesadrm: Support power managementThomas Zimmermann
Set PM ops for the vesadrm driver. Suspend and resume the DRM state on systems that support it. Many systems lose the hardware's framebuffer settings on suspend, hence resuming doesn't work there. Yet some systems, most notably emulators, keep the hardware state across suspend/resume cycles. There, DRM's suspend and resume helpers bring back the display on resume. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260408120722.328769-6-tzimmermann@suse.de
2026-05-04drm/sysfb: simpledrm: Support power managementThomas Zimmermann
Set PM ops for the simpledrm driver. Suspend and resume the DRM state on systems that support it. Many systems lose the hardware's framebuffer settings on suspend, hence resuming doesn't work there. Yet some systems, most notably emulators, keep the hardware state across suspend/resume cycles. There, DRM's suspend and resume helpers bring back the display on resume. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260408120722.328769-5-tzimmermann@suse.de
2026-05-04drm/sysfb: ofdrm: Support power managementThomas Zimmermann
Set PM ops for the ofdrm driver. Suspend and resume the DRM state on systems that support it. Many systems lose the hardware's framebuffer settings on suspend, hence resuming doesn't work there. Yet some systems, most notably emulators, keep the hardware state across suspend/resume cycles. There, DRM's suspend and resume helpers bring back the display on resume. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260408120722.328769-4-tzimmermann@suse.de
2026-05-04drm/sysfb: efidrm: Support power managementThomas Zimmermann
Set PM ops for the efidrm driver. Suspend and resume the DRM state on systems that support it. Many systems lose the hardware's framebuffer settings on suspend, hence resuming doesn't work there. Yet some systems, most notably emulators, keep the hardware state across suspend/resume cycles. There, DRM's suspend and resume helpers bring back the display on resume. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260408120722.328769-3-tzimmermann@suse.de
2026-05-04drm/sysfb: corebootdrm: Support power managementThomas Zimmermann
Set PM ops for the corebootdrm driver. Suspend and resume the DRM state on systems that support it. Many systems lose the hardware's framebuffer settings on suspend, hence resuming doesn't work there. Yet some systems, most notably emulators, keep the hardware state across suspend/resume cycles. There, DRM's suspend and resume helpers bring back the display on resume. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260408120722.328769-2-tzimmermann@suse.de
2026-05-04drm/crc: Fix typo in doc for drm_crtc_crcEduardo Vasconcelos
Fix a typo in the documentation for struct drm_crtc_crc ("occured." -> "occurred"). Signed-off-by: Eduardo Vasconcelos <eduardo@eduardovasconcelos.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260424183630.3764-1-eduardo@eduardovasconcelos.com
2026-05-04x86/boot: Get rid of kstrtoull()Borislav Petkov (AMD)
Fold the '+' check in the single-underscore-prefixed version _kstrtoull() and remove the function. The arch/x86/boot/ namespace prefixes everything copied from kernel proper with "boot_" so that namespace clashes can be avoided. No functional changes. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
2026-05-04x86/boot/compressed: Use boot_kstrtoul() for hugepages= parsingThorsten Blum
Replace simple_strtoull() with boot_kstrtoul() for parsing the hugepages= boot parameter. Unlike simple_strtoull(), boot_kstrtoul() performs strict validation and returns an error on invalid inputs instead of silently accepting partial input. Use boot_kstrtoul() to reject and warn about invalid hugepages= values. boot_kstrtoul() also converts the input directly to an unsigned long and avoids implicit casting as max_gb_huge_pages *is* an unsigned long. [ bp: Massage commit message. ] Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260409161600.152012-2-thorsten.blum@linux.dev
2026-05-04Merge tag 'clk-renesas-rzg3e-plldsi-tag' into renesas-clk-for-v7.2Geert Uytterhoeven
clk: renesas: rzg3e: Add support for DSI clocks RZ/G3E Clock Pulse Generator PLLDSI limits, shared by clock and MIPI DSI driver source files.
2026-05-04clk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resetsTommaso Merciai
Add LCDC{0,1} clocks and resets entries to the r9a09g047 CPG driver. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://patch.msgid.link/c1b5afcef8068d4d074aff97e30b4d64b7c38eaf.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: r9a09g047: Add support for DSI clocks and resetsTommaso Merciai
Add definitions for DSI clocks and resets on the R9A09G047 cpg driver to enable proper initialization and control of the DSI hardware. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://patch.msgid.link/21ac6da825e8fad0b0a9d37d6daa955b0d23ce07.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLKTommaso Merciai
Add support for the SMUX2_DSI0_CLK and SMUX2_DSI1_CLK clock muxes present on the r9a09g047 SoC. These muxes select between CDIV7_DSI{0,1}_CLK and CSDIV_2to16_PLLDSI{0,1} using the CPG_SSEL3 register (SELCTL0 and SELCTL1 bits). According to the hardware manual, when LVDS0 or LVDS1 outputs are used, SELCTL0 or SELCTL1 must be set accordingly. Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/9595f56ce8ab120477bfc11eaafb0f2b655d049a.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocksTommaso Merciai
Add the CLK_PLLDSI0_CSDIV and CLK_PLLDSI1_CSDIV fixed-factor clocks to the r9a09g047 SoC clock driver. These clocks are required to enable DSI and RGB output support. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://patch.msgid.link/4d5b4ddad89770447b3818381d5353f5065b72b5.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocksTommaso Merciai
Add the CLK_PLLDSI0_DIV7 and CLK_PLLDSI1_DIV7 fixed-factor clocks to the r9a09g047 SoC clock driver. These clocks are required to enable LVDS0 and LVDS1 output support. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://patch.msgid.link/e50c1721e1dc160e8b4518e8c5172f10cba4b58b.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocksTommaso Merciai
Add support for the PLLDSI{0,1} clocks in the r9a09g047 CPG driver. Introduce CLK_PLLDSI{0,1} also, introduce the rzg3e_cpg_pll_dsi{0,1}_limits structures to describe the frequency constraints specific to the RZ/G3E SoC. On Renesas RZ/G3E: - PLLDSI0 maximum output frequency: 1218 MHz - PLLDSI1 maximum output frequency: 609 MHz These limits are enforced through the newly added RZG3E_CPG_PLL_DSI{0,1}_LIMITS(). Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://patch.msgid.link/d26ec5349b0eb7ddb7d244fc53d1111a8530328f.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK supportTommaso Merciai
Add CLK_PLLETH_LPCLK clock support. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://patch.msgid.link/dcb0cab96e2ff3e23eafac061b2952c74622d1f8.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04clk: renesas: rzv2h: Add PLLDSI clk mux supportTommaso Merciai
Add PLLDSI clk mux support to select PLLDSI clock from different clock sources. Introduce the DEF_PLLDSI_SMUX() macro to define these muxes and register them in the clock driver. Extend the determine_rate callback to calculate and propagate PLL parameters via rzv2h_get_pll_dtable_pars() when LVDS output is selected, using a new helper function rzv2h_cpg_plldsi_smux_lvds_determine_rate(). The CLK_SMUX2_DSI{0,1}_CLK clock multiplexers select between two paths with different duty cycles: - CDIV7_DSIx_CLK (LVDS path, parent index 0): asymmetric H/L=4/3 duty (4/7) - CSDIV_DSIx (DSI/RGB path, parent index 1): symmetric 50% duty (1/2) Implement rzv2h_cpg_plldsi_smux_{get,set}_duty_cycle clock operations to allow the DRM driver to query and configure the appropriate clock path based on the required output duty cycle. Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/24d3853ca2522df21e6a071a23e23ba4ca4b7276.1775636898.git.tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-05-04drm/vmwgfx: Convert to DRM vblank timersThomas Zimmermann
Replace vmwgfx's vblank timer with DRM's common implementation. The timer handling is almost identical with a few additional bug fixes in the common code. Replace most of vmwgfx's vmw_vkms_get_vblank_timestamp() with the shared helper drm_crtc_vblank_get_vblank_timeout(). The common helper also works in the presence of delayed vblank timeouts that modify the vblank counter concurrently. Set the timeout handler to vmw_vkms_handle_vblank_timeout(). In addition to handling vblank events, this function also controls CRC generation. Remove all the hrtimer-related code from vmwgfx. DRM vblank timers provides this. v2: - only cancel vblank timer in CRTC cleanup if vkms_enabled (Zack) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patch.msgid.link/20260427150250.699768-4-tzimmermann@suse.de
2026-05-04drm/vmwgfx: Move vblank handling into separate helperThomas Zimmermann
Decouple vblank handling from the underlying hrtimer. This will be helpful for replacing vmwgfx's vblank timer with DRM's common implementation. The new helper vmw_vkms_handle_vblank_timeout() can later be used as callback for DRM's handle_vblank call as-is. The helper also keeps the current semantics for restarting the timer. It returns true to restart the next vblank timeout even if it could not acquire vmwgfx's vblank lock. The remaining code in vmw_vkms_vblank_simulate() will be replaced by the DRM implementation in a later patch. v2: - clarify return-value semantics in commit message (Zack) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patch.msgid.link/20260427150250.699768-3-tzimmermann@suse.de
2026-05-04drm/vmwgfx: Determine lock-waiting timeout from vblank stateThomas Zimmermann
Use the calculated duration of a frame as stored in the vblank state for the lock-waiting timeout. Decouples the waiting from the details of the vblank implementation. Both values should be equal. This will be helpful for replacing vmwgfx's vblank timer with DRM's common implementation. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patch.msgid.link/20260427150250.699768-2-tzimmermann@suse.de
2026-05-04gfs2: fix use-after-free in gfs2_qd_deallocTristan Madani
gfs2_qd_dealloc(), called as an RCU callback from gfs2_qd_dispose(), accesses the superblock object sdp through qd->qd_sbd after freeing qd. It does so to decrement sd_quota_count and wake up sd_kill_wait. However, by the time the RCU callback runs, gfs2_put_super() may have already freed sdp via free_sbd(). This can happen when gfs2_quota_cleanup() is called during unmount: it disposes of quota objects via call_rcu() and then waits on sd_kill_wait with a 60-second timeout. If the timeout expires, or if gfs2_gl_hash_clear() triggers additional qd_put() calls that schedule more RCU callbacks after the wait completes, gfs2_put_super() will proceed to free the superblock while RCU callbacks referencing it are still pending. Add an rcu_barrier() before free_sbd() in gfs2_put_super() to ensure all pending RCU callbacks (including gfs2_qd_dealloc) have completed before the superblock is freed. Fixes: a475c5dd16e5 ("gfs2: Free quota data objects synchronously") Reported-by: syzbot+42a37bf8045847d8f9d2@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=42a37bf8045847d8f9d2 Tested-by: syzbot+42a37bf8045847d8f9d2@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani <tristan@talencesecurity.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2026-05-04drm: verisilicon: fill plane's vs_format in atomic_checkIcenowy Zheng
Move the conversion from drm_format to vs_format to atomic_check, which is before the point of no return and can properly bail out. Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260331060126.1291966-5-zhengxingda@iscas.ac.cn
2026-05-04drm: verisilicon: call atomic helper's plane state check even if no CRTCIcenowy Zheng
The `drm_atomic_helper_check_plane_state()` helper function needs to be called even if the plane is bound to no CRTCs. Remove the early return in the primary plane's atomic_check, and use NULL for crtc_state in this situation. Fixes: dbf21777caa8 ("drm: verisilicon: add a driver for Verisilicon display controllers") Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260331060126.1291966-4-zhengxingda@iscas.ac.cn
2026-05-04drm: verisilicon: subclass drm_plane_stateIcenowy Zheng
Create a subclass of drm_plane_state to store hardware-specific state information (e.g. hardware plane format settings) in the future. Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260331060126.1291966-3-zhengxingda@iscas.ac.cn
2026-05-04drm: verisilicon: make vs_format conversion function return intIcenowy Zheng
This is for further proper invalid drm_format handling before committing the plane state change. The return value is not yet checked yet, and will be checked in atomic_check in the future. Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260331060126.1291966-2-zhengxingda@iscas.ac.cn
2026-05-04fpga-mgr: Add Efinix SPI programming driverIan Dannapel
Add a new driver for loading binary firmware to configuration RAM using "SPI passive mode" on Efinix FPGAs. Efinix passive SPI configuration requires chip select to remain asserted from reset until the complete bitstream and trailing idle clocks have been transferred, so the driver keeps CS active with cs_change and locks the SPI bus for the duration of configuration. Signed-off-by: Ian Dannapel <iansdannapel@gmail.com> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20260416144237.373852-4-iansdannapel@gmail.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
2026-05-04dt-bindings: fpga: Add Efinix SPI programming bindingsIan Dannapel
Add device tree bindings documentation for configuring Efinix FPGA using serial SPI passive programming mode. Signed-off-by: Ian Dannapel <iansdannapel@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20260416144237.373852-3-iansdannapel@gmail.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
2026-05-04dt-bindings: vendor-prefix: Add prefix for Efinix, Inc.Ian Dannapel
Add entry for Efinix, Inc. (https://www.efinixinc.com/) Signed-off-by: Ian Dannapel <iansdannapel@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Alexander Dahl <ada@thorsis.com> Link: https://lore.kernel.org/r/20260416144237.373852-2-iansdannapel@gmail.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
2026-05-04ALSA: jack: use scnprintf to improve parse_mask_bitsThorsten Blum
Use the return value of scnprintf() to keep track of the current string length and also replace strlcat() with scnprintf(). Return the string length directly instead of calling strlen(buf). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260503101102.298782-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-04fpga: ts73xx-fpga: add OF match table for device tree probingPhil Pemberton
The ts73xx-fpga driver currently only matches by platform device name, which prevents it from being probed when the device is described in a device tree. Add an of_device_id table so the driver can match against the "technologic,ts7300-fpga" compatible string. The TS-7350 and TS-7390 use different FPGAs with a different programming interface, so while the driver is named "ts73xx-fpga", it doesn't apply to them. Signed-off-by: Phil Pemberton <philpem@philpem.me.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20260409122016.3940462-3-philpem@philpem.me.uk Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
2026-05-04dt-bindings: fpga: Add Technologic Systems TS-7300 FPGA ManagerPhil Pemberton
Add device tree binding documentation for the Altera Cyclone II FPGA found on Technologic Systems (now EmbeddedTS) TS-7300 boards, programmed via the memory-mapped interface in the CPLD. Signed-off-by: Phil Pemberton <philpem@philpem.me.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260409122016.3940462-2-philpem@philpem.me.uk Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
2026-05-04fpga: region: fix use-after-free in child_regions_with_firmware()Wentao Liang
Move of_node_put(child_region) after the error print to avoid accessing freed memory when pr_err() references child_region. Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> [ Yilun: Fix the Fixes tag ] Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20260408154534.404327-1-vulab@iscas.ac.cn Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
2026-05-04ALSA: pcmtest: Return -EFAULT on pattern read copy failureCássio Gabriel
pattern_write() reports -EFAULT when copy_from_user() fails, but pattern_read() converts copy_to_user() failures into a zero-length read. That makes a userspace buffer fault look like EOF instead of reporting the actual error. Return -EFAULT from pattern_read() when copying the pattern data to userspace fails, and update the file offset only after a successful copy. Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260501-alsa-pcmtest-pattern-read-efault-v1-1-53e1e8c11dda@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-04ALSA: seq: oss/rw: allocate evrec with main structRosen Penev
Use a flexible array member to simplify allocation slightly. Add the header as flexible array members require full definitions. Remove null check and just kfree. The former is not needed. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260430210413.31185-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-04i2c: stub: Reject I2C block transfers with invalid lengthWeiming Shi
The I2C_SMBUS_I2C_BLOCK_DATA case in stub_xfer() uses data->block[0] as the transfer length. The existing check only clamps it to avoid overrunning the chip->words[256] register array, but does not validate it against I2C_SMBUS_BLOCK_MAX (32), which is the limit of the union i2c_smbus_data.block buffer (34 bytes total). The driver is a development/test tool (CONFIG_I2C_STUB=m, not built by default) that must be loaded with a chip_addr= parameter. A local user with access to /dev/i2c-* can issue an I2C_SMBUS ioctl with I2C_SMBUS_I2C_BLOCK_DATA and data->block[0] > 32, causing stub_xfer() to read or write past the end of the union i2c_smbus_data.block buffer: BUG: KASAN: stack-out-of-bounds in stub_xfer (drivers/i2c/i2c-stub.c:223) Read of size 1 at addr ffff88800abcfd92 by task exploit/81 Call Trace: <TASK> stub_xfer (drivers/i2c/i2c-stub.c:223) __i2c_smbus_xfer (drivers/i2c/i2c-core-smbus.c:593) i2c_smbus_xfer (drivers/i2c/i2c-core-smbus.c:536) i2cdev_ioctl_smbus (drivers/i2c/i2c-dev.c:391) i2cdev_ioctl (drivers/i2c/i2c-dev.c:478) __x64_sys_ioctl (fs/ioctl.c:583) do_syscall_64 (arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) </TASK> The bug exists because i2c-stub implements .smbus_xfer directly, bypassing the I2C_SMBUS_BLOCK_MAX validation in i2c_smbus_xfer_emulated(). The I2C_SMBUS_BLOCK_DATA case in the same function correctly validates against I2C_SMBUS_BLOCK_MAX, but the I2C_SMBUS_I2C_BLOCK_DATA case does not. Fix by rejecting transfers with data->block[0] == 0 or data->block[0] > I2C_SMBUS_BLOCK_MAX with -EINVAL, consistent with both the I2C_SMBUS_BLOCK_DATA case in the same function and the I2C_SMBUS_I2C_BLOCK_DATA validation in i2c_smbus_xfer_emulated(). Fixes: 4710317891e4 ("i2c-stub: Implement I2C block support") Reported-by: Xiang Mei <xmei5@asu.edu> Signed-off-by: Weiming Shi <bestswngs@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2026-05-04ALSA: Consistently define pci_device_ids using named initializersUwe Kleine-König (The Capable Hub)
... and PCI device helpers. The various struct pci_device_id arrays were initialized mostly by list expressions, some of them using the PCI_DEVICE macros. This isn't easily readable if you're not into PCI. Using named initializers is more explicit and thus easier to parse. Also use PCI_DEVICE* helper macros to assign .vendor, .device, .subvendor and .subdevice where appropriate and skip explicit assignments of 0 (which the compiler takes care of). The secret plan is to make struct pci_device_id::driver_data an anonymous union (similar to https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/) and that requires named initializers. But it's also a nice cleanup on its own. This change doesn't introduce changes to the compiled pci_device_id array. Tested on x86 and arm64. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20260430135255.279393-2-u.kleine-koenig@baylibre.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-04x86/efi: Fix graceful fault handling after FPU softirq changesIvan Hu
Since commit d02198550423 ("x86/fpu: Improve crypto performance by making kernel-mode FPU reliably usable in softirqs"), kernel_fpu_begin() calls fpregs_lock() which uses local_bh_disable() instead of the previous preempt_disable(). This sets SOFTIRQ_OFFSET in preempt_count during the entire EFI runtime service call, causing in_interrupt() to return true in normal task context. The graceful page fault handler efi_crash_gracefully_on_page_fault() uses in_interrupt() to bail out for faults in real interrupt context. With SOFTIRQ_OFFSET now set, the handler always bails out, leaving EFI firmware page faults unhandled. This escalates to die() which also sees in_interrupt() as true and calls panic("Fatal exception in interrupt"), resulting in a hard system freeze. On systems with buggy firmware that triggers page faults during EFI runtime calls (e.g., accessing unmapped memory in GetTime()), this causes an unrecoverable hang instead of the expected graceful EFI_ABORTED recovery. Fix by replacing in_interrupt() with !in_task(). This preserves the original intent of bailing for interrupts or NMI faults, while no longer falsely triggering from the FPU code path's local_bh_disable(). Fixes: d02198550423 ("x86/fpu: Improve crypto performance by making kernel-mode FPU reliably usable in softirqs") Cc: <stable@vger.kernel.org> Signed-off-by: Ivan Hu <ivan.hu@canonical.com> [ardb: Sashiko spotted that using 'in_hardirq() || in_nmi()' leaves a window where a softirq may be taken before fpregs_lock() is called, but after efi_rts_work.efi_rts_id has been assigned, and any page faults occurring in that window will then be misidentified as having been caused by the firmware. Instead, use !in_task(), which incorporates in_serving_softirq(). ] Signed-off-by: Ard Biesheuvel <ardb@kernel.org>