From nobody Tue Dec 2 00:26:00 2025 Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (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 1ACFC329E72 for ; Tue, 25 Nov 2025 16:59:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764089944; cv=none; b=W6bzGTqGZvDo9it2N5aHE+GM+66w9ogfNnNdddyvZsb5DTRoAkRqNc19hmbusPsWAwHr49i/1PUAJAGyr7CrFzLhoPLBX0aa1fEHu/9b63CZWiBJAJ9z5zk61aYEwygacyhWdP1n8UxAzldLqg4YTk7LsXMi5QfoC7H/F2RWVrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764089944; c=relaxed/simple; bh=9ZUelKfkvPljv8oQXIuVk1CLomlpXexOI6vdtHAFbG0=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sdqOCJRDLGdoQ1rz6jB21sziyVTVGsGsTo3p+s/ucwplG3vg6W8S42aQV3qAjJiVBlBIsO6Scx2zBsBMDb2dQuhw9lP7sXwAAqCmWag4o4nPbC20vgjgR/O4u+0Cqkr67HS6lPzdonAFAY6rKqlYPYX7JfiZhPjp5A8I5r1jtHQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=FrlAXVcb; arc=none smtp.client-ip=209.85.128.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="FrlAXVcb" Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-789524e6719so132217b3.1 for ; Tue, 25 Nov 2025 08:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1764089942; x=1764694742; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XpaVBm1+//tbxkEQIq/GBWXpVmrV48zOyAjTKxFhzXo=; b=FrlAXVcbXKUKJcNPrA0qKapgEF9UGLCsmf2E2yXVjGe4RX/6b3gE5dunyIWrHMqCaT lWoHwF727hAakvpRD8uMfFVvi/sFXq9MgB12IxlF+ySjdjWTNS8H0dUyelhqbmVbINDe rLAMTvltT4ezjlK8okW7p/XSjCFjQlSAoxBgzJZkxBbc0eBvgBkcCvMWhtAkH3PcjGxN Yg76Z+7qEHuLH0cax9MTkIVeHQWnMTmFdG1Doriq7V3RIb9GrW+EJ5La9lh78HSankZf v1fPfW0Yd97G+LVXu3IMPshEzhl6XXKLAHQ31oU8alh9Cu8h8ys0Ln60bgicf6LOJrdh UZaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764089942; x=1764694742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XpaVBm1+//tbxkEQIq/GBWXpVmrV48zOyAjTKxFhzXo=; b=l8FK7wEZP9618WuWTCRXgV732v3z1hH15BIPrPWU4Sj0qABzX+M9dgjFmJ05Fxc41G VqqYbAP1IecJS4I+wsETF0o77N51kCv4c0JVQmmLSEcQMQ+XBLKt1+gR2WumrIb7InZX yBxWxxDTGvquxTUhUrortpTgFdS0rK1xxoKyM+TpIDlKwSg1uzhW2pcbZsDTLC35uJCw AbAJkZO1goAjYKOTMtIac9C90tiAU8prARdHbjtPnCJrYz7KESMfXAcN+hZEBsj9tLk4 vE3N4dti3qJKfzyGXy4oCVQHMdhJkLWelYcCDvT3/Ae3na+KFkiD9wbweW3Cjaj8k9fB W3QA== X-Forwarded-Encrypted: i=1; AJvYcCUv9/TaXxMgf0XM3j377DAsbsHCzeaBVaw71Q7jXBGS0/dRG++KUVlt6TZzb1LfT2axGJfxjPerk9BwYrE=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8d/z9WIaCQRNaRFX6yZNaGiIqElv3XDexXts65XgeVjwGlZjq a43H37Y4UbBV77wfmwgp6Xvtgru8UqxAwrqTzc6wnX8sgDtjYWBOc6MW/ICwVcvQl90= X-Gm-Gg: ASbGncv0wgjTj1rZap+BODOGeFTIlVle6hJZVwnkmi3yprpKHL6qeIb0LIWmCp9QxWN IUz/K7WOWyYlm8BWT/NtpiPAy9r0yLM8gtz3mDkzMKpQ0n8BGKm2WosQL6casCGqf7WwIUr16pl WyItE3/HkKP1htBKtwAloHz3fbG+NLephJZGS/4KTsNjmbmNSURMNUwUk14GCqgkXnGBRwCBtuV sRvEfu0mb5nVZZ31wRxLZaoBr/QwxGO7CAPuOlm3SidoArFov+aGzPnE+mWeisDyxkd5zbfRRHF prxkdudXJ85Wn7N4KGrK3X5RHQj1rhisd2BIAra+il49TEdE4zeXvZfcCxj/xgz5N1gmlscmHZp 0WHbwRpVHorTSLd2RKw/v7/Utuo6FXXF0IQGImXJwTrdZolPf3I5Sn+va+YpdZy3h8evA3pI3oV KeQrWyL+o1Gpb2XD7painmojche1ydAplF844joQuYE3BDRR3UF2tPZeP3otQsAoQD X-Google-Smtp-Source: AGHT+IGT9/1MeLVmxLppNhw6ATfBnky7RFeGJGgEupGtHFRdbpi4HufaHsrUZln7Z2M/tCwpjqT1eg== X-Received: by 2002:a05:690e:c41:b0:640:db57:8d93 with SMTP id 956f58d0204a3-642f8dee6bemr14317878d50.15.1764089942010; Tue, 25 Nov 2025 08:59:02 -0800 (PST) Received: from soleen.c.googlers.com.com (182.221.85.34.bc.googleusercontent.com. [34.85.221.182]) by smtp.gmail.com with ESMTPSA id 00721157ae682-78a798a5518sm57284357b3.14.2025.11.25.08.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 08:59:01 -0800 (PST) From: Pasha Tatashin To: pratyush@kernel.org, jasonmiu@google.com, graf@amazon.com, pasha.tatashin@soleen.com, rppt@kernel.org, dmatlack@google.com, rientjes@google.com, corbet@lwn.net, rdunlap@infradead.org, ilpo.jarvinen@linux.intel.com, kanie@linux.alibaba.com, ojeda@kernel.org, aliceryhl@google.com, masahiroy@kernel.org, akpm@linux-foundation.org, tj@kernel.org, yoann.congal@smile.fr, mmaurer@google.com, roman.gushchin@linux.dev, chenridong@huawei.com, axboe@kernel.dk, mark.rutland@arm.com, jannh@google.com, vincent.guittot@linaro.org, hannes@cmpxchg.org, dan.j.williams@intel.com, david@redhat.com, joel.granados@kernel.org, rostedt@goodmis.org, anna.schumaker@oracle.com, song@kernel.org, linux@weissschuh.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, gregkh@linuxfoundation.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, rafael@kernel.org, dakr@kernel.org, bartosz.golaszewski@linaro.org, cw00.choi@samsung.com, myungjoo.ham@samsung.com, yesanishhere@gmail.com, Jonathan.Cameron@huawei.com, quic_zijuhu@quicinc.com, aleksander.lobakin@intel.com, ira.weiny@intel.com, andriy.shevchenko@linux.intel.com, leon@kernel.org, lukas@wunner.de, bhelgaas@google.com, wagi@kernel.org, djeffery@redhat.com, stuart.w.hayes@gmail.com, ptyadav@amazon.de, lennart@poettering.net, brauner@kernel.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, saeedm@nvidia.com, ajayachandra@nvidia.com, jgg@nvidia.com, parav@nvidia.com, leonro@nvidia.com, witu@nvidia.com, hughd@google.com, skhawaja@google.com, chrisl@kernel.org Subject: [PATCH v8 03/18] kexec: call liveupdate_reboot() before kexec Date: Tue, 25 Nov 2025 11:58:33 -0500 Message-ID: <20251125165850.3389713-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.52.0.460.gd25c4c69ec-goog In-Reply-To: <20251125165850.3389713-1-pasha.tatashin@soleen.com> References: <20251125165850.3389713-1-pasha.tatashin@soleen.com> 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" Modify the kernel_kexec() to call liveupdate_reboot(). This ensures that the Live Update Orchestrator is notified just before the kernel executes the kexec jump. The liveupdate_reboot() function triggers the final freeze event, allowing participating FDs perform last-minute check or state saving within the blackout window. If liveupdate_reboot() returns an error (indicating a failure during LUO finalization), the kexec operation is aborted to prevent proceeding with an inconsistent state. An error is returned to user. Signed-off-by: Pasha Tatashin Reviewed-by: Mike Rapoport (Microsoft) Reviewed-by: Pratyush Yadav --- kernel/kexec_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index a8890dd03a1d..3122235c225b 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -1145,6 +1146,10 @@ int kernel_kexec(void) goto Unlock; } =20 + error =3D liveupdate_reboot(); + if (error) + goto Unlock; + #ifdef CONFIG_KEXEC_JUMP if (kexec_image->preserve_context) { /* --=20 2.52.0.460.gd25c4c69ec-goog