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 55A87606A31A for ; Wed, 2 Dec 2026 00:43:06 +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=BieciCxd; 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=BieciCxdCU6w1knKMhu7fK6wTK xuxcR93nmXviV/N1rq0wbOIApndQD667+yNf33cSjVe8bQmW1JJWJcRZZWB34UIy3jMwTvh36GGnZ QxxclRVrDO7V3qAv/y71Y+n+4TwllAbXOmWTKCRRsxpgqu6t4C1I+waHM418GrLK41dPU+yOTVpoJ 8EBrXkTU6tquqw5J5sdtQODRtgzv4ZEm3y0m2H+5H4MZhNq0JT8RT7aKmALQqpHWDJ/QEXkkvxQdY WaZ0L6Bv0Z9SCHYUjlQvMeoHSx5HhgNI6lBqawWc1vQFlnIFPkUh3LDTRl+wg4gd9fbbgsrNYZ5Su wEwFxNZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYYQx-00000009oLC-2wre; Wed, 02 Dec 2026 00:42:55 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYYQv-00000009oKX-1KF5 for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 00:42:54 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-2f0e8bbc7a4so4895ad.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/ysKe0SVm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WPkM0UHxHi+X3N3mFbQsFusJ92WaXsqXNquNPuUzoEWu5pT96BoA2X7ujTmtT JaDjEbHtMeHxqE2dGK8pLQae4kEv2bzvbPxcFRNvRcHXfmimi37gT076MtWlzlQMZh9paqHDonh BRslBILANpWgsZEeb2QgcmTKGOg3EqgoprZdMSKeD6W9YIoc7nQVczK7uZUx6/DjBlUrI2t2wRq PbFHa5Ablo3EdKyW8mT/T 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_380009_90136EE2 X-CRM114-Status: GOOD ( 15.48 ) X-Spam-Score: -17.6 (-----------------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" 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