From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 1D9313B8945 for ; Wed, 3 Jun 2026 15:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780499021; cv=none; b=Eomey5kEfCu685bphftJ1nm+7cXR9G/X7YhJJxiFfPLtC9jhUb6+9LJs91Y3Jjf/lsLYvpGVuJ8l96P6n3KiPpc7AkXMKwTx/Onv8+AS+enGLy3M3KwS2aQ7CbQ8+gFLa7P5PY4v/WH9e84W0RG/uoSpr06eBT1KOuWYHm/E0S0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780499021; c=relaxed/simple; bh=aJLjATifzgiw0TOlO2S9rrai0BaEgmmVwEMl+rz5nfc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d/Utl8W4/0xGEysjsX4K4VGPwkBsAMRrAQkv5ZJ9/xMbwHtvNx7eqSuYi2uPTPq3WmxKnpTcNphh3qWVl6nYraFt4YTOO9I8NtXhLmpuFGVktJ97S1PFhIMgGl8onYdJADUcjN1lQv88aWgdbw15fI6qCcqH2RnbHsTq/eChEo8= 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=cqgOTH34; arc=none smtp.client-ip=209.85.160.179 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="cqgOTH34" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-5176ca6bab1so8414991cf.0 for ; Wed, 03 Jun 2026 08:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1780499018; x=1781103818; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=GE3cxqAXSaCHVcc+WKXlgfot3UvMd9FsWD9Iu0pbg2Q=; b=cqgOTH34C+FJgNcku0jzLOHE06WOO0GzZlwzJWYwQrB3lNzQycQHXHfiRUeg96EJuj zu80R9bQFL5szMIu2M6mBNaYBpH2uuiQWpqazM+lJMNdWAWRcXylqfDIgv8pYxropi2H iRc+3WEfNnow2lkbOuMPW6GRfaiM778Q5KrvQuZaiIUOThJU7EYYW5BTobgWJeJ7JtWH s40eM8WjpSNEsynDnrxTy9rOcgACSokJKDxHm5vmW/Qr/Jg2a1Xh4VuO2huux8eJoVsT NHhD2wTOX5APj2DP/CmiOU09ZL057g+NdbquGMcFrC6IizUQHUOeUHWeiSaXy2Kx15Ji ZCDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780499018; x=1781103818; h=in-reply-to:content-transfer-encoding:content-disposition :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; bh=GE3cxqAXSaCHVcc+WKXlgfot3UvMd9FsWD9Iu0pbg2Q=; b=s3767mTLu/DbF0AIf4XbcSFfE0N0Rb9JVNVGRtG0fSHr0q/rPyPqKST93lr59BWBwr hsFSngFA3zs2dvF/AK9DXQYpKkA77axraKh2rD5Vj7tAeo49AbBIsI4OhZOveYXTkX+S 0997uDBXfnF+a6kjVKZyRM414pM3jqlgTHR3gM+RySdvDkUspkv1F8AKBeZF3JZ5hOzA 48crF66WBeWDFnrIjKVmbxItNLrnzgFsZzvpuNOrv+6rFqPiovpw6tulzYX1aWqbGGar DylbOAxQsuDw3BNYoApF1PuleMHtBZLPlXdEZEtVp9qkf4vFYD/CvGiNAuaXe6RufscO pGhw== X-Forwarded-Encrypted: i=1; AFNElJ9qPwKXC4qfKQEx4lXtw0WykqS/Z6yMDjcUyvgWdJUH2QLux81/wca/nVNNhZdlkkLkiZ4RIwD8AMco7n8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywpf+xlmxxUI+3AncM52Yoqnwdn7r6oXmlEq6hfVfe4Zs8ZdcsK aYMgNHIYdLgiOben2VHhcSkEURxdjK+uMO9rlzmSGfhEJGQ5kw/GRsaEmM1LvtRT/O4= X-Gm-Gg: Acq92OGD5U6Y0iUS4oRi7h4/RJcTLPsbDNIE1d6oPhNW1u0/LXAwSca8qmQAnzyRvcd IntfKV6oMuifxPvXLqsTxOwZ7dsYKrXsccDd40dfW0eXCZ4Zn9QyojxjV5MUT8TH2LfNwpyIeBJ dUv2ocaLsQ3seh1fkM8jMNunLSlKEOs2/mS6WcUYNe/hx62wlEfZT3m2WazzHuBmXTWWsAcy8h4 tjIoZyz41D5Yl7/8JFAFaEzfhceNcu++PS3RQEkxYcBXNJMjyYjhsTnKe7hHR4iznBsTFMwNhNq 0rh/Di1/zUKN6I5kKFZv+llP50V+fd7qKphQ5u1E99A6+nHJ9+g153M4LK99jkZ4voImTgUZhYg a49G/WizgGu1kEotuJv//T0jb2carNQItV90c2LXdftKrSDEb2Yk9TS2MtGMKBimWXERvEPFgD2 YkY4Z2VZk9CcozTr2hFqY8juE90o/FRO+Vai7XBKnJvqkupT1HfcQru+vLiWRB3A== X-Received: by 2002:ac8:7e86:0:b0:516:82e2:7788 with SMTP id d75a77b69052e-51779701719mr41203361cf.1.1780499017835; Wed, 03 Jun 2026 08:03:37 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51775dd2e53sm25188571cf.24.2026.06.03.08.03.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 08:03:37 -0700 (PDT) Date: Wed, 3 Jun 2026 15:03:36 +0000 From: Pasha Tatashin To: Mike Rapoport Cc: Pasha Tatashin , linux-kselftest@vger.kernel.org, shuah@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, skhan@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, dmatlack@google.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com Subject: Re: [PATCH v6 07/13] kho: add support for linked-block serialization Message-ID: References: <20260603032905.344462-1-pasha.tatashin@soleen.com> <20260603032905.344462-8-pasha.tatashin@soleen.com> <178046937151.468621.13398573538792303093.b4-review@b4> <178049725439.475072.11560134126837430744.b4-reply@b4> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <178049725439.475072.11560134126837430744.b4-reply@b4> On 06-03 17:34, Mike Rapoport wrote: > On 2026-06-03 14:11 +0000, Pasha Tatashin wrote: > > On 06-03 16:59, Mike Rapoport wrote: > > > On Wed, Jun 03, 2026 at 12:05:04PM +0000, Pasha Tatashin wrote: > > > > On 06-03 09:49, Mike Rapoport wrote: > > > > > On Wed, 03 Jun 2026 03:28:58 +0000, Pasha Tatashin wrote: > > > > > > diff --git a/include/linux/kho/abi/block.h b/include/linux/kho/abi/block.h > > > > > > new file mode 100644 > > > > > > index 000000000000..8641c20b379b > > > > > > --- /dev/null > > > > > > +++ b/include/linux/kho/abi/block.h > > > > > > @@ -0,0 +1,56 @@ > > > > > > [ ... skip 25 lines ... ] > > > > > > +#define _LINUX_KHO_ABI_BLOCK_H > > > > > > + > > > > > > +#include > > > > > > +#include > > > > > > + > > > > > > +#define KHO_BLOCK_ABI_COMPATIBLE "kho-block-v1" > > > > > > > > > > It's never used by block set and after looking at the following patches I > > > > > found that it's appended to LUO compatible string. > > > > > > > > > > While this works for LUO, I think it should be kho_block_set_restore() > > > > > responsibility to verify the compatibility. > > > > > > > > It should work for any component that relies on kho_block. My proposal > > > > is to use this method for other common KHO data structures (e.g., kho > > > > vmalloc, kho radix, future kho xarray). There is no need for them to > > > > carry the compatibility string in their metadata, as whoever uses them > > > > will include their compatibility string. > > > > > > So if, say, memfd_luo uses kho vmalloc, xarray and blocks it'll have five > > > compatibility strings glued together? > > > > That is correct, but it will be in only one place: the header of the > > client's KHO subtree. Since it is dynamically sized and 8-byte aligned, > > it should be safe to include in any struct. > > This is safe, you are right. > But I have more usability concerns from one side and the duplication it > causes from the other. > > I can see the downside of putting the version information in the data > structure itself as it either requires a different header for the first > element or needlessly increases all the headers. > > But > > #define LUO_ABI_COMPATIBLE LUO_COMPAT_BASE "-" KHO_BLOCK_ABI_COMPATIBLE "-" KHO_VMALLOC_ABI_COMPATIBLE "-" KHO_RADIX_COMPATIBLE > > is not really digestible too. And it forces KHO users to potentially > track KHO internal changes. These are compatibilities; I think they are quite digestible, both to write and also when the LUO_ABI_COMPATIBLE string is printed out for debugging/info purposes. > We still don't promise any compatibility between different kernel > versions so to avoid blocking this series on the decision what is the > best way to convey KHO data structures compatibility I suggest to bump > kho ABI version in v6.2* of the patch that adds KHO blocks and postpone > this discussion to after rc1 when we'll have plenty of time. Let's keep this patch as is for now. We will have a broader discussion when we convert other participants to this new scheme. If we decide not to pursue this approach, we will change this code to use an independent compatibility string. However, having this in place as a template will help us convert other components correctly, ensuring proper alignment and that correct string helpers like strncmp / strscpy are used—which I have already ensured is the case in LUO. > * sending a new version of a single file does same email traffic, but it > confuses b4 and quite possibly other tools, so I think v7 is better. Agreed, I also prefer re-sending the whole series... Pasha > > Pasha > > > > > > > > > For now, reviewers will have to make sure that if the ABI header content > > > > is changed, the compatibility string is updated. > > > > > -- > > > Sincerely yours, > > > Mike. > > > >