From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172172; b=WWzzseHLHzF8Lgcvc6yJAYGSR8Q1LxvV/OJTdZFElFh+ymej4L/Uh5E+SwHeyeS2U/Ru 6L+cmQGvGFm9NoN5NKdL625QWyDjxwP7w2BjEp0h+SS0zPPc6q8pn7RfTyj6PYQz8MpRq DdaVW4NeusooePMI0nJ5D1rGbacmwutoxwHnISMa5gOc0yRoE719SB+jdrjlz7pF/YlKr AsQEp8FRxO+E1YHd7Za41kpZkDoktMY3cpktAccbPe3zAY0QK3zSI3mpSi1YauakL7IQq QnXGikKcUVt72V7opP/k3IqnxbisavatZWW6+D4oq8M7sExKVVlGoCuufUApIWkdMew== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172172; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmVCI=; b=QQfmCBfZ+5jJ9qyKhaGAWSFrzvpqeBcAj4gormmew2CGAD06K5qbvF+ohmdr6BvSkxLb 7TuNLEXUhac5h/SheG/jDJuN9o4sPO5dS0fzz0WvC5I7x4e9/M99tOqtfG1ulhkVnTsxv LkhiWc9+nqiCSV//aJhN7NhupV2tTfuSS77mrvS9UYUQLp0CiaNPEo+NfA6/t2s3oilWn +SjHssZ6mNTXfU05MXhj1GjCkbOHCOnyGU0H3mCoXGLR8GZnPhnQLpJj4f362wQSk2JJU cybIPYGP1+qeo5e2DLbhVSWgwnqt+mpHrShAbvgu1WBqKA29/ywUUXzz5eFnV3QEJ0Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b="Hzq1MBC/"; arc=none smtp.remote-ip=209.85.214.173 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43851606A327 for ; Wed, 2 Dec 2026 00:42:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 43851606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Hzq1MBC/ Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2f146d5607aso15095ad.0 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=vger.kernel.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=Hzq1MBC/4iTL8s2rMmYVMTaH/tG2SLCH5pCmc+IBJ0EgtgiM0XoPm5cR8/kQxuEH2Q Q0NuKfPS9IZqW4bZ8fiK1rsk6K6w6fwKaw2TGmD8eRX7JghMU1QdRGhhcoH+Eb38pcc6 +SlMg9ci5dgI9v8EZe+kbJjo3fwLK5CieBNoSKJ//xG1sSE2W2og3CAh1ICXxXYjIwZm oYyior19R7D9oaAQma8YVlQN7mzTPjOhnhcQR0/8fbLJ3ko6I4SNtlLcFrGKXKpGaYL2 BB+Fw1ZJDV0IgG2jk5ig2Hg8y2Z5aTSe2j5qiTzI5jT5GN0FRtfWCFSiUUz8AEGxT9zS 4l4g== 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/ysKe0SVmVCI=; b=dZR3PuUXFObQENL5BKqtAbaeinRKcZ05sXRWylQgcCBOsUpXaGjlGGzCGamDQonW8T dLusR6DjWzDhpIJdrrZT+goC98xtiC1bk2KX/M9baj/8em/wWBeFFu6Uzt2W+LXcIJ5E rxCnY6mYLu8CGryLJJZwLCqHI8woiNSHSEjCFacsx7wSES8PJ9YFWv0+AUGXVDsDWG61 egVRgjdS+aEfvSciyjKaN51Emn1fuJXIHzF2dDJQinI9a3UMr5yhc6lv0iIR79XV8JCD 1Pn5cbrjWQxmm2riZOPBIleD1jjuXAbprvFQ3EFCEM6zhnOMWsT4yyqCoYLRx90Azhu9 IhOw== X-Forwarded-Encrypted: i=1; AL+hErF9PJKktV3rz/hYK8wySbaHf7rrmd4bTzbgnqTVbdb5ELo/xD9dmVEJz8tH4ZInHFHQ4NsQCadtjheciUI=@vger.kernel.org X-Gm-Message-State: APuU4Z/LU7X4P++SQ5NZOENC9VzAjPFsckqVMWW+DTUBSUVuPlZyCP41 Fhug/eoP/WKvJKqzH92BWGtoaqcHYMMStj/yatNqF7ujYtDfr5uLp8vrt1/6yi2S0Q== X-Gm-Gg: AZFdTZcT9g6ax1ryET5ox12fBX+vqQWkUiaFfFcxIJwFp9ZUpOeMWDJaFN5U5NpeemY oErCuyVK8EWkiG0WnGnootJtO4rgqqIzFEQXpQdl+Mom5x0veQIPtIvUdQunGbwwXs0JBTGO5Eb P3cxpHuvCxPFoSMFhfKNatwn8xbcFyiCQ3+HCRSWmSCftzAEBjJ7oprSnEZFXcGdrXMJLZXh4Kl PqANzq5xLPznB6a8b9SOtdwSfAnOOgMkEyxOApcg2U7UgEKOJ1mX4Bxrb8/7enJ3FlvrpfkP7tH Syrr3j8nLSIzwqoa3hs+aNQd4xLvjvkaRdmgWV8aBx+h5GMLjUz/XW07xq2k4zIqm/2gmLJ/pB+ V2RXSbxkFS8hDCInV2ogGiQ0uePbyBPqHeP06EpkUEesWePzEA4cDBPG3k+dThTOYHVRcAIGtJa FzVMvt5/eiFu4eq2kBzBAuHhGYw1BesWfGUPEQkXM885P0GpRfzBg5U72gcQ77p9DTFKNLpk8Rj ij9mClM5UHTe8732e5mhNfPAl14a+t/9I/2JcF7NRaTs/aC9ZQfMc94oex9aYeJCahuTtOMMNQk 2Oo2LpEicV63AouK/MaTi5y51P5ssx5zz+E6GlOsvYMvxwPgnMkS9K9w0WDhoxjpTHdqFeLVU42 PXhUVsLtctqNtMsYPA0Yz 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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> 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