Repository navigation
Rebase edera/6.18-lts onto linux-6.18.y @ fd7cfd39c885 - #117
Open
edera-rebase-app[bot] wants to merge 2679 commits into
Open
edera-rebase-app[bot] wants to merge 2679 commits into
edera-rebase-app[bot] wants to merge 2679 commits into
Conversation
[ Upstream commit 3cee6f7 ] The driver hardcodes IRQF_TRIGGER_HIGH when registering the BAM interrupt, which overrides the trigger type specified in the device tree. On Qualcomm Shikra SoC, the A2 BAM signals an edge interrupt to the apps processor; registering it as level-high causes the interrupt to not fire, resulting in missed DMA completions. Use IRQF_TRIGGER_NONE instead, which causes the kernel to use the trigger type already configured by platform_get_irq() when it parsed the device tree interrupts property. This makes the driver platform-agnostic. Fixes: e7c0fe2 ("dmaengine: add Qualcomm BAM dma driver") Co-developed-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com> Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260717-qcom-bam-dma-irq-trigger-v1-1-6405eac86f00@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Stable-dep-of: 82eed16 ("dmaengine: qcom: bam_dma: free interrupt before the clock in error path") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 82eed16 ] The BAM interrupt is requested with a devres helper and so on error it's freed after probe() returns. We disable the clock before freeing or masking it so it may still fire and we may end up reading BAM registers with clock disabled. Stop using devres for interrupts as we free it in remove() manually anyway. Add an appropriate label and free the interrupt before disabling the clock in error path and in remove(). Cc: stable@vger.kernel.org Fixes: e7c0fe2 ("dmaengine: add Qualcomm BAM dma driver") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260427-qcom-qce-cmd-descr-v16-0-945fd1cafbbc%40oss.qualcomm.com?part=2 Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20261008-bam-dma-free-irq-v28-1-5e5b10de441e@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a6cdfb6 ] Both devm_request_irq() and snd_dmaengine_pcm_register() already log failures internally. Drop the redundant error messages and return the original errors directly. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260720074044.87528-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of: 1b207c8 ("ASoC: stm: stm32_i2s: request IRQ after regmap initialization") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1b207c8 ] The ISR accesses the managed regmap, but probe requests the IRQ before creating it. An early interrupt can reach an uninitialized regmap. Reverse-order cleanup can free the regmap while the IRQ remains active. Request the IRQ after regmap initialization so probe unwind and removal free and synchronize it before releasing the regmap. The teardown ordering issue was found by static analysis. Fixes: e4e6ec7 ("ASoC: stm32: Add I2S driver") Cc: stable@vger.kernel.org Assisted-by: LLM Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20261004043451.1138613-1-mhun512@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 6ac1faf ] A device bound through driver_override need not match an entry in the driver tables. In that case spi_get_device_match_data() returns NULL, but mcp4821_probe() dereferences the result while configuring the IIO device. Reject devices without match data before using the chip information. Fixes: cdf3ecb ("iio: dac: driver for MCP4821") Signed-off-by: Jiale Yao <yaojiale02@163.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> [ sashal: adjusted context due to missing configurable-gain initialization ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 56722cf ] The Yoga Pro 9 16IMH9 (codec SSID 17aa:38d6) shares PCI audio device subsystem ID 17aa:3811 with the Legion S7 15IMH05. The existing SND_PCI_QUIRK entry for the Legion routes both machines to ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS, which does not bind the TAS2781 smart amplifiers, resulting in near-silent built-in speakers. Add an HDA_CODEC_QUIRK entry immediately before the conflicting PCI quirk that matches the Yoga Pro 9's unique codec SSID and routes it to ALC287_FIXUP_TAS2781_I2C. Codec quirks are evaluated after PCI quirks and take precedence, leaving the Legion S7 15IMH05 entry unaffected. This follows the same pattern used to disambiguate PCI SSID 17aa:3847 (shared between Yoga Pro 7 14IMH9 and Legion 7 16ACHG6), where a HDA_CODEC_QUIRK for codec SSID 17aa:38cf resolves the conflict. Signed-off-by: Rámon van Raaij <ramon@vanraaij.eu> Link: https://patch.msgid.link/20260430191224.patch1-ramon@vanraaij.eu Signed-off-by: Takashi Iwai <tiwai@suse.de> Stable-dep-of: 1c36207 ("ALSA: hda/realtek: Fix silent speakers on Lenovo Legion S7 15IMH05") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit dd074f0 ] The Lenovo Legion 7 16ITHG6 uses codec SSID 17aa:3855, but its PCI SSID is 17aa:3811. The latter is now also used by the Legion S7 15IMH05 quirk, which is matched before codec SSID fallback and incorrectly routes Legion 7 16ITHG6 machines to ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS. That fixup does not bind the CLSA0101 CS35L41 companion amplifiers, making the built-in speakers silent even though playback appears to be active. Add a codec SSID quirk for 17aa:3855 before the conflicting PCI SSID quirk so that the Legion 7 16ITHG6 uses ALC287_FIXUP_LEGION_16ITHG6. This restores CS35L41 firmware loading and binds both speaker amplifiers. Fixes: 67f4c61 ("ALSA: hda/realtek: Add quirk for Legion S7 15IMH") Cc: stable@vger.kernel.org Tested-by: Nicholas Bonello <hadobedo@gmail.com> Assisted-by: Codex:GPT-5 Signed-off-by: Nicholas Bonello <hadobedo@gmail.com> Link: https://patch.msgid.link/20260508225507.47667-1-hadobedo@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Stable-dep-of: 1c36207 ("ALSA: hda/realtek: Fix silent speakers on Lenovo Legion S7 15IMH05") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1c36207 ] The speakers on the Legion S7 15IMH05 (PCI SSID 17aa:3811, ALC287) stay silent after a cold boot with the current quirk, which applies ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS. They only start working after a suspend/resume cycle. The amplifier setup is sent through COEF 0x24/0x26 on NID 0x20. On this machine the first pass of that sequence appears to only wake the amplifiers. Sending the identical sequence a second time makes both speakers work, provided the second write comes a few milliseconds after the first: back-to-back writes leave the speakers silent, a 7 ms gap makes only the right speaker work, and 8 ms or more is reliable. A dump of all COEF registers of NID 0x20 taken before and after the second write shows no difference. Add a dedicated fixup that writes the sequence, waits 20 ms to keep a margin over the measured minimum, and writes it again on every codec init. It chains to the same AUTOMUTE fixup as before. To share the sequence, move the verbs of ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS into a named array; this has no functional change for the other users of that fixup. Fixes: 67f4c61 ("ALSA: hda/realtek: Add quirk for Legion S7 15IMH") Cc: stable@vger.kernel.org Link: CachyOS/linux-cachyos#792 Signed-off-by: Matej Sochan <matej.sochan@gmail.com> Link: https://patch.msgid.link/20261007-legion-s7-v1-1-8ea7fb7ee766@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit cbbd5a9 ] Allow controller variants to provide a custom initialization callback through their capability data. This prepares the driver for variants which require a different hardware initialization sequence without adding SoC checks to the common path. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Link: https://patch.msgid.link/20260709112006.390742-3-robert.marko@sartura.hr Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of: 717e45f ("spi: atmel-quadspi: balance runtime PM and pclk across system sleep") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit b881f1d ] Assign the existing SAMA7G5 initialization routine to every generic clock variant and dispatch initialization exclusively through the capability callback. This keeps hardware capabilities separate from initialization selection and lets variants override the sequence explicitly. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Link: https://patch.msgid.link/20260709112006.390742-4-robert.marko@sartura.hr Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of: 717e45f ("spi: atmel-quadspi: balance runtime PM and pclk across system sleep") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 717e45f ] On the controllers with a generic clock (SAMA7G5, SAMA7D65, SAM9X7 and LAN969x), atmel_qspi_suspend() takes a runtime PM reference and returns without dropping it or suspending the device. It disables the peripheral clock directly. atmel_qspi_resume() only prepares the peripheral clock and then reinitializes the controller with that clock still off. On a SAM9X75 Curiosity board, the tested standby and mem resumes failed: atmel_qspi f0014000.spi: PM: failed to resume: error -110 spi-nor spi0.0: resume() failed Reading the flash afterwards returned no data. The runtime usage count grew by one with each cycle, and the second suspend disabled the peripheral clock again: WARNING: drivers/clk/clk.c:1257 at clk_core_disable+0x6c/0xcc qspi_clk already disabled Use the same runtime PM sequence as the other variants. Suspend disables the controller and forces a runtime suspend. Resume forces a runtime resume, which enables the peripheral clock, before it runs the init callback, and drops the reference afterwards. With this change the tested resumes succeed on the board in both modes, the controller returns to runtime suspend, and the flash reads back. Fixes: 5af4220 ("spi: atmel-quadspi: Add support for sama7g5 QSPI") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260709112006.390742-1-robert.marko%40sartura.hr?part=3 Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Link: https://patch.msgid.link/20260923012950.15651-1-kmehltretter@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit b30b52c ] Commit b44a06b ("vfio/pci: Remove #ifdef iowrite64 and #ifdef ioread64") inadvertently converted a conditional 8-byte rejection into an unconditional one. Originally, 'count == 8' was rejected only if iowrite64 was undefined (#ifndef iowrite64). When iowrite64 became globally available via generic fallbacks, this rejection became dead code, allowing 8-byte ioeventfds. However, b44a06b removed the #ifndef wrappers but left the nested 'if (count == 8) return -EINVAL;' intact, breaking all 8-byte registrations. Drop the unconditional check to restore 8-byte ioeventfd support, matching the original intent. Fixes: b44a06b ("vfio/pci: Remove #ifdef iowrite64 and #ifdef ioread64") Cc: stable@vger.kernel.org Signed-off-by: Li RongQing <lirongqing@baidu.com> Link: https://lore.kernel.org/r/20260922040013.2188-1-lirongqing@baidu.com Signed-off-by: Alex Williamson <alex@shazbot.org> [ sashal: Adjusted context to retain vfio_pci_core_setup_barmap() instead of vfio_pci_core_get_iomap(). ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 4b3c2ca ] Pass the ATA port pointer as first argument to ata_eh_reset(). No functionality has been changed. This patch prepares for enabling lock context analysis. Without this patch, lockdep_assert_held() statements would have to be added before each ata_eh_reset() call because the compiler doesn't know that ap->link.p == ap. See also ata_link_init(). Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Niklas Cassel <cassel@kernel.org> Stable-dep-of: 96fdeb7 ("ata: sata_inic162x: remove dangerous broken driver") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 96fdeb7 ] The sata_inic162x driver was labeled as "very experimental" in commit bb96961 ("libata: make it clear that sata_inic162x is experimental") due to data corruption issues, but not marked as broken. Since then, no changes have been made to it that could fix these issues. Since the driver was not marked as broken, and the message about potential data corruption is only visible in the code and dmesg, it is possible that someone could enable the driver without realizing its potential for data corruption. Remove the driver to protect users' data. Fixes: 1fd7a69 ("sata_inic162x: finally, driver for initio 162x SATA controllers, take #2") Cc: stable@vger.kernel.org Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20260915014714.41274-1-enelsonmoore@gmail.com Signed-off-by: Niklas Cassel <cassel@kernel.org> [ sashal: adapted whole-file deletion to account for the missing __must_hold() annotation on inic_error_handler() ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit b9b036b ] In the block layer, bio_split_to_limits() splits a bio if it exceeds any underlying queue limits: 1. queue_max_sectors: Splits bios larger than the transfer limit. This limit is set by the device driver/DMA controller (max_hw_sectors) and device-mapper targets. When flushing dirty pages (governed by VFS writeback_chunk_size() and f2fs nr_pages_to_skip()), f2fs merges contiguous pages into bios up to 512KB (1024 sectors) or more without checking queue_max_sectors, which will be split if the device or DM target enforces a smaller limit. 2. queue_max_segments: Splits bios exceeding scatter-gather segment limits. f2fs allocates bios with up to 256 pages, exceeding the 128-segment limit of DM targets (dm-default-key/dm-crypt) if pages are discontiguous. 3. chunk_sectors: Splits bios crossing chunk/zone boundaries. In f2fs, section_size strictly matches zone_size, and block allocation never spans across section boundaries, so bios never cross chunk_sectors. Crucially, when bio_split_to_limits() splits a bio, bio_submit_split() submits the tail half via submit_bio_noacct() before returning the head half to the caller. On a sequential zoned device, this causes the tail bio to arrive at the zone write plug before the head: dm-3: zone 7: prepare_bio wp mismatch: bio sector 30720 offset 2048 != wp_offset 248, len 248 The write plug rejects the out-of-order tail with BLK_STS_IOERR, causing f2fs_stop_checkpoint() and remounting the filesystem read-only: 2026-09-30T22:09:23.725678+08:00 localhost kernel: CPU: 9 UID: 0 PID: 243 Comm: kworker/9:1H Not tainted 6.12.81-gb3ef518fb26d #5 2026-09-30T22:09:23.725750+08:00 localhost kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014 2026-09-30T22:09:23.725753+08:00 localhost kernel: Workqueue: dm-3_zwplugs blk_zone_wplug_bio_work 2026-09-30T22:09:23.725756+08:00 localhost kernel: Call Trace: 2026-09-30T22:09:23.725758+08:00 localhost kernel: <TASK> 2026-09-30T22:09:23.725758+08:00 localhost kernel: dump_stack_lvl+0x4d/0x70 2026-09-30T22:09:23.725759+08:00 localhost kernel: f2fs_stop_checkpoint+0x1df/0x5d0 2026-09-30T22:09:23.725759+08:00 localhost kernel: ? blk_zone_wplug_bio_work+0x4eb/0x740 2026-09-30T22:09:23.725760+08:00 localhost kernel: f2fs_cache_write_end_io+0x545/0x6e0 2026-09-30T22:09:23.725761+08:00 localhost kernel: blk_zone_wplug_bio_work+0x4eb/0x740 2026-09-30T22:09:23.725762+08:00 localhost kernel: process_one_work+0x5c6/0xde0 2026-09-30T22:09:23.725764+08:00 localhost kernel: ? assign_work+0x124/0x4e0 2026-09-30T22:09:23.725765+08:00 localhost kernel: worker_thread+0x403/0xb70 2026-09-30T22:09:23.725765+08:00 localhost kernel: ? __kthread_parkme+0x82/0x140 2026-09-30T22:09:23.725766+08:00 localhost kernel: ? __pfx_worker_thread+0x10/0x10 2026-09-30T22:09:23.725766+08:00 localhost kernel: kthread+0x235/0x2e0 2026-09-30T22:09:23.725767+08:00 localhost kernel: ? recalc_sigpending+0x128/0x1d0 2026-09-30T22:09:23.725767+08:00 localhost kernel: ? __pfx_kthread+0x10/0x10 2026-09-30T22:09:23.725769+08:00 localhost kernel: ret_from_fork+0x2f/0x70 2026-09-30T22:09:23.725769+08:00 localhost kernel: ? __pfx_kthread+0x10/0x10 2026-09-30T22:09:23.725770+08:00 localhost kernel: ret_from_fork_asm+0x1a/0x30 2026-09-30T22:09:23.725771+08:00 localhost kernel: </TASK> 2026-09-30T22:09:23.725771+08:00 localhost kernel: F2FS-fs (dm-0): Stopped filesystem due to reason: 3 To prevent write bios destined for sequential zones from being split: 1. In __bio_alloc(), bound npages to bdev_max_segments(bdev) for writes to sequential zone areas. 2. In page_is_mergeable(), check queue_max_segments() and queue_max_sectors() for sequential zone areas, so f2fs will not merge beyond the queue limits. Fixes: 52763a4 ("f2fs: detect host-managed SMR by feature flag") Fixes: 664ba97 ("f2fs: use BIO_MAX_PAGES for bio allocation") Cc: stable@vger.kernel.org Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> [ sashal: Replaced F2FS_BLKSIZE(sbi) with the F2FS_BLKSIZE constant. ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 5b30afc ] Expose the following through cgroup.h: - cgroup_on_dfl() - cgroup_is_dead() - cgroup_for_each_live_child() - cgroup_for_each_live_descendant_pre() - cgroup_for_each_live_descendant_post() Until now, these didn't need to be exposed because controllers only cared about the css hierarchy. The planned sched_ext hierarchical scheduler support will be based on the default cgroup hierarchy, which is in line with the existing BPF cgroup support, and thus needs these exposed. Signed-off-by: Tejun Heo <tj@kernel.org> Stable-dep-of: 15da1e4 ("mm/mglru: fix ineffective memory protection for non-kswapd reclaim") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 15da1e4 ] For MGLRU, memory.min/low is not honored during global proactive reclaim (writing to the root memory.reclaim) and global direct reclaim, because these paths shrink memcgs using stale protection (emin/elow). It can be reproduced as follows: # echo 7 > /sys/kernel/mm/lru_gen/enabled # cd /sys/fs/cgroup # mkdir -p a/b # echo 100M > a/memory.min # echo +memory > a/cgroup.subtree_control # echo 100M > a/b/memory.min # echo $$ > a/b/cgroup.procs # dd if=/dev/zero of=/tmp/testfile bs=1M count=200 # cat a/b/memory.current 222650368 # echo 500M > memory.reclaim -bash: echo: write error: Resource temporarily unavailable # cat a/b/memory.current 6070272 memory.min is 100M, yet reclaim drops a/b down to 6M, breaking the protection. The traditional LRU path is not affected because shrink_node() calls mem_cgroup_calculate_protection() for each memcg it visits during a top-down tree walk. Commit 30d77b7 ("mm/mglru: fix ineffective protection calculation") moved the protection computation into lru_gen_age_node(), which only runs for kswapd. Non-kswapd global reclaim reaches shrink_one() through lru_gen_shrink_node() -> shrink_many() without any protection computation, so emin/elow are whatever a previous kswapd run left behind - or zero if kswapd never ran on this node. Relying on a prior kswapd pass is not correct either: a memcg's emin/elow are derived from its ancestors' memory.min/low settings and from children_min_usage, both of which change over time, so emin/elow go stale even after kswapd has run and must be recomputed at the point of reclaim. Introduce mem_cgroup_calculate_protection_path() which computes emin/elow along the root-to-target path only, by iterating through the cgroup ancestors array top-down. This avoids the full tree traversal that would be needed with mem_cgroup_calculate_protection(), limiting the cost to O(depth) per memcg - typically 3-5 levels. Call it from shrink_one() for the non-kswapd path so that each memcg about to be shrunk has correct protection values. Link: https://lore.kernel.org/20260907025445.1836238-3-ridong.chen@linux.dev Fixes: e4dde56 ("mm: multi-gen LRU: per-node lru_gen_folio lists") Signed-off-by: Ridong Chen <chenridong@xiaomi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Barry Song <baohua@kernel.org> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Assisted-by: Claude:claude-opus-4-8 Cc: Axel Rasmussen <axelrasmussen@google.com> Cc: Chris Down <chris@chrisdown.name> Cc: David Hildenbrand <david@kernel.org> Cc: Kairui Song <kasong@tencent.com> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Shakeel Butt <shakeel.butt@linux.dev> Cc: Tejun Heo <tj@kernel.org> Cc: Wei Xu <weixugc@google.com> Cc: Yuanchu Xie <yuanchu@google.com> Cc: Yu Zhao <yuzhao@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 53b12b6 ] After cp_error, dirty node caches are dropped without being written. If such an inode was never written, its NAT entry is still NEW_ADDR, and reading its inode block returns -ENOENT. f2fs_get_dnode_of_data() passes that -ENOENT up, and callers take it as a hole. Since the inode block is missing, the next offset can only advance one block, so fiemap walks block by block up to maxbytes, about 2^30 blocks, while holding the inode lock. It took hours in a power-off recovery test after shutdown and blocked unlink and umount on the file. Return -EIO instead of -ENOENT when the inode block itself is missing after cp_error or shutdown. A missing direct or indirect node is still reported as -ENOENT. Cc: stable@kernel.org Fixes: 28607bf ("f2fs: drop dirty node pages when cp is in error status") Signed-off-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> [ sashal: adapted inode cache access to folio-based access using f2fs_get_inode_folio() ] Signed-off-by: Sasha Levin <sashal@kernel.org>
…or smu 13.0.0/smu 14.0.2 [ Upstream commit 44d0d30 ] PMFW interprets OverDriveTable.FeatureCtrlMask as the complete set of overdrive features that are currently overridden, not as a delta describing the operation at hand. On import it resets every feature whose bit is clear back to its default value - for the VF curve that means zeroing VoltageOffsetPerZoneBoundary[] outright. The driver assumed the opposite. smu_v14_0_2_od_edit_dpm_table() clears the mask after a successful commit, so a subsequent above-default power1_cap write goes through smu_v14_0_2_set_ppt_limit() and uploads a table carrying only PP_OD_FEATURE_PPT_BIT. PMFW then drops the user's voltage offset and reverts to the stock V/F curve, while the driver's cached user table still reports the offset through pp_od_clk_voltage. Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5935 Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Kevin Wang <kevin.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 1b63bb3) Cc: stable@vger.kernel.org [ sashal: adjusted smu_table_context context for existing gpu_metrics_table_size and gpu_metrics_table fields instead of driver_tables ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 7ee4fa2 ] i2c_check_functionality() returns a boolean status rather than an error code - directly use it as a boolean value. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260505114543.159381-2-thorsten.blum@linux.dev Signed-off-by: Lee Jones <lee@kernel.org> Stable-dep-of: 3c5c55d ("mfd: twl-core: Unregister the auxiliary platform device on unbind") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 3c5c55d ] twl_probe() registers a standalone platform device named "twl", but keeps its pointer only in a local variable. Probe errors unregister the device, while successful probe leaves no way for twl_remove() to release it. The platform device therefore remains registered after the I2C driver unbinds. Register a managed action on the I2C device immediately after adding the platform device. This unregisters it on probe failure and driver unbind, and also handles failure to register the action itself. Remove the manual error-path unregister to avoid releasing the device twice. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: defa6be ("mfd: Fix compile for twl-core.c by removing cpu_is_omap usage") Cc: stable@vger.kernel.org Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260913205013.54777-1-mhun512@gmail.com Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit c437a83 ] A temporary refcount management of a struct device can be done gracefully with __clean(put_device) for avoiding potential leaks. No functional change but just a code cleanup. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260803140100.919071-3-tiwai@suse.de Stable-dep-of: 8d70e36 ("ALSA: hda: cs35l41: Fix ACPI device reference leak on probe failure") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 8d70e36 ] cs35l41_hda_probe() takes an acpi_device through cs35l41_hda_read_acpi() and stores it in cs35l41->dacpi. Only the failures that happen later reach the err: label, which is where that reference and cs35l41->acpi_subsystem_id are released, so the early return taken when cs35l41_hda_read_acpi() fails leaves both behind. Keep the ownership in the caller instead of dropping the reference inside cs35l41_hda_read_acpi(). That removes the need to work out whether a given failure path has already released it, and with it the double put that cs35l41_hda_parse_acpi() would otherwise cause when it fails after having released the device itself. cs35l41_hda_parse_acpi() and the !physdev path no longer put the reference, and the early failure enters the existing err: cleanup tail through a new err_acpi label. The label sits between the reset of the codec and the gpio cleanup, so an early failure also releases the reset and chip-select descriptors that cs35l41_hda_parse_acpi() may already have taken, while still skipping cs35l41_safe_reset() on a codec that was never brought up. cs35l41->dacpi comes from devm_kzalloc() and is only assigned once the ACPI device has been found, so the put is a no-op when the lookup itself failed. Found by code review. Fixes: 447106e ("ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA") Cc: stable@vger.kernel.org Signed-off-by: Ma Ke <make_ruc2021@163.com> Link: https://patch.msgid.link/20261012084152.3740340-1-make_ruc2021@163.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit b9428ed ] Concurrent evaluations of ASUS WMI management methods (from ACPI notify, HID, userspace daemons, and debugfs) enter the BIOS ACPI/SMM interface simultaneously, triggering re-entrant SMIs or EC mailbox buffer corruption. Fix this at the root by introducing a centralized evaluation helper (asus_wmi_evaluate_method_locked()) protected by a global mutex (asus_wmi_eval_lock) using guard(mutex). Route all evaluations of ASUS_WMI_MGMT_GUID (method3, method5, method_buf, and show_call) through this helper. A static mutex is required because asus_wmi_evaluate_method() is an exported symbol used by external modules (such as hid-asus and asus-armoury) that lack access to struct asus_wmi drvdata, and the underlying ASUS ACPI/EC management method is a single physical platform resource. The mutex is non-recursive: nested ACPI/WMI notify handlers must not call back into evaluate on the same task (defer via workqueue, as asus_rfkill_notify already does). The sysfs-versus-notify race predates the later export of asus_wmi_evaluate_method(), so Fixes points at the original shared evaluate helper rather than that export. Link: OpenGamingCollective/asusctl#328 Fixes: d33da3b ("asus-wmi: factorise wmi_evaluate_method call") Cc: stable@vger.kernel.org Signed-off-by: Marco Scardovi <scardracs@disroot.org> Reviewed-by: Denis Benato <denis.benato@linux.dev> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/b6a1981777e63f0c28bd719d8203ebbda57d6957.1789722252.git.scardracs@disroot.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [ sashal: Adjusted include-block context because the bits.h header was absent. ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 21d3b33 ] NV request generation to switch from L2 to L1 on interrupt is buried into the vgic flush code, while we should be able to deliver requests as early as possible. Similarly, MI generation happens *after* the need for a request has been evaluated, which means we potentially delay the maintenance interrupt by a full exit/entry cycle. Move these two things to happen much earlier in the entry code, and make sure the MI generation and PMU interrupt serve as input to the request switching back from L2 to L1. Cc: stable@vger.kernel.org Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Tested-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20261015100539.1011760-2-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> [ sashal: retained the maintenance-interrupt recalculation guard to accommodate delayed nested VGIC register synchronization ] Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a2a4f69 ] Use the clk_bulk API to avoid code duplication for each of the three clocks. Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Stable-dep-of: a875c43 ("media: rockchip: rga: quiesce IRQ before releasing m2m state") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit a875c43 ] rga_remove() releases the m2m state before the IRQ is freed. The IRQ is devm-managed and is only released once rga_remove() returns, so rga_isr() can still run while the m2m device state is being torn down. Store the IRQ number in struct rockchip_rga, unregister the video device first, and free the IRQ before releasing the m2m state so the handler cannot run against the freed state. Fixes: f7e7b48 ("[media] rockchip/rga: v4l2 m2m support") Cc: stable@vger.kernel.org Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 4511fd8 ] Replace the open-coded implementation in ocfs2 (which loses the top 32 bits on 32-bit architectures) with a helper in pagemap.h. Fixes: 35edec1 (ocfs2: update truncate handling of partial clusters) Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20251024170822.1427218-2-willy@infradead.org Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: ocfs2-devel@lists.linux.dev Signed-off-by: Christian Brauner <brauner@kernel.org> Stable-dep-of: 3297502 ("xfarray: don't crash when sorting if array element crosses a folio") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit ac0a111 ] This is one instruction more efficient than open-coding folio_pos() + folio_size(). It's the equivalent of (x + y) << z rather than x << z + y << z. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20251024170822.1427218-10-willy@infradead.org Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Carlos Maiolino <cem@kernel.org> Cc: linux-xfs@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> Stable-dep-of: 3297502 ("xfarray: don't crash when sorting if array element crosses a folio") Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 3297502 ] LOLLM points out that if an array element crosses a folio boundary, xfile_get_folio returns a NULL folio pointer. If this happens, si->folio is also set to NULL, and calling folio_pos/folio_address will just crash the kernel. Teach this function to handle this condition by falling back to reading the array element into scratchpad memory. Cc: stable@vger.kernel.org # v6.6 Fixes: cf36f4f ("xfs: cache pages used for xfarray quicksort convergence") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
xen_init_time_common() points x86_platform.calibrate_tsc at xen_tsc_khz() but leaves calibrate_cpu native, so tsc_early_init() -> determine_cpu_tsc_frequencies() still calls native_calibrate_cpu_early() for cpu_khz. That tries CPUID 0x16, then MSR_PLATFORM_INFO, and then falls through to quick_pit_calibrate() -- which on a PVH guest waits out its full 50ms timeout on a PIT that is not there, prints "Fast TSC calibration failed", and arrives at a value the hypervisor had already been asked for a moment later. It is 48ms of every boot, and it is the largest single item in one: a 512 MiB PVH guest reached "Run /init as init process" at 0.330s, and 0.118s once this and the xenbus boot wait were out of the way. There is nothing for the calibration to find out here. Xen reports the TSC frequency, tsc_khz already comes from it, and cpu_khz differing from tsc_khz under a hypervisor is not information -- determine_cpu_tsc_frequencies() would overwrite cpu_khz with tsc_khz anyway once they disagree by more than 10%. Note that tsc_early_khz= does not help: it only short-circuits calibrate_tsc, and the 50ms is spent in calibrate_cpu. Set in xen_init_time_common() so PV and PVH/HVM guests both get it, which is where calibrate_tsc is already set for the same reason. Signed-off-by: Alex Zenla <alex@edera.dev>
boot_wait_for_devices() sleeps HZ/10 between checks, so on a CONFIG_HZ=100 kernel it waits a tenth of a second to notice something that has already happened. What it is waiting for is not slow: a toolstack has every backend sitting in XenbusStateInitWait before it unpauses the guest, so the wait covers the frontend half of the handshake, which finishes a few milliseconds after the late_initcall starts looking. Measured on a PVH guest, the last frontend connected at 0.232s and init started at 0.311s -- 79ms of sleeping past the event. Frontends move to XenbusStateConnected (and blkfront sets is_ready) from their otherend_changed callback, which runs from the frontend bus's backend_changed() watch. Bump a sequence count and wake a wait queue there, and have wait_for_devices() sleep on it instead of for a fixed interval. The sequence is sampled before each check, so a change that lands between the check and the sleep still wakes the waiter. The HZ/10 interruptible sleep stays as the timeout, so state changes that do not come through the watch are noticed no later than before, and the 30/270-second budgets and their reporting are unchanged. Signed-off-by: Alex Zenla <alex@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev> (cherry picked from commit 2cae639)
Signed-off-by: Alexander M. Merritt <alexander@edera.dev> (cherry picked from commit 2bf9804)
All of the extra memory Linux reserves at boot goes to the mapping pool, so dom0's balloon starts empty. Growing dom0 at runtime then means memory hotplug, which places the new range at the first free physical address: on PVH that is the host's own map, where nothing guarantees the range is not a device's MMIO window. Keep the part of the extra memory dom0 may grow into on the balloon instead. Xen's ceiling for dom0 (dom0_mem=...,max:) sizes that part, so a host booted without a max: keeps today's behaviour. Every region gives up the same fraction, which spreads the growth over the NUMA nodes on PVH and leaves each node's mapping pool its share, and the last memory section stays with the pool so that early grant mappings never fall back to holes in the physical map. Signed-off-by: Alexander M. Merritt <alexander@edera.dev> (cherry picked from commit a26875e)
A request that does not fit in its ring sleeps in io_wait_event_killable() until the backend frees space, but the event handler wakes the ring with wake_up_interruptible(), which only wakes TASK_INTERRUPTIBLE sleepers. A TASK_KILLABLE waiter therefore sleeps until it is killed, which hangs a guest that has enough large requests in flight to fill a ring. Wake the ring with wake_up() so killable waiters see the freed space. Fixes: 9523fea ("net/9p: Switch to wait_event_killable()") Signed-off-by: Alex Zenla <alex@edera.dev> (cherry picked from commit 902d221)
The frontend's resume handler only warned that suspend and resume are unsupported. After a restore its rings, grant references and event channels are gone, yet the mounted client kept writing requests into them, so every request on the mount hung. The next InitWait from the backend then allocated a second frontend instance for the same device, which no client used. On resume, collect any replies the backend left in the rings, free the rings, fail the requests that are still unanswered with -EIO, and publish Initialising so that a backend which still serves the old rings starts over. When the backend reaches InitWait, allocate and publish new rings for the existing frontend, keeping its clients. Requests that arrive while the frontend is not connected wait until it is, and a rw_semaphore keeps them off the rings while a resume replaces them. Signed-off-by: Alex Zenla <alex@edera.dev> (cherry picked from commit 9a1668b)
A forked, restored or imported domain resumes against a new backend whose fid table is empty, while the guest's 9P clients still hold the fids of the session they were suspended with. With the transport reconnected every request on those fids still fails, so even an idle mount comes back unusable. When the backend advertises feature-session-transfer, wait at suspend for the requests in flight to be answered, then ask the backend for its fid table with Tsession_save and keep the pages in guest memory, where they survive into whatever domain the guest resumes in. Once a restored frontend's new backend connects, replay the pages with Tsession_restore before any request can use the rings. The pages are opaque to the frontend; the backend validates every entry as it would a walk or open. Signed-off-by: Alex Zenla <alex@edera.dev> (cherry picked from commit e271536)
The toolstack has to know whether a guest can carry its 9P session into a new backend before it exports the domain, because a guest that cannot comes back with every open file on its mounts unusable. Until now only the backend advertised the feature, and the frontend's support was invisible from dom0. Publish feature-session-transfer = 1 in the frontend's own xenstore directory, next to version and num-rings. Signed-off-by: Alex Zenla <alex@edera.dev> (cherry picked from commit 97d826b)
arch/x86/xen/enlighten.c includes xen/interface/memory.h for XENMEM_maximum_reservation, but memory.h uses xen_ulong_t, domid_t and GUEST_HANDLE without including where they are defined, xen/interface/xen.h. Other configurations reach those through an earlier include. The zone-tiny configuration does not, and fails to build with CONFIG_WERROR=y: include/xen/interface/physdev.h:41:5: error: unknown type name 'xen_ulong_t' Include xen/interface/xen.h first, as arch/arm/xen/enlighten.c does. Signed-off-by: Alex Zenla <alex@edera.dev> (cherry picked from commit c20012b)
A node whose pool is short called fill_list() even when other nodes still held free pages. fill_list() takes new address space from iomem_resource, which on a PVH dom0 can overlap MMIO that Xen has identity mapped. A later grant map onto such a gfn makes Xen refuse the p2m change and crash dom0. Carve a new region only when every node's pool is short, and otherwise take pages from the preferred node first, then the others. Return pages to the pool of their own node when the PV p2m allocation fails. (cherry picked from commit a071d85)
…ode variant Borrowing across nodes made xen_alloc_unpopulated_pages_node() best effort, so a caller that asked for a node could get pages of another. The node variant now takes pages only from the requested node's pool and fails with -ENOMEM when it is short. It no longer carves a region. xen_alloc_unpopulated_pages() has no node requirement: it prefers the local pool, borrows from other nodes, and carves a region only when every pool is short. xenbus falls back to it when the node's pool is short, and gnttab_alloc_pages_node() uses it for NUMA_NO_NODE. (cherry picked from commit fc166a6)
Each proposed backport now asks the GitHub accounts of the mainline commits' authors to review it, falling back to the mainline pull request's author when no commit author maps to an account. Bots are left out. Reviewers are requested one at a time, so one author who cannot review here does not stop the rest; that is a warning, not a failure.
GitHub starts no workflow for a review of a pull request it cannot compute a merge ref for, and a rebase often conflicts with the tree it replaces: approving edera/mainline's #48 started nothing, and it had to be landed by hand. The land workflow can now also be run with a pull request number. It then reads the head, branch and base from the pull request, requires the same rebase/edera-6.18-lts/... branch into edera/6.18-lts, and lands on the most recent approval of the current head from a reviewer whose latest review is still an approval. Everything after that, the write-access check, the tip check, the backup and the leased push, is unchanged.
The swap-over to the automated rebase dropped two boot performance commits from edera/6.18-lts that edera/mainline still had (the early CPU frequency from the hypervisor, and waking the boot device wait when a backend changes state), and nothing noticed until they were ported by hand. The per-pull-request backport cannot catch that: it only looks at the pull request that just merged. Add an audit mode to kernel-nightly.yml (audit=true runs lts-audit.yml) that lists every Edera commit on edera/mainline the LTS tree lacks, with pending-backports.sh and the backports' own skip list, and keeps one issue open about them. Open backport pull requests and waiting or stuck backports are matched to each commit by subject. Claude then triages the rest read-only, following .automation/skills/lts-audit/, saying which are really missing and which were ported in another form, are upstream already or do not apply to 6.18. Its notes only annotate the issue: the list itself comes from git. The issue is edited in place each run, gets a comment when the set of missing commits changes, and is closed once nothing is missing.
Linux 6.18.58 passes the device's old domain to the attach_dev callback as a third argument. xen-iommu still had the two-argument form, so x86_64 builds with CONFIG_XEN_IOMMU fail with -Werror=incompatible-pointer-types since the rebase onto 6.18.58. The driver does not need the old domain. This matches xen-iommu.c on edera/mainline, whose upstream base already had the three-argument form. Signed-off-by: Grayson Guarino <graysonguarino@gmail.com>
The acceptance build judged x86_64 against defconfig with the Edera options forced on, which is not the kernel we ship. Merge the latest configs/x86_64/host.config from edera-dev/linux-kernel-oci over defconfig first, the way linux-kernel-oci itself applies it (the file is a fragment against x86_64_defconfig and omits SMP, NET and the rest of what matches it), and log the commit it came from. The Edera options are still forced on as built-ins afterwards: the host config builds OpenPaX out and 9P/Xen, virtio-gpu and the Hyper-V network drivers as modules, which a vmlinux build would never compile. AGP joins that list on x86_64 because host.config has it as a module, which caps DRM at m. arm64 is unchanged.
A rebase whose independent build failed went straight to a pull request, and in practice that was a run Claude never finished: the Bash tool's two-minute default timeout cannot hold a kernel build, so the build went to the background and the session ended "waiting for the x86 build" (#47, and #35 before it). Nobody saw the error until a reviewer did. Give the rebase step a 90-minute Bash timeout, and tell the skill to run builds in the foreground and to keep fixing and rebuilding until both pass rather than treat a failing build as an outcome to report. If the independent build still fails, a new read-only fix job hands Claude its branch and the build logs for one repair round, following a new "Repairing a failed build" section of the skill. A repaired branch is verified and built again from scratch before publish judges it; the checker now runs on whichever branch is final. Publish takes the repaired branch and report when there is one, says so in the pull request, and keeps the repair round's report when it repaired nothing. The build job moves to a reusable rebase-build.yml so the first build and the rebuild are the same job, and it now keeps each build's log as an artifact for the repair round to read. A repair changes downstream commits, so a repaired branch still shows drift and still goes to review rather than being pushed: what changes is that the reviewer gets a branch that builds.
Consolidate existing duplicated code. No functional change. Signed-off-by: Alexander M. Merritt <alexander@edera.dev> (cherry picked from commit bfc026e)
The boot-time unbacked address space reaches the unpopulated allocator (page_list) one 4 KiB page at a time, with a lock round trip and a list push for each page. On a large dom0 that is millions of round trips at boot. page_list also is unaware of page contiguity, limiting dom0 balloon growth to 4 KiB updates. Hand each extra memory region over whole, and keep its aligned 2 MiB blocks on a list per node, linked through the first page of each block as page_list links pages. The pages around the blocks, and a block that a node boundary cuts, go on page_list. Grants and foreign mappings still take pages from page_list only. When page_list of a node is empty, one block moves onto it, so taking a page stays a list pop. Pages given back go on page_list and do not form a block again. (cherry picked from commit 2304133)
With no pages parked on the balloon, dom0 grows by hotplugging a memory section at the first free physical address. That address space can belong to a PCI device that has not claimed it yet, and Xen does not stop dom0 from growing when dom0_mem sets no max:. dom0's balloon needs room to grow into, and grows faster when Xen populates a whole 2 MiB extent at a time. The unpopulated allocator keeps that room, the boot-time unbacked address space. Grant and foreign mappings and the balloon have to share it. Feed the dom0 balloon from the allocator's 2 MiB blocks when it is instructed to grow. (cherry picked from commit 4870058)
Add `info/room_kb` to the sysfs of the xen balloon driver, so user tools can discover the amount of memory dom0 can grow by. Reported are only complete 2MiB blocks in the unpopulated allocator. (cherry picked from commit f3450aa)
The data pages of a ring are granted as the first page's frame plus the page index. That holds for auto-translated guests, whose grant frames are pseudo-physical. A PV guest grants machine frames, and alloc_pages_exact() only promises pseudo-physical contiguity. When the pages are not machine-contiguous the backend maps the frames that follow the first one. Some of those are other pages of the guest, so requests read as garbage, and some cannot be granted at all, so the mapping fails. A freshly built PV guest is usually machine-contiguous within a 2 MiB block, which hid this. A PV guest restored from a snapshot gets its frames one page at a time, so its first request on ring 0 after the restore arrives as a malformed frame and the mount hangs. Look up the frame of each page instead. Signed-off-by: Kavi Daula <kavi@edera.dev> (cherry picked from commit 8115eea)
…per-V The Hyper-V-on-Xen series translates GPADLs, SynIC pages, hypercall arguments and netvsc buffers to the machine (L1-physical) frames the L0 host expects, but hv_balloon was never taught about nested mode. It hands L0 page_to_pfn() ranges straight from dom0's pseudo-physical address space, in balloon responses, free-page reports and hot-add requests, and L0 reads each of those numbers as a Xen machine frame. On a PV dom0 nested on Hyper-V the device autoloads from the VMBus offer, Xen proxies POST_MESSAGE and SIGNAL_EVENT, and the dynamic memory protocol runs end to end. A DM_BALLOON_REQUEST from the host then has L0 reclaim whichever machine frames dom0's PFNs happen to name: Xen's own memory, another domain's, or unrelated dom0 memory, with no error anywhere. A hot-add does the reverse and calls add_memory() on a host range that dom0's physmap does not back, so dom0 oopses on first touch. Translating the ranges would not make this correct either. A PV dom0 does not own the machine memory it runs on, Xen does, and the memory an L1 VM returns to or takes from L0 has to be accounted for in Xen's heap, not handed over behind its back by one of its domains. Dynamic memory for the L1 VM is a job for Xen itself. Refuse the probe when nested on Xen, so the offer stays unbound and dom0 does not speak the protocol at all. Nothing changes when not nested: hyperv_nested_on_xen is a build-time false without CONFIG_XEN_PV. Signed-off-by: Ariadne Conill <ariadne@ariadne.space> (cherry picked from commit 98e8637)
…t be bound hyperv_xen_vpci_root_domain() frees the named fwnode when creating the irq domain fails, but not when cpuhp_setup_state() fails afterwards: irq_domain_remove() does not free the fwnode its domain was created with, so that path leaked it. Free it there too. Signed-off-by: Ariadne Conill <ariadne@ariadne.space> (cherry picked from commit 7ef9c69)
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly rebase of
edera/6.18-lts(c20f0c9b497c) ontolinux-6.18.y(fd7cfd39c885), driven by Claude. Not pushed automatically because the checker found drift. Run log.Important
Do not use the merge button: this branch replaces
edera/6.18-ltsrather than merging into it. Approve the pull request to land it; the land workflow force-pushesedera/6.18-ltsto the approved head, pinned toc20f0c9b497c, and keeps a backup.Independent checks
Builds: success (x86_64 vmlinux on the Edera host config and arm64 vmlinux, both with the Edera features built in; per-build results in the run).
c20f0c9b497c3998f6a06cd8f45ed76d6791fd7cfd39c885Commits whose hunk context moved (own +/- lines identical)
9727b6e00052 xen-blkfront: place per-ring buffers on per-hctx nodes→2fbabc01aaa261aab70b3582 9p/xen: carry the 9P session across a restore→7c1fd2e1b36fCommits lost, added, or whose own +/- lines changed
492d0ef30003 xen-blkfront: Fix IO race during unplug (#89)(none)Drift (changed lines: upstream delta vs. actual change)
Claude's report
Summary
Rebased
edera/6.18-lts(c20f0c9b497c) from upstream basef45ed76d6791(v6.18-18321-gf45ed76d6791) ontofd7cfd39c885(v6.18-20892-gfd7cfd39c885, linux-6.18.y). That is 2571 new upstream commits. All 109 downstream commits were replayed. 108 remain onrebase-result(new tip3998f6a06cd8), and 1 was dropped because its change is already upstream. I resolved 2 conflicts by hand, both in places where a stable fix changed code a downstream commit also edits. x86_64 and arm64 both build.verify-upstream-rebase.shpasses the base and linearity checks. It flags the dropped commit and drift indrivers/block/xen-blkfront.c. Both are expected and explained below, so I expect the checker to report them, not pass clean.Needs a decision
None.
Conflicts resolved
xen-blkfront: place per-ring buffers on per-hctx nodes(9727b6e00052→2fbabc01aaa2),drivers/block/xen-blkfront.c. It collided with upstreame64707d07fcd xen-blkfront: unbind irq before tearing down ring and shadow requests. The upstream fix movesunbind_from_irqhandler()from the end ofblkif_free_ring()to the start, so the IRQ is gone before the shadow and ring structures are freed. The downstream commit had addedirq_update_affinity_hint(rinfo->irq, NULL)just before that unbind at the end of the function, becausefree_irq()warns if the hint is still set. I kept the upstream ordering: the unbind block stays at the start of the function and nothing is unbound at the end. I put the downstream hint-clear (and its comment) inside the upstream block, right beforeunbind_from_irqhandler(). The fix's ordering is unchanged, and the downstream commit still does what it did before. This is the drift the checker reports inblkif_free_ring().9p/xen: carry the 9P session across a restore(61aab70b3582→7c1fd2e1b36f),net/9p/trans_xen.c. It collided with upstream0ca38f8aeca4 9p/xen: validate the response size from the backend. Both insert a block inp9_xen_response()right after the header is read. I kept both and put the upstream check (h.size < sizeof(h) || h.size > queued→ warn andbreak) first, followed by the downstream ring-0P9_NOTAGcontrol-reply branch. The control branch also copiesh.sizebytes and advancesconsbyh.size, so it needs the same validation. Putting the check after it would leave that branch open to the zero-size/oversize response the CVE-class fix closes. If the check rejects a control reply,ctl_pendingstays set, andxen_9pfs_front_ctl()times out afterXEN_9PFS_CTL_TIMEOUTand flushes the worker. That is the existing downstream error path. Neither side's lines changed, so the checker reports this commit only as moved context.Dropped downstream commits
492d0ef30003 xen-blkfront: Fix IO race during unplug (#89): git dropped it as already upstream, as24f7f97d3051 xen-blkfront: Fix IO race during unplug(upstream61b6d1df1d62). The finalblkfront_closing/unplug code is identical to the old tip.Build fixes
None.
Upstream commits that meet the series
24f7f97d3051 xen-blkfront: Fix IO race during unplug: identical to the dropped downstream commit. Present in the final tree.e64707d07fcd xen-blkfront: unbind irq before tearing down ring and shadow requests: conflict (see above). In the final tree the unbind (with the downstream hint-clear before it) is the first thingblkif_free_ring()does, ahead of all grant, shadow and ring teardown. The fix holds.c49934da934c xen-blkback: Avoid UAF when reading I/O statistics(XSA-528 / CVE-2026-100082): merged cleanly.rings_lockguards publishing and unpublishingblkif->rings/nr_ringsinxen_blkif_alloc_rings()/xen_blkif_disconnect(), and the sysfs stats macro takes the read lock. Downstreambd50b617eb27only addsring->host_node(initialised in the per-ring loop after publication, like the upstream fields) and NUMA placement. It adds no new reader ofblkif->ringsoutside xenbus paths. The fix holds.34f0f63dc6dc xen-netback: defer xenvif_mcast_addr_list_free()(XSA-527 / CVE-2026-100081): merged cleanly.xenvif_disconnect_data()no longer frees the list. It is freed only inbackend_disconnect()aftersynchronize_net(), and no downstream code calls it anywhere else (grep). The fix holds.01ed474a5287 xen/pcifront: check that an AER callback exists before calling it: merged cleanly. Downstreamadb288161b11only addspcifront_machine_sbdf(). The NULL checks are intact.a0e83ac1d99e xen/gntdev: prevent private mappings from becoming writable: merged cleanly.VM_MAYWRITEis cleared for private mappings ingntdev_mmap(). Downstreamf673bdd7025d(NUMA placeholder pages) does not touch the mmap flags or setVM_MAYWRITEagain. The fix holds.0ca38f8aeca4 9p/xen: validate the response size from the backend: conflict (see above). The check runs before every consumer ofh.sizeinp9_xen_response(), including the downstream control-reply path. That function is the only reader of responses from the ring.1767c02fb555 9p/xen: fix refcount leak in p9_xen_response() on wrong tag: merged cleanly.p9_req_put()on a wrong tag is present.daafe568c006 9p: fix caches_show() out-of-bounds write: merged cleanly. The downstreamfeatures_show()infs/9p/v9fs.calready usessysfs_emit(), so the bug pattern does not apply to it.0ec1d83baa7b iommu/dma: Catch scatterlist length overflows: merged cleanly. The downstream PV-IOMMU (drivers/iommu/xen-iommu.c) has nomap_sgof its own and maps throughiommu_dma_map_sg(), so the fix covers it. Downstreame92f96b542caonly changes PCI window reservation.046f0b83f18c iommu/amd: Force device table to maximum sizeandde5b233cfc33 x86/bugs: Mitigate TSA on AMD Zen5: merged cleanly inarch/x86/kernel/cpu/amd.c. Downstream00f992ab2aebonly adds the Xen PV domU bail-out inprint_s5_reset_status_mmio(), which is unrelated.41f968434a72 x86/ioperm: Prevent NULL dereference on theoretical missing IO bitmap: merged cleanly. The addedreturnis present. Downstream9c0771e7fb9atouches onlyarch_randomize_brk().337783277c0b init/bootconfig: pass init arguments in documented order: merged cleanly. Downstreampax_softmode=handling ininit/main.cis separate.4805046a03e6 mm/vma: avoid broken uffd merge on mremap: merged cleanly intools/testing/vma/vma_internal.h(test harness only). The downstreamexec: randomize argument block locationstub is intact.0a382008c4e1 nvme-tcp: validate the TLS handshake timeout,0dff1bf5d8ec nvmet-tcp: validate the TLS handshake timeout,9705edded97b Documentation/kernel-parameters: Move the kernel build options: documentation only, merged cleanly next to the downstreampax_softmode=entry.Builds
olddefconfigwarnings for=mvalues in the host config (ACPI_HED, FB_BACKLIGHT, CRYPTO_LIB_*), and the script exited normally.