Skip to content

[rlc-9/5.14.0-687.12.1.el9_8] Multiple patches tested (2 commits)#1306

Merged
PlaidCat merged 2 commits into
rlc-9/5.14.0-687.12.1.el9_8from
{jmaple}_rlc-9/5.14.0-687.12.1.el9_8
Jun 10, 2026
Merged

[rlc-9/5.14.0-687.12.1.el9_8] Multiple patches tested (2 commits)#1306
PlaidCat merged 2 commits into
rlc-9/5.14.0-687.12.1.el9_8from
{jmaple}_rlc-9/5.14.0-687.12.1.el9_8

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

KVM: arm64: vgic-its: Drop the translation cache reference only for the erased entry

cve CVE-2026-46316
commit-author Hyunwoo Kim <imv4bel@gmail.com>
commit 13031fb6b8357fbbcded2a7f4cba73e4781ee594
KVM: arm64: Reassign nested_mmus array behind mmu_lock

cve CVE-2026-46317
commit-author Hyunwoo Kim <imv4bel@gmail.com>
commit 70543358fa08e0f7cebc3447c3b70fe97ad7aaa8
upstream-diff | Due to missing the following change set the merge
    conflict arose due to a previous drop extra parameters to
    kvrealloc().  The change set was deemed unnecessary for this fix.
    https://lore.kernel.org/all/20240722163111.4766-1-dakr@kernel.org/

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 34m 4s 35m 12s
aarch64 19m 55s 20m 40s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 206 49 rlc-9/5.14.0-687.12.1.el9_8 ⚠️ No baseline available
aarch64 152 51 rlc-9/5.14.0-687.12.1.el9_8 ⚠️ No baseline available

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1456 81 rlc-9/5.14.0-687.12.1.el9_8 ⚠️ No baseline available
aarch64 1429 82 rlc-9/5.14.0-687.12.1.el9_8 ⚠️ No baseline available

🤖 This PR was automatically generated by GitHub Actions
Run ID: 27222301021

PlaidCat added 2 commits June 9, 2026 12:57
…he erased entry

cve CVE-2026-46316
commit-author Hyunwoo Kim <imv4bel@gmail.com>
commit 13031fb

vgic_its_invalidate_cache() walks the per-ITS translation cache with
xa_for_each() and drops the cache's reference on each entry with
vgic_put_irq(). It puts the iterated pointer, though, rather than the
value returned by xa_erase().

The function is called from contexts that do not exclude one another: the
ITS command handlers hold its_lock, the GITS_CTLR write path holds
cmd_lock, and the path that clears EnableLPIs in a redistributor's
GICR_CTLR holds neither. Two or more of them can drain the same cache
concurrently, and if each one observes the same entry, erases it and then
puts it, the single reference the cache holds on that entry is dropped
more than once. The entry can then be freed while an ITE still maps it.

xa_erase() is atomic and returns the previous entry, so put only the entry
that this context actually removed. The cache reference is then dropped
exactly once per entry even when the invalidations run concurrently, and
the behavior is unchanged when only one context runs.

Fixes: 8201d10 ("KVM: arm64: vgic-its: Maintain a translation cache per ITS")
	Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
	Reviewed-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/ah2c5lu4JbUg7dj-@v4bel
	Signed-off-by: Marc Zyngier <maz@kernel.org>
	Cc: stable@vger.kernel.org
(cherry picked from commit 13031fb)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
cve CVE-2026-46317
commit-author Hyunwoo Kim <imv4bel@gmail.com>
commit 7054335
upstream-diff | Due to missing the following change set the merge
    conflict arose due to a previous drop extra parameters to
    kvrealloc().  The change set was deemed unnecessary for this fix.
    https://lore.kernel.org/all/20240722163111.4766-1-dakr@kernel.org/

kvm->arch.nested_mmus[] is walked under kvm->mmu_lock, including from the
MMU notifier path (kvm_unmap_gfn_range() -> kvm_nested_s2_unmap()), which
can run at any time. kvm_vcpu_init_nested() reallocates the array and frees
the old buffer while holding only kvm->arch.config_lock, so such a walker
can reference the freed array.

Allocate the new array outside of mmu_lock, as the allocation can sleep.
Under the lock, copy the existing entries, fix up the back pointers and
reassign the array. Free the old buffer after dropping the lock, as
kvfree() can sleep as well.

Fixes: 4f128f8 ("KVM: arm64: nv: Support multiple nested Stage-2 mmu structures")
	Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
	Reviewed-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/aiKIVVeIr1aAB1yp@v4bel
	Signed-off-by: Marc Zyngier <maz@kernel.org>
	Cc: stable@vger,kernel.org
(cherry picked from commit 7054335)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/27235660208

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit 45bf76e575e (KVM: arm64: Reassign nested_mmus array behind mmu_lock) → upstream 70543358fa08
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -61,6 +61,13 @@
 	 * again, and there is no reason to affect the whole VM for this.
 	 */
 	num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
+	tmp = kvrealloc(kvm->arch.nested_mmus,
+			size_mul(sizeof(*kvm->arch.nested_mmus), kvm->arch.nested_mmus_size),
+			size_mul(sizeof(*kvm->arch.nested_mmus), num_mmus),
+			GFP_KERNEL_ACCOUNT | __GFP_ZERO);
+	if (!tmp)
+		return -ENOMEM;
+
 	if (num_mmus > kvm->arch.nested_mmus_size) {
 		tmp = kvcalloc(num_mmus, sizeof(*tmp), GFP_KERNEL_ACCOUNT);
 		if (!tmp)

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -89,11 +89,6 @@
 	 * again, and there is no reason to affect the whole VM for this.
 	 */
 	num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
-	tmp = kvrealloc(kvm->arch.nested_mmus,
-			size_mul(sizeof(*kvm->arch.nested_mmus), num_mmus),
-			GFP_KERNEL_ACCOUNT | __GFP_ZERO);
-	if (!tmp)
-		return -ENOMEM;
 
 	swap(kvm->arch.nested_mmus, tmp);
 

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -59,7 +59,6 @@
 	 */
 	num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
 	tmp = kvrealloc(kvm->arch.nested_mmus,
-			size_mul(sizeof(*kvm->arch.nested_mmus), kvm->arch.nested_mmus_size),
 			size_mul(sizeof(*kvm->arch.nested_mmus), num_mmus),
 			GFP_KERNEL_ACCOUNT | __GFP_ZERO);
 	if (!tmp)

This is an automated interdiff check for backported commits.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/27235660208

@bmastbergen bmastbergen self-requested a review June 9, 2026 23:23

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@PlaidCat PlaidCat merged commit 754ef22 into rlc-9/5.14.0-687.12.1.el9_8 Jun 10, 2026
6 checks passed
@PlaidCat PlaidCat deleted the {jmaple}_rlc-9/5.14.0-687.12.1.el9_8 branch June 10, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

3 participants