From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387450; b=GnByzXI0UI7bGe8fXokYkukINPPHTbKcN9l0O0A8wnRhjncbgRl1QItpk07jOYQgyFxT QuErLGkZPs6XErGX/MRxk5cgOC69h9CibIwLZVB1UelSBbq07bI7atNYlHpqBa01TWgkl W6ftvxtm0SKLOosp4+gil2f5nsgNKrsLoBXYSAvm/Q9EGGCs9bp0Xg2WHE7LfM9OrWRvT dg7fbWgLOLFNTRB5Y6m4sjK389AJulccnWAGmY3Gai77soF14llagI5xXc6MySgZbPHAe 6zSCTk7e8ZAXnlbbXRae3t4mteDfCH0o6mG5ojuCHyA69X3fQryR9XbQgx+imoLEQsA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387450; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=5Tlq4gQKE0lp+swCQdLm5HRan3ZfwL/RMxzQsZ7FFlY=; b=FGp7JZ36fml+kuZ0evCV2ZNl24N8uNWVU89z6d8sGxOfOk628+h1cIwBmlqTqQne6QUi 9vQXbFiYVSM0LeTX5M49V8aV9H6Zia6lRqvDcSDb3um8bzEkKWrLbRepwjV9D6reSwjFx Qdk9fXKv0StAzuSxtjPJnJ8RsD3yRe3HNMH+HRsa5C348v0LruhwtsdrIhIFkcO5FEX8w g7S2QTuMsqALZLSXp6aG13V+TK+LvNzDga8tOR1COGamCEs6onr5FtsfuZlqn6M/qQ3po JpGcAmRSfdrGPtG2LhbivFl285UR+1Q0skxUCYOk+ijISO9aHEJuMeU9C2e1sG/BEAQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jFkIYgfo; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B248606A322; Fri, 4 Dec 2026 12:30:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jFkIYgfo Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88A421F000CE; Fri, 4 Dec 2026 12:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796387449; bh=5Tlq4gQKE0lp+swCQdLm5HRan3ZfwL/RMxzQsZ7FFlY=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=jFkIYgfomqg/OV9HXntXxpgOxC3RtoTs72pA5iv6o309/H5ke4vAWyezsSV1W8w87 1aE4rRaitbs3wJSoEP0bPHDS0aYbgVk3Jph/KPJnuqsnSs5BBR3v0bo9cDY0+HoOZv BcO4X8QLkkcbu9q6Eeq61zuFk9O4GVYrQmN5ehfjcKXOrJ0bncIuUSDsQPFlZq6PRb mawuc3nsKL9T7uGfeEQnnmTwTW4lM8OCJZKlsKICvBQhEytxO4Rri6rtuKMCSMukv2 moXrnJh90TlHdgfdJH6vU+EdSbgZ+Nci7bDpLr7Fxsu8v57QAaMCTEV6LyqJjEJFnH Gg5a1B8ynEwng== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 02/10] s390/sae: Add sae_entry and sae_exit symbols Reply-To: sashiko-reviews@lists.linux.dev To: "Andreas Grapentin" Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-perf-users@vger.kernel.org, "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Christian Borntraeger" In-Reply-To: <20261204-host-irq-v1-2-a8387ee8a380@linux.ibm.com> References: <20261204-host-irq-v1-0-a8387ee8a380@linux.ibm.com> <20261204-host-irq-v1-2-a8387ee8a380@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 12:30:49 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] KVM: s390: instrumentable virt_to_phys() in noinstr arm_vcpu_enter_exit() -- commit 155c5874ac9bbb93ac7fc196ae66f83afc0d9d94 Author: Steffen Eiden s390/sae: Add sae_entry and sae_exit symbols This commit adds sae_entry and sae_exit boundary labels around the SAE instruction in entry.S, exports sae_exit, and moves the sie_exit declaration alongside sae_exit in asm/kvm_host.h. > diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S > index 14dea207b30e8..8ef6fc13fc08c 100644 > --- a/arch/s390/kernel/entry.S > +++ b/arch/s390/kernel/entry.S > @@ -258,10 +258,12 @@ SYM_FUNC_START(sae) > stg %r3,__SF_SAE_BLOCK(%r15) # save sae block for perf > stg %r4,__SF_SAE_VCPU(%r15) # save vcpu ptr for interrupt handling > stosm __SF_SAE_IRQ(%r15),0x03 > +SYM_INNER_LABEL(sae_entry, SYM_L_LOCAL) > .insn rre,0xb9a50000,%r2,0 # Start Arm Execution [Severity: Low] Can calling virt_to_phys(sae_block) inside noinstr arm_vcpu_enter_exit() violate the non-instrumentable guest-entry window under CONFIG_DEBUG_VIRTUA= L? In commit "s390/sae: Prepare handling host interrupts during SAE execution", virt_to_phys(sae_block) was moved into arm_vcpu_enter_exit() between guest_state_enter_irqoff() and sae(): arch/s390/kvm/arm64/arm.c:arm_vcpu_enter_exit() { guest_timing_enter_irqoff(); guest_state_enter_irqoff(); sae(virt_to_phys(sae_block), sae_block, vcpu); guest_state_exit_irqoff(); guest_timing_exit_irqoff(); } With CONFIG_DEBUG_VIRTUAL=3Dy, virt_to_phys() expands through __pa() to the out-of-line __phys_addr() and is_vmalloc_or_module_addr(), neither of which is marked noinstr, notrace, or NOKPROBE_SYMBOL. If a kprobe fires on __phys_addr() here while hardware IRQs are still disabled, __do_pgm_check() -> irqentry_enter_from_kernel_mode() calls lockdep_hardirqs_off(), and irqentry_exit_to_kernel_mode_after_preempt() skips lockdep_hardirqs_on() because regs_irqs_disabled(regs) is true. That leaves lockdep hardirq state disabled when sae() enables hardware IRQs via stosm, leading to lockdep hardirq-state desynchronization and splats. Computing virt_to_phys(sae_block) before guest_timing_enter_irqoff() or in kvm_arch_vcpu_ioctl_run() avoids calling instrumentable code in this window. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-host-irq-v= 1-0-a8387ee8a380@linux.ibm.com?part=3D2