Re: [Cbor] Invalid tag (issue 176); notable tags draft
Thiago Macieira <thiago.macieira@intel.com> Wed, 13 May 2020 15:41 UTC
Return-Path: <thiago.macieira@intel.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 899B03A0FC2 for <cbor@ietfa.amsl.com>; Wed, 13 May 2020 08:41:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kuIKfbOLzUuf for <cbor@ietfa.amsl.com>; Wed, 13 May 2020 08:41:54 -0700 (PDT)
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2D9C83A0DF9 for <cbor@ietf.org>; Wed, 13 May 2020 08:41:53 -0700 (PDT)
IronPort-SDR: NQUy1yDgsb1C5+QAmccbqBXggRAx4v0u/k3iWGRL0HUC9Y8xj5Q+5lhkBEBnJTkgwoa5Mi3IO/ VpBLByPwGGSA==
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 08:41:53 -0700
IronPort-SDR: UhdGae5YjAMjP2rwewiL1rb/YulqMdVJ21CixUKLat7swH/YM4yjARGyCni22mAVFuUoJSGA6R NORnAtuxFkuA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.73,388,1583222400"; d="scan'208";a="463979772"
Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga005.fm.intel.com with ESMTP; 13 May 2020 08:41:52 -0700
Received: from tjmaciei-mobl1.localnet (10.255.230.198) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 13 May 2020 08:41:52 -0700
From: Thiago Macieira <thiago.macieira@intel.com>
To: cbor@ietf.org
Date: Wed, 13 May 2020 08:41:51 -0700
Message-ID: <3364916.3PCeGIPBnu@tjmaciei-mobl1>
Organization: Intel Corporation
In-Reply-To: <54D2E6E4-DF68-4E21-8418-D7EAE6768315@tzi.org>
References: <9B6B7286-F934-4576-86E4-D8654293A9FC@tzi.org> <3461942.bKgpO4XBJ3@tjmaciei-mobl1> <54D2E6E4-DF68-4E21-8418-D7EAE6768315@tzi.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Originating-IP: [10.255.230.198]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/EPR4pCCov1_WcF1ydBdN344tcE8>
Subject: Re: [Cbor] Invalid tag (issue 176); notable tags draft
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 13 May 2020 15:42:01 -0000
On terça-feira, 12 de maio de 2020 22:13:38 PDT Carsten Bormann wrote: > This was discussed at the same time we also discussed that 64-bit (i.e., > > 32 bit) tags are likely only going to be processed by implementations that > do 64-bit numbers as well, and it was pointed out that some implementations > will even attempt to get by with 16 bits for the tags they need. But we > could go ahead and reserve ~0 as another invalid tag as that strategy > (storing tag number+1) is only visible inside an implementation, so it > doesn’t matter whether that tag is processed during interchange. Indeed. TinyCBOR's own structure for validating tags could be shrunk to 16-bit and save just under half of the memory use. Right now, I'm using some extra bits to indicate that tags 21, 22 and 23 apply to arrays, maps and byte strings so I need more than 16 bits anyway, but there are other ways of indicating the same thing. > https://www.ietf.org/id/draft-bormann-cbor-notable-tags-00.html#name-invalid > -tag Is that text sufficient? It's sufficient, based on the discussion here. But if I hadn't participated, I'd read the "are encouraged to" as something I should implement, not just something I can ignore. > > If this discussion is of interest, I'll start a new thread to talk about > > Undefined. > > Yes, please. Even better if you could include tag 31 > https://github.com/svaarala/cbor-specs/blob/master/cbor-absent-tag.rst in > that discussion. Will do. > > If it is present, the decoder > > will see a QCborTag(0xffff) and I will add a QCborKnownTags::Invalid to Qt > > and CborInvalidTag to TinyCBOR (if it fits into 32-bit). > > Maybe we should go for Invalid1 (0xffff) and Invalid2 (0xffffffffffffffff) > then… Then reserve 0xffff, 0xffffffff and 0xffffffffffffffff. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel System Software Products
- [Cbor] Invalid tag (issue 176); notable tags draft Carsten Bormann
- Re: [Cbor] Invalid tag (issue 176); notable tags … Thiago Macieira
- Re: [Cbor] Invalid tag (issue 176); notable tags … Carsten Bormann
- Re: [Cbor] Invalid tag (issue 176); notable tags … Thiago Macieira
- Re: [Cbor] Invalid tag (issue 176); notable tags … Carsten Bormann
- Re: [Cbor] Invalid tag (issue 176); notable tags … Laurence Lundblade