[Suit] Discussion points for IETF106

Brendan Moran <Brendan.Moran@arm.com> Fri, 08 November 2019 17:07 UTC

Return-Path: <Brendan.Moran@arm.com>
X-Original-To: suit@ietfa.amsl.com
Delivered-To: suit@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E0E931208F7 for <suit@ietfa.amsl.com>; Fri, 8 Nov 2019 09:07:02 -0800 (PST)
X-Quarantine-ID: <KzXlcFsuLOtj>
X-Virus-Scanned: amavisd-new at amsl.com
X-Amavis-Alert: BANNED, message contains text/plain,.exe
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=TdohaoJp; dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=armh.onmicrosoft.com header.b=5CYHCrr5
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 KzXlcFsuLOtj for <suit@ietfa.amsl.com>; Fri, 8 Nov 2019 09:06:59 -0800 (PST)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on060b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::60b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 423DE120917 for <suit@ietf.org>; Fri, 8 Nov 2019 09:06:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e0VPTveVP/7XPlGXD7ZHLL/QSYtH5Bfrf4E8yB3Gb8I=; b=TdohaoJpz2YvaesCUC1Z0onge5LId10z9+pPAooN3Y+gPLRMCywNcNFhwUO4NvBEVYuukmqM2IVK2RTSP/isCghRNrZSmH4hRr/K0w4Sc4kJvSBVrSg1/HdE08vWOfs8poDnx4zjSsUVv6ucUpQ4sqIpKLMqG/oD2cjdv2NIVGc=
Received: from VI1PR0802CA0041.eurprd08.prod.outlook.com (2603:10a6:800:a9::27) by HE1PR0801MB1852.eurprd08.prod.outlook.com (2603:10a6:3:7c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 8 Nov 2019 17:06:50 +0000
Received: from VE1EUR03FT042.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by VI1PR0802CA0041.outlook.office365.com (2603:10a6:800:a9::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2408.24 via Frontend Transport; Fri, 8 Nov 2019 17:06:50 +0000
Authentication-Results: spf=fail (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; ietf.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;ietf.org; dmarc=none action=none header.from=arm.com;
Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT042.mail.protection.outlook.com (10.152.19.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2430.21 via Frontend Transport; Fri, 8 Nov 2019 17:06:50 +0000
Received: ("Tessian outbound 0cf06bf5c60e:v33"); Fri, 08 Nov 2019 17:06:50 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: b49213057520b0e1
X-CR-MTA-TID: 64aa7808
Received: from 5ce2b6061b34.1 (cr-mta-lb-1.cr-mta-net [104.47.13.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7A3CDB4F-0D1E-47A4-99EB-238C92677750.1; Fri, 08 Nov 2019 17:06:45 +0000
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2053.outbound.protection.outlook.com [104.47.13.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5ce2b6061b34.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 08 Nov 2019 17:06:45 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cya8P3UwTHsu30DEK9wPxSA6Mi324fMrSI7wcJ03rp4cnE39m5gaWLp1ThyCq+Xc2OMoDFtMx4JlaTkty4Wk/Tj44g3LiEQSVhjko4RpmBWdFls8gXEZFTQpZDHh2l6TVu3MtikYASMC5UvyZUfEUj9etrAOdQKv7g/xFOTTL03aUCHJ8WEeJ5799hyszqDZ+1LXnhfPrx0dsOWTtNvUV+jRUXlB5fYsswoVxrtTtLeJLSKms6fXm739Rg9UPWgFdjhK+LgqYOefp+gmaPmgBzoZhzV086bMhSDlMieXEjLj3B3Ike+3aNBvanaxNNhrUKJDSbnpEblQ3gErJExyTQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8yoMk9smv3rtxz8Q2vK1JL54Vh3fyM5VRkZJsfPmvxI=; b=lPBQIKG673mnPj6KXD1a/oF+1xS7+S63Tspn7xc0sRQudDrK3xj23GUrnFhntDv6oGBqEGM9RuA+94qJmGTYBN/lCi+pUUa+/cnnQZ28Swh6jxZBBxRFquv5aQJ9LF4UXpfm2uSN6NysN4fGUh3ZQ6ZnjtaNJCppdvBC2QKQ2H72PzwBAJxta8eLPwoCJKC0WEedNKWXqBro5r83rWLWFsd55cLAuKerTbMoV7U441gGjtAqB/soV52A06clpC7B4ySkB/GvsoDW7xpViPTLrRJdPUb7os86KVOFfFbhTGG3z0ZzL2hlVZyPWJpoRweSEQOHJcbYGvjLSKxsCdx6gA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8yoMk9smv3rtxz8Q2vK1JL54Vh3fyM5VRkZJsfPmvxI=; b=5CYHCrr5VREPKlwjqiG9I0dIdyqACbTcvH6F+j/EqvlWWQQ4NYdfKcJCJ235nh5zdI/0rgPvTGuPljHt8Jgqu1xemPDUTcrgSmRTjtx9AGOxz+6y7GyKu7nSqtYq14/m4IRapBXh1qEYAGWgcw3utcs27OY1bLdkEHkq1y5DDxc=
Received: from DB6PR0801MB1879.eurprd08.prod.outlook.com (10.168.84.137) by DB6PR0801MB1877.eurprd08.prod.outlook.com (10.168.84.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.23; Fri, 8 Nov 2019 17:06:43 +0000
Received: from DB6PR0801MB1879.eurprd08.prod.outlook.com ([fe80::81c3:481c:2371:9637]) by DB6PR0801MB1879.eurprd08.prod.outlook.com ([fe80::81c3:481c:2371:9637%9]) with mapi id 15.20.2430.023; Fri, 8 Nov 2019 17:06:43 +0000
From: Brendan Moran <Brendan.Moran@arm.com>
To: suit <suit@ietf.org>
Thread-Topic: Discussion points for IETF106
Thread-Index: AQHVllblqr3GzZLe8UmwsXWhHwLZHQ==
Date: Fri, 8 Nov 2019 17:06:43 +0000
Message-ID: <BB9EAA77-FB3A-4697-BB05-F20258A364B4@arm.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3594.4.19)
Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Brendan.Moran@arm.com;
x-originating-ip: [217.140.106.52]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-HT: Tenant
X-MS-Office365-Filtering-Correlation-Id: 994f4c4c-9324-4baa-5e07-08d7646e0c02
X-MS-TrafficTypeDiagnostic: DB6PR0801MB1877:|HE1PR0801MB1852:
X-Microsoft-Antispam-PRVS: <HE1PR0801MB18527A36300F732F46D2CC7DEA7B0@HE1PR0801MB1852.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000;
x-forefront-prvs: 0215D7173F
X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(51444003)(189003)(199004)(14454004)(478600001)(25786009)(6916009)(7736002)(6512007)(54896002)(6436002)(2906002)(81156014)(8936002)(36756003)(6486002)(50226002)(26005)(186003)(316002)(102836004)(66946007)(76116006)(91956017)(6506007)(33656002)(99286004)(8676002)(81166006)(86362001)(5660300002)(66066001)(256004)(71200400001)(2616005)(476003)(486006)(66476007)(64756008)(14444005)(3846002)(6116002)(71190400001)(66446008)(66556008); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0801MB1877; H:DB6PR0801MB1879.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: /J9Pon9rjrzt8Awp7YMSRee+5gC9MvIyp7WduXJaM5MAu0qztHKUHcEb02bI6hidUiXX4DOIhGlNhbw54Ki4LE0tFGu3Hy2CxXjpAs2jDI9T2SS19y6MqgDZJ0YWPKKGMOnIG7AV6ck5pteyRz55Zu83C9GGvGXo1Mn7AJx/HLi7v/wybt+JROVMcnM1ykHakijM+7FJUourVs1+q3vr2MYrsI0fSA1Wfm+Z+scVsR4iuqAfzLiRKHB6YLN3VTTvTmhxDRV+pOZ4sfL/6bJ07wJkUDMaF3FX8mbQTlttmZ+vKI44LmIrpeMBjP8YqkL52hpIyCR34Amme6C8BJDjT4IGieeR+6c+IQHZGnTyz4FeM+sS4u/z6oajjz3pDx0Ua2qUyn1It1G2p4A63hxgdb3iK3lExVyajpkz0sLD5J3AoqL3wFgf8UgGIfMaY9jA
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_BB9EAA77FB3A4697BB05F20258A364B4armcom_"
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1877
Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Brendan.Moran@arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT042.eop-EUR03.prod.protection.outlook.com
X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(376002)(39860400002)(1110001)(339900001)(40434004)(51444003)(199004)(189003)(6486002)(66066001)(6916009)(476003)(126002)(71190400001)(336012)(25786009)(356004)(14444005)(486006)(8676002)(76130400001)(186003)(5660300002)(7736002)(2906002)(26005)(4546004)(81166006)(26826003)(5024004)(105606002)(478600001)(50226002)(14454004)(86362001)(36906005)(70206006)(99286004)(70586007)(36756003)(316002)(81156014)(6506007)(102836004)(8936002)(2616005)(33656002)(16586007)(3846002)(30436002)(6116002)(45080400002)(33964004)(22756006)(6512007)(54896002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1852; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Fail; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1;
X-MS-Office365-Filtering-Correlation-Id-Prvs: bf47e07d-d44f-4657-b478-08d7646e07ac
X-Forefront-PRVS: 0215D7173F
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: M98dmd/nTqU+ox9+aWXtLPkopDjG7heJYH5lGIogHnH8ARkS1b1p7SwS4pMkwnkao9h+7w2HnGcFpetTeUYaORKhIwMwkup5CnD0XlJJlyhgnjsYYJeLzrZh4gseYp4ODENyj3zZoGgvZ4Bdo58u6rIgFXx5xUeiylIXc7bXWY2k5KmvOArGDEWkLmBwdyOZIkYiakt4EbiRJmx9AXI/4R4EQavSsnXesyl1rT96fjNvArclFouAYlCO6NzLKfsh13jrpudkQYgx9LZtQY+TuVQAbdIPZy6LLpC6Zne8nxG/Ajooh/xmAxNerwNJP79Q0igCLTYN0RCii+LFglnkFhoZlrDbcFhuZcsP5batPm2CDuO6WW9CLleDZJHblbj9br6H+kctVT70WMeJmUOLS3PSnCBOVmjytuTtRkIkV5oF7lZJnsNm7dUPpkQ7WKIQ
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2019 17:06:50.5465 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 994f4c4c-9324-4baa-5e07-08d7646e0c02
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1852
Archived-At: <https://mailarchive.ietf.org/arch/msg/suit/jj_2cjrSlwnhj68o1nZawxGacUc>
Subject: [Suit] Discussion points for IETF106
X-BeenThere: suit@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Software Updates for Internet of Things <suit.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/suit>, <mailto:suit-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/suit/>
List-Post: <mailto:suit@ietf.org>
List-Help: <mailto:suit-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/suit>, <mailto:suit-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Nov 2019 17:07:04 -0000

There are several ideas I’d like to discuss with the wg at IETF 106:

First, I’d like feedback on what to do with the serialisation examples section:

  *   Is there an example you’d like to see?
  *   Should the examples be moved into an appendix?
  *   Should the examples be moved into a separate draft with more extensive use-case information?

Second, I’d like to propose adding a new flow control primitive to the manifest encoding.

The primitive is Map-Test-Execute (a relative of map-filter-reduce). The intent of the primitive is to loop through a set of component indices, each with a set of parameter values. In each case write the parameter values to the component’s parameter storage. Next, run a soft-fail sequence, this is intended for tests. A failure here terminates the current loop iteration, and starts the next iteration. Finally, run a hard-fail sequence. A failure here causes a hard termination of the Map-Test-Execute primitive.


[
    map: # List of component ID : {parameter set} pairs
    test: # Command sequence that can soft fail (goes to next map pair)
    execute: # Command sequence that does not soft fail (error causes termination)
]

In python-esque pseudocode, the primitive would look like the following:


def map_test_exec(components, pairs, testfn, execfn):
    for c,vars in pairs:
        components[c].context.update(vars)
        try:
            testfn(components[c].context)
        except:
            continue
        execfn(components[c].context)

The CDDL would be:

Map_Test_Execute = [
    parameter-list : [ + (uint, nil/{ + SUIT_Parameters }) ],
    ? test-sequence : nil/bstr .cbor SUIT_Command_Sequence,
    ? exec-sequence : bstr .cbor SUIT_Command_Sequence
]

This structure is fairly straight-forward to process. It typically reduces encoding size.

This could be used in the following situations:

  1.  Set up the variables for a list of components
  2.  Apply a specified sequence to a list of components
  3.  Choose which of a set of variables to use based on tests

Because the update() necessarily happens before the test-sequence, this has some side-effects: a failed test still applies variables. This doesn’t seem like the right answer. It might be that the right answer is to treat the parameters as temporary until the test is complete. This would be:


def map_test_exec(components, pairs, testfn, execfn):
    for c,vars in pairs:
        tmp_context = components[c].context.copy()
        tmp_context.update(vars)
        try:
            testfn(tmp_context)
        except:
            continue
        components[c].context.update(vars)
        execfn(components[c].context)

However this approach is slightly more complex to implement: it requires sufficient memory to add one more parameter set (N+1 parameter sets, where N components are supported).

A second possibility is to provide a loop “break" command, so that the map can stop when a successful test is made. However, I don’t like this approach since it will probably violate the principle of least surprise: leaving traces of failed tests in the parameter sets seems like it would be unexpected.

A third possibility would be to add a second set of parameters, which is applied after the test sequence, if successful. This should produce less surprising results.


Map_Test_Execute = [
    parameter-list : [ + [
        component: uint,
        ? test-parameters: nil/{ + SUIT_Parameters },
        ? exec-parameters: { + SUIT_Parameters }
    ] ],
    ? test-sequence : nil/bstr .cbor SUIT_Command_Sequence,
    ? exec-sequence : bstr .cbor SUIT_Command_Sequence
]

I think that this primitive has value. I think that it would be fairly straight-forward to implement if N+1 parameter sets are possible. The test-parameters + exec-parameters variant is cheaper in memory, slightly more complex in encoding, but still fairly straight-forward to implement.


Best Regards,
Brendan
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.