From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BEF6F233710; Mon, 10 Mar 2025 18:14:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741630461; cv=none; b=R2D2MzQ1qkNS+F27wN+9yIgdyn+kMBgmMjpRFYwS7SQ8Gv/ZjCrchfHZ4GDjOic2UwUzkOwFnp0pR3O1vdOR+WTRAk/qFBTlplU1xSywYIP3ieIY+qnjBk17vNKQcWV+86oPA6kjzTSdRg2vHDtyXPO3Htpz03IizTWpOdm6zxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741630461; c=relaxed/simple; bh=nIQ3/c99Og5WOn6AEqIbrnXiHWF378hCDooQKOhiPtM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P0ITSv+mQxHflRgDoFSPzesZKQxkhCF2pRo2G8rtOhlwAlW9/PmfDxlZ9HNsohl7eFvafMUSFqGtOgRr3LJIzZpX5U7bpOmLGzpUywZT8KpEbzB9xkQPzRTWwHCEkOH1F9NlXAx4Nhby/tk0QOo8CCB8r6+Xaq/fw+I+juPF7gM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ff3E0Ybw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ff3E0Ybw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B9B3C4CEE5; Mon, 10 Mar 2025 18:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741630461; bh=nIQ3/c99Og5WOn6AEqIbrnXiHWF378hCDooQKOhiPtM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ff3E0YbwCmRm8tsg+ljt5dViK1XNUwJjKVT9z20NHrZNWgLLwuXfkgDO+FnYjkgwg kesbFkwjrLDAlksrQ0XFcvD284Sttu8WbmtlgZ7ARwp9gLHXxTV5Ov5SG0oxPa/icU L1MPjGVX7A+N4nyibRWuY1KXvpcW3avOLUtRIJrY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Zenla , Peter Zijlstra , Andrew Cooper , "Borislav Petkov (AMD)" , Juergen Gross Subject: [PATCH 5.15 414/620] x86/static-call: Remove early_boot_irqs_disabled check to fix Xen PVH dom0 Date: Mon, 10 Mar 2025 18:04:20 +0100 Message-ID: <20250310170601.930949866@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250310170545.553361750@linuxfoundation.org> References: <20250310170545.553361750@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrew Cooper commit 5cc2db37124bb33914996d6fdbb2ddb3811f2945 upstream. __static_call_update_early() has a check for early_boot_irqs_disabled, but is used before early_boot_irqs_disabled is set up in start_kernel(). Xen PV has always special cased early_boot_irqs_disabled, but Xen PVH does not and falls over the BUG when booting as dom0. It is very suspect that early_boot_irqs_disabled starts as 0, becomes 1 for a time, then becomes 0 again, but as this needs backporting to fix a breakage in a security fix, dropping the BUG_ON() is the far safer option. Fixes: 0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219620 Reported-by: Alex Zenla Suggested-by: Peter Zijlstra Signed-off-by: Andrew Cooper Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Tested-by: Alex Zenla Link: https://lore.kernel.org/r/20241221211046.6475-1-andrew.cooper3@citrix.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/static_call.c | 1 - 1 file changed, 1 deletion(-) --- a/arch/x86/kernel/static_call.c +++ b/arch/x86/kernel/static_call.c @@ -169,7 +169,6 @@ EXPORT_SYMBOL_GPL(arch_static_call_trans noinstr void __static_call_update_early(void *tramp, void *func) { BUG_ON(system_state != SYSTEM_BOOTING); - BUG_ON(!early_boot_irqs_disabled); BUG_ON(static_call_initialized); __text_gen_insn(tramp, JMP32_INSN_OPCODE, tramp, func, JMP32_INSN_SIZE); sync_core();