From nobody Sat Feb 7 18:20:51 2026 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6AFA42AA9 for ; Sat, 21 Dec 2024 21:10:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734815453; cv=none; b=ovk65C5H1Duc+pT/C75fCV7SWGj648jyZbGApCzse22hnsZ546v4mzy1mItRcc/Uj06dCBbeKNi4bEyuYXg8mpJZoCtmnxD1z+LHrIAN/lmWO9MTUuaPUkWFPLlsfejQMjVlJLU5aoAvWLrR1qFSrN01XwbSDgsHBi33gxEWHf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734815453; c=relaxed/simple; bh=WVgorVn9o0xL6VFFcxtFLM6d9n2Fuym6ovGNRgTyrko=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=EwG7QiX92V6Ps2RADvxuRYEDYJuUSFjWGdrRXangw7bbl5oZOuO/MW/fOMsi4xnR/DZNWL3DedwvYhnNfZsD4DJkGseo9TCPuwci1/5wcjWAXbhsPH0MXwqOWn3DXbveAqpkobQK9Sf44+vrLO/zA9A8eQEf5qNuOlhHp7z8O68= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com; spf=pass smtp.mailfrom=cloud.com; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b=G8OW2WrE; arc=none smtp.client-ip=209.85.221.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="G8OW2WrE" Received: by mail-wr1-f67.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so1713727f8f.2 for ; Sat, 21 Dec 2024 13:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1734815449; x=1735420249; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7+Bi7/H7rfA4LJMN/nL+X/MkyLAVf4j+5p64xGPoeQU=; b=G8OW2WrEr52RTo1xCrM2tt2AGx32Iz4pGqqk/ELWuG4nTHPnW5IvYHUDlbnrLvb3Y4 xfmJ8SiXV4LTqhuXVP6sQEXGGq51wxY6jwz1/dp1YW7JzVm/cWu8c9NLIR+uAqra8mwL LLHZoD2q9esKl4z3VOwi1eo7UQlnOIllo9ItU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734815449; x=1735420249; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7+Bi7/H7rfA4LJMN/nL+X/MkyLAVf4j+5p64xGPoeQU=; b=nw6COiu/rst5B4POY5SmCNuZQnMFoYkswz/q/uPuPr95FgIoEZpN6n46C/amQMETfe /7dx2rkizt0RoXbNw0PThEL+zP/1NJn37ctyE1s15fYftPmc6waGeFpAJkpcVjM9E/8z 3ytb/QeXpVMdKf/ETscn8aiMC1n+GopmNElcF5ZopaGNPsVV5R+m0RZpjSTsqBWo8kZY Gq5Ml5C2SrkvJcFgLgr0wUFxQTzGw9Gx382akph4GWvmzXsCVwsk5gShWCCLlBLVdNYQ UYqmscdc/XeI6Y/HrSHiA2RMN3ky+H3OsmoxOxB1vo3HmDHXwqJX2BOg8zs3O4zm/zP7 edxQ== X-Gm-Message-State: AOJu0YyClRDU5SOKjL2Z0/F8V/uHHMIiGZG4vK9t6fHOd2fEkBBTxQZA KKfykbBHzmEYACHhdp1cQYIbCVEanDbrVzNxDOKVc4KbAtI+OfU2RmcqHz3TPba0djuJ7Ut0Yvf ao5uMPg== X-Gm-Gg: ASbGnctybfEOfgy0EPwuJW6/9qw8mryjRlqb/xqSgDJXAsn3I16tXj/w8zH1HK9KHmn 8Q2FaLbZ169d0FMIg0v67B3Q66ELyQzX4hKFlOJi2UOY6ji68qfGHpMu7PPQ1Cdv8nyJbeSm5q0 2kfJIItMbgHLnt8UuqQXJHiS8HQ2IYZoYP6MpWhH2obzvybiInLfChH9daEGCzh6cNXV62SFyWi A1J9cewIdpmghAMOUpm8gOnNEOE4lyL9uCzh6JRWprXUW9jV4kD2bTjl4dB+Fl3rJhOeGDvrB76 cgna3OFyLwm85wi/65cY9cbzeegXM4k+WTCj X-Google-Smtp-Source: AGHT+IHuQvJUG+eaJZd1g14N/MFB8vtAZynZkB2PuQFsVww5jbT2kBnl+6QAFRBNs0Z2iAiXlRnWCA== X-Received: by 2002:a5d:584b:0:b0:386:373f:47c4 with SMTP id ffacd0b85a97d-38a224053d8mr6755876f8f.49.1734815449217; Sat, 21 Dec 2024 13:10:49 -0800 (PST) Received: from andrewcoop.eng.citrite.net (host-92-26-98-202.as13285.net. [92.26.98.202]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8a8d7esm7336597f8f.101.2024.12.21.13.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 13:10:48 -0800 (PST) From: Andrew Cooper To: LKML Cc: Andrew Cooper , Alex Zenla , Peter Zijlstra , Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Juergen Gross , stable@kernel.org Subject: [PATCH] x86/static-call: Remove early_boot_irqs_disabled check to fix Xen PVH dom0 Date: Sat, 21 Dec 2024 21:10:46 +0000 Message-Id: <20241221211046.6475-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __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 stati= c-call updates") Reported-by: Alex Zenla Closes: https://bugzilla.kernel.org/show_bug.cgi?id=3D219620 Suggested-by: Peter Zijlstra Tested-by: Alex Zenla Signed-off-by: Andrew Cooper Acked-by: Peter Zijlstra (Intel) Reviewed-by: Juergen Gross --- CC: Peter Zijlstra CC: Josh Poimboeuf CC: Jason Baron CC: Steven Rostedt CC: Ard Biesheuvel CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: Dave Hansen CC: x86@kernel.org CC: "H. Peter Anvin" CC: Juergen Gross CC: linux-kernel@vger.kernel.org CC: stable@kernel.org It's not entirely clear why PVH domU is fine but PVH dom0 is not. It crash= es so early there's no console or useful backtrace. --- arch/x86/kernel/static_call.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/static_call.c b/arch/x86/kernel/static_call.c index 9eed0c144dad..9e51242ed125 100644 --- a/arch/x86/kernel/static_call.c +++ b/arch/x86/kernel/static_call.c @@ -175,7 +175,6 @@ EXPORT_SYMBOL_GPL(arch_static_call_transform); noinstr void __static_call_update_early(void *tramp, void *func) { BUG_ON(system_state !=3D 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(); base-commit: e84a3bf7f4aa669c05e3884497774148ac111468 --=20 2.39.5