From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172172; b=l54+KoxX7tXTfWc5t5OMS3mqy/Kc9f2s/fbDnBkiAbs2lPErEDr/2Li0EW/BFtJu+Vm9 XE5OSHwGpXOXeBYvMeL+EckYxsdIMfh0N9NyqSdDfHUJ16f5WCN07SCBjwC6I8Il/ltFK W/URIpn+xCQr6LPVLlN0qF1/zO0DJuLlcXdVuZQnCxRLVoVGpj7RXiFrxR64p6uhCYpjf F8bBwj5zUBDJLmwI5ZFR6F+UqPuThLvsCH6i51azWO2zWeyc8Ot9QipnbU5NOPYIZ2RbC x6IJtGZWzk+Rf0kWFtqHJd7cUMt6OMidzJdL8Wd6ig7bTTJOWecoTYc3nPU83KW44ew== 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=nlIFxUd9Rr44ZL4g3qO6EJtYV1EMeP1gKIVBGaGs58LNGtlBxwg5xe76GIazaJAmkFh7 a/TsbzL5Q6vzRJLuTkpXKb8kG3HEm5M2evWGFGpKkN1BHKY52nb35BSNOHGgyOv/uKh69 MNyAghzRdnv+PVO0WOk07nhR6LdXhgQVqPJ4GjOVUNzgd05mDP6/Elp4OCm7bb7g8Qg4x mlh9v0bO2J+G/fYP+E/B2sCc7Y6elETrKDF1goBBocendREEnUgaMWdibgBrbF0h81tKS p7ggpdmOpYLDrZZqFarDt2UiaFI7KFwX9xHqnB2RLLHnA9jKNdwSHBv2eV5pyneJDXQ== 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.172 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 39DE1606A31A for ; Wed, 2 Dec 2026 00:42:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 39DE1606A31A 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-f172.google.com with SMTP id d9443c01a7336-2f146d5607aso15085ad.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=ERs0jNz+6ehN0/9a0B5Wqpr63W1rT4bI0WWBuMZbcxHYYlUwL0NePdyPuJL+4zCFD5 Ii+3lythHzdPi9GGAAF3knqrX7Ba+7XircaGRT1WSBlffF1rDqElo72v5EjoUK/T84CA huIaAAD1l8eOMxrfpUK/CAezcRFZUVSf0f5q9ncAUUumEtNBjC4tApa82BUM1nKqRrbK +zYvqZssFymSQwEQCtAu2CVrRoMI8f94px10ct7WpJHws72CFvrGfRTLeOxvFehICMAF tancudQ1EKGrEcgfd0+9LFBJRR+9u/9ATZNVlmEhSgFoW6/FcASka4+oZXQyCf4kJvYG LYsA== X-Forwarded-Encrypted: i=1; AL+hErGt5T49Fni/erWdazuhefBXlJL3yT0T/uEZL85FAS67bG7tjIqHY/zbGfNbSIhrQXuJBz7AP9SDDmDj@vger.kernel.org X-Gm-Message-State: APuU4Z9wuQ4Z95gchDZEp1wByoub1DIuMkZ64lcM/YC948PKWlYw13hj Dr1MV3ocWv4tvovVGz6rdBLDZYCFZRk6jFtVXGXs+e2HKVcw/2xNBflFSsjJK51UMg== X-Gm-Gg: AZFdTZcLMlHjAqNUKRbf49xki/WiKLlwQjOBMohnlOYwkeuRLTCiWMcKqSO0lTnoERN yUB6vc32m4VG/aUSJhy/QgKfTPCQz0RLBKGj3b60BchRBa2N2U4zAeTm5YBYyCEwino2cbpsR6J +GuvF90efBZ+yxkA6xF9iqDdLob7aV8G6bYZPSkvH0Z4PPD6xCHvYnkZNNQevDhaUNydWKOqo/9 yRPre5txAMQ6a7TaO7fPj0YQrv6PiSeMfxZNi6L3azP6ZEQLGDBbw9lTFLCuFZNEg9Z3LCGMSz5 Ama6qH/7R97vlqvXWdCBJckbUNxYiTe4u1MgKXzv5MPfXL+Q8sJt/FZzpi4Gh4ZCCEauIZyXdgT f19ht5cpc/yXhTKPiZHCKaWrj315/uPUMxNUs5cDlOxFgCSfSbVI4A7Pve+XJxS9YNSn5whOZSf Zbw0wLa70wRIseaO7m9KHencCyRAm/4C3CKArXFEdhbJO+W3mohxF2l/oRcF+Nam9t/7O28T/Bh 7uJY3ndJtY7HlHIFuRrzOWkWUfNI2KFwo4utBw+kY7JaMAzXkz56TO6OwBM4i7EWt2ToIv8aOAs BsjSnQsPlM/cIPSu/Po9Y710gx6jhYwZu1ybDm4xtNygKd+58fBDH7dERiw119NtMqOc6a8YtR4 0t8PDipMwpxJaAKBwY1RK 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-arch@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