From nobody Mon Jun 8 15:38:06 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43561343888; Thu, 28 May 2026 09:36:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961000; cv=none; b=JNbfVsQJBxxaXM3eh4IwWB3Mg9RTbgp8lhn2OjyABa59Qj74MpEu4Mv9j8z3ntyWXF7xlBITt+8BeLy7OCLF75gkTc+qX8gk++7dhMHGwfx7me4mzILbHeHbqmlqcqQp531QYMYNMqfc3AmK1btjYCQaoEorMok0AeBWsyeYRKM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961000; c=relaxed/simple; bh=XbOF1xORTJoS+XtbSHmifgj2/JsunyL5DSsWyU1Wg04=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=aV36h8nx+hL0e1UolaG766w3HJc2fKH3+ECWn+3dqanu6u/2LRzraKWPmJ1hdjJnYapanb/VhZG627xQ2gRVMRLsNO89pIGDTpWDhjV+oCl8Uby2+aK3Zvfp0lPDIkb2Y0nfz+k27BY2iobo9ztSaExypms0znW1nhg+ondmE2I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=u1KpB2Qz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jpCKVbcM; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="u1KpB2Qz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jpCKVbcM" Date: Thu, 28 May 2026 09:36:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779960997; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2j2iy25992fTirLDLkqYcC1UsEDgr8q5V0wNGbL7FBE=; b=u1KpB2QzLOHSugMJGCAJNsDjmQxVsUH+KL+pddD6isbGBbslYLjQUTq2VEMo4JZofsqu60 Tsc8LEt6Vh6nCUpdva8xF9Y9AgJLDwMWmZhySlQsUBmnVt7P+7ugYUs4KX3pd+4eTMUpg3 5wk+X2w8WojyHJtnlQ9xQpvQ7JWd/VVtkDDDFKXOJLrjqqRcD4vCFVca/ZWJA63lJYCNR4 pLhTLRFSCtCHn8xMcNPER9DWFQdjKkNqy12OWo2VxexDn51ziRhqjjlPioSi9FVGEm9HjY LChldHxkxLgbWqQj13gAMcFxM135JJtgCLqewqwAZk5aAyiG3yLXwJzslqUm1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779960997; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2j2iy25992fTirLDLkqYcC1UsEDgr8q5V0wNGbL7FBE=; b=jpCKVbcMRV9uzMn2d8OZIs5NHoRDIFUiXGPJbtQNHRqnvacVOfMElPnNG8OzaPPT1Qhr2K N15MEVBMPd1KNVBQ== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/kvm/vmx: Fix x86_64 CFI build Cc: Nathan Chancellor , Calvin Owens , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260526090631.GA4149641@noisy.programming.kicks-ass.net> References: <20260526090631.GA4149641@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177996099595.1039918.4986692473236183334.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 8aeb879baf12fe64889f019da9a4f8347c604e91 Gitweb: https://git.kernel.org/tip/8aeb879baf12fe64889f019da9a4f8347= c604e91 Author: Peter Zijlstra AuthorDate: Tue, 26 May 2026 11:06:31 +02:00 Committer: Peter Zijlstra CommitterDate: Thu, 28 May 2026 11:31:50 +02:00 x86/kvm/vmx: Fix x86_64 CFI build It was missed that idt_do_interrupt_irqoff() gets compiled on x84_64; this is a problem for CFI builds because it includes an unadorned indirect call. It is however completely dead code. Rework things to not emit this function at all. Fixes: 0701c9e17bd9 ("x86/kvm/vmx: Move IRQ/NMI dispatch from KVM into x86 = core") Reported-by: Nathan Chancellor Reported-by: Calvin Owens Signed-off-by: Peter Zijlstra (Intel) Tested-by: Nathan Chancellor Link: https://patch.msgid.link/20260526090631.GA4149641@noisy.programming.k= icks-ass.net --- arch/x86/entry/common.c | 2 +- arch/x86/entry/entry.S | 2 ++ arch/x86/kernel/idt.c | 12 ++---------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 06c7c6e..14cd43d 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -55,7 +55,7 @@ noinstr void x86_entry_from_kvm(unsigned int event_type, = unsigned int vector) * The FRED NMI context is significantly different and will not work * right (specifically FRED fixed the NMI recursion issue). */ - idt_entry_from_kvm(vector); + idt_do_nmi_irqoff(); } EXPORT_SYMBOL_FOR_KVM(x86_entry_from_kvm); #endif diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S index a56e043..2bc217b 100644 --- a/arch/x86/entry/entry.S +++ b/arch/x86/entry/entry.S @@ -109,11 +109,13 @@ EXPORT_SYMBOL(__ref_stack_chk_guard); RET .endm =20 +#ifndef CONFIG_X86_64 .pushsection .text, "ax" SYM_FUNC_START(idt_do_interrupt_irqoff) IDT_DO_EVENT_IRQOFF CALL_NOSPEC _ASM_ARG1 SYM_FUNC_END(idt_do_interrupt_irqoff) .popsection +#endif =20 .pushsection .noinstr.text, "ax" SYM_FUNC_START(idt_do_nmi_irqoff) diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c index 7bcf1de..90a22e2 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -268,18 +268,10 @@ void __init idt_setup_early_pf(void) } #endif =20 -#if IS_ENABLED(CONFIG_KVM_INTEL) -noinstr void idt_entry_from_kvm(unsigned int vector) +#if IS_ENABLED(CONFIG_KVM_INTEL) && !defined(CONFIG_X86_64) +void idt_entry_from_kvm(unsigned int vector) { - if (vector =3D=3D NMI_VECTOR) - return idt_do_nmi_irqoff(); - - /* - * Only the NMI path requires noinstr. - */ - instrumentation_begin(); idt_do_interrupt_irqoff(gate_offset(idt_table + vector)); - instrumentation_end(); } #endif =20