Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D988FC54FCB for ; Fri, 24 Apr 2020 14:51:49 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B24EC2071E for ; Fri, 24 Apr 2020 14:51:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B24EC2071E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jRzg2-00006o-O4; Fri, 24 Apr 2020 14:51:38 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jRzg0-00006b-Q1 for xen-devel@lists.xenproject.org; Fri, 24 Apr 2020 14:51:36 +0000 X-Inumbo-ID: 181e5ccf-863b-11ea-94ba-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 181e5ccf-863b-11ea-94ba-12813bfff9fa; Fri, 24 Apr 2020 14:51:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 18997ACE3; Fri, 24 Apr 2020 14:51:34 +0000 (UTC) Subject: Re: [PATCH] docs/designs: re-work the xenstore migration document... To: Julien Grall , Paul Durrant , xen-devel@lists.xenproject.org References: <20200424133736.737-1-paul@xen.org> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <8029c772-9c42-460c-e17c-85e18b32f102@suse.com> Date: Fri, 24 Apr 2020 16:51:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Paul Durrant Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 24.04.20 16:38, Julien Grall wrote: > Hi, > > On 24/04/2020 15:26, Jürgen Groß wrote: >>> +``` >>> +    0       1       2       3       4       5       6       7    octet >>> ++-------+-------+-------+-------+-------+-------+-------+-------+ >>> +| type                          | len                           | >>> ++-------------------------------+-------------------------------+ >>> +| body >>> +... >>> +|       | padding (0 to 7 octets)                               | >>> ++-------+-------------------------------------------------------+ >>> +``` >>> + >>> +NOTE: padding octets here and in all subsequent format >>> specifications must be >>> +      zero, unless stated otherwise. >> >> What about: "... are written as zero and should be ignored on read." > > I would rather not say "ignored" because it doesn't allow us to extend > the record if needed in a safe way. The read side should abort if it > sees an other value than 0 in the padding. I'd rather ignore unknown fields. This allows to add optional data without having to special case it. Writing zeroes is the important part here, of course. Ignoring those fields would e.g. enable a downgrade more easily, while aborting could make that impossible. And in case a version would write non-zero bytes (e.g. due to a bug) this version could never be live-updated. Juergen