From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38DA2606A329 for ; Wed, 2 Dec 2026 00:42:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Xj7eiVbj; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=BpUDNVnN DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmVCI=; b=Xj7eiVbjZNR3+uJdqUCKw2171u Sn2a1mOT+tSJCEQZDAT8X86kCqwQdCkHc8MH0K7QG5Iry+Iws7PtN5/lyhinA6Jes8oKbjfqjvAlm GWtMvyI7LucSIWhM5NWW/vmrUA5l6aJJs26eoqsQfTQ0yuqIcuOpCKNgp6ZaTDBuNlrk3sYw0jios iqO+glDKuivQcncXMKRq/DfUZxHxZ3cqQCOT9CJSeNGH+h0joC6ZVcCyFx4QdPbqAftn9FeGRWQJg Fq3HOtR42kPFGVsts7ht2Tsg2MYdBF3DArQYs1KGQTWniPecNy+4Gvq81zbwZnUWDzeX3K1uPoa4P ryELFedg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYYQx-00000009oLG-3lHL; Wed, 02 Dec 2026 00:42:55 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYYQv-00000009oKY-1KBh for kexec@lists.infradead.org; Wed, 02 Dec 2026 00:42:55 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-2f0e8bbc7a4so4945ad.1 for ; Tue, 01 Dec 2026 16:42:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172171; x=1796776971; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmVCI=; b=BpUDNVnNFtcZVhbs9pdGHcFNJeh2Z6dAqtfQRbt+50cKHzxWQBUzAphz89wc+WpsC5 lx5qccoXEJfHUpZfoZSmgeUx8FmLflo/oeZEviA5DF+1NyX1PBo9Ar8+iKmAq0V10VzJ TUHAsb8kR3kJTALFnIvSzs8kzOudAkqCbf1YgBiJA6Lh2vW34oNb5nJXsKs6MfWGO7Pv 2QwSWDBWqapTb8iyTSxUE5nJ8LA8jXLRc22mOfa58kwJ/lIfgauMbFixR9ehxb+9MXMW SqlGp9VY+kpJgpCY1oMrNd/q7d22i23vGiI9qzDPj2GInuPNUMmnIO/Hj/3ggEwPiXql efww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172171; x=1796776971; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmV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8EogLHljJLWtk9MbvqD4nti6+X4K7pk3JMvNW3DqhHgEr qgMQu6MCv2Zb51QoPQo20IcdbmZIdplQPEpEbSSZO/ojklebRAvYWCr2EeKXX0eAkH+alJoDFrk heH9tbGrIoIlvcJhxS9fvBtfP0dNIv/o5U33/n6qrnB1pKMTPbqw01fdv2bEEqgfw+WZWATEW5r 8GtsdP5BcJEiiar1oo+AW X-Received: by 2002:a17:902:f705:b0:2e9:5a0b:9f3 with SMTP id d9443c01a7336-2f179e87feamr536635ad.7.1796172170958; Tue, 01 Dec 2026 16:42:50 -0800 (PST) Received: from google.com (25.75.145.34.bc.googleusercontent.com. [34.145.75.25]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cde6d06ee37sm19897733a12.28.2026.12.01.16.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 16:42:49 -0800 (PST) Date: Wed, 2 Dec 2026 00:42:47 +0000 From: Samiullah Khawaja To: Tarun Sahu Cc: Pasha Tatashin , Mike Rapoport , robin.murphy@arm.com, maz@kernel.org, will@kernel.org, David Matlack , Alexander Graf , seanjc@google.com, jgg@nvidia.com, loganodell@google.com, arnd@arndb.de, dwmw2@infradead.org, baolu.lu@linux.intel.com, Bjorn Helgaas , oupton@kernel.org, alex@shazbot.org, gle.com@google.com, pbonzini@redhat.com, Andrew Morton , kevin.tian@intel.com, joro@8bytes.org, kvmarm@lists.linux.dev, linux-pci@vger.kernel.org, Pratyush Yadav , kexec@lists.infradead.org, kvm@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, sagis@google.com, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 05/19] kho: Add feature header for fine-grained ABI compatibility Message-ID: References: <20261110050202.529473-1-tarunsahu@google.com> <20261110050202.529473-6-tarunsahu@google.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20261110050202.529473-6-tarunsahu@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_164253_380020_4E29294C X-CRM114-Status: GOOD ( 14.29 ) X-Spam-Score: -17.6 (-----------------) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" X-Spam-Status: No, score=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Nov 10, 2026 at 05:01:48AM +0000, Tarun Sahu wrote: >Serialized structures in KHO and Live Update Orchestrator currently rely >on whole-structure compatibility strings or monolithic version fields to >validate handed-over state across kexec. Any change to a serialized >structure, even an optional additive field, requires bumping the >compatibility string or version number and breaks live update between >adjacent kernels. > >Introduce a generic feature header (struct kho_ser_hdr) for serialized >binary structures in include/linux/kho/abi/feature.h. Each subsystem >groups the fields of its serialized structure under feature indices, >starting with index 0 for base fields. When a subsystem adds a new >capability, it appends new fields to the end of its payload structure >under a new feature index. Retired fields are kept in place so existing >field offsets never shift; if the type or format of a field needs to >change, the existing field and feature are kept intact until retired and >a new feature index with an appended field of the new type is added. >Only when a change requires a complete break in the serialized layout or >semantics that feature flags cannot handle, a new handler or format can >be introduced with an incremented version number. > >Each feature belongs to either a required feature space or an optional >feature space. Both spaces are numbered independently starting from 0. >In the serialized header, required features occupy the first nr_required >bits, followed immediately by nr_optional bits for optional features: > > struct kho_ser_hdr { > __u32 size; > __u16 nr_required; > __u16 nr_optional; > __aligned_u64 flags[]; > }; > >A set bit indicates that the feature is present in the payload. The >truth table for deserialization: > > Source bit Target Action > Not set - Accept: feature absent > Optional set unknown or known Accept: ignore or use the data A real world example would be really helpful to understand this. What does optional mean here? If the bit is unknown to the next kernel, how does it decided to ignore it. Thanks, Sami