Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9090298ybi; Tue, 23 Jul 2019 21:39:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0mvIcQUeTfXt2yjhPz5hz0CRWL0ojpmChETMY3rajymMxihAEk4JRRrVwMQWwh3BPm+i2 X-Received: by 2002:a17:90a:c391:: with SMTP id h17mr86306215pjt.131.1563943151441; Tue, 23 Jul 2019 21:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563943151; cv=none; d=google.com; s=arc-20160816; b=hUBoyV3dDsA4CrCJgjPFS88SffFybfaemlbNmrr5A/9But5qiG/Wx1tZWVEmBTrmcw ttLvSS2SGWLuO5UJlVauHesFvaWPePscr0jYfrw3f9XADQIDfcyiiop40lStmEOrXxHR XIHao5ZfQIC+aZS1p/+UdRmQ+Yc7Dt8h8uhoc7lyuCYCWzMmVbFFpfkv1tLvSn1fzhX7 fZEMndtrqF3PjcZnftS25kopw9VHYEZfg4SaEA2g0Xavx3/VI+RYUpK3TGu439g9LNSN lW38uD8v+lEJxiYE0htwQcwjkmsR3U+YF/3ms3xLI6amA5IBV9ZQDmxxTjk/PWj7FIx1 /0bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:to:from; bh=/FaywyNCCfrgVz7GrPht4E8BPNOw0sceM4xlQaU+QOA=; b=BF9f3xMeiPZ8GVgu0oUb9AegXJIAzASUtGpKyPXoZrHW/34K8fBtpW9kv1fvuUXhWi kXxIAB3zNzww8aXkKCw51vbO7pd3W1oDZwbjmmpirpWGy2Fy5lbW79uHztnMFBQxVeXW w/YtAjn5TEqxeOylzbKE01fcHKkiK+eGyN9K2IUyFso08d1o3Y8Du0tTFyiycXxpaqYd ouLXPeBw1IzFW91n3qj480Rx0dgbE7gdidbSlPfQoU1zLPpL1C4awybqg4gdDiMO9uy6 3ToiVpxhRheXs4UQliE4N3lTjxC45ZL/RgQIJLTBm5t0uZVfs9GxKZ8RXv2t5+CIEwnn EJaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y21si11987607plp.332.2019.07.23.21.38.55; Tue, 23 Jul 2019 21:39:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725887AbfGXEic (ORCPT + 99 others); Wed, 24 Jul 2019 00:38:32 -0400 Received: from mga14.intel.com ([192.55.52.115]:48746 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbfGXEib (ORCPT ); Wed, 24 Jul 2019 00:38:31 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 21:38:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,300,1559545200"; d="p7s'?scan'208";a="321225367" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga004.jf.intel.com with ESMTP; 23 Jul 2019 21:38:30 -0700 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.29]) by ORSMSX102.amr.corp.intel.com ([169.254.3.142]) with mapi id 14.03.0439.000; Tue, 23 Jul 2019 21:38:30 -0700 From: "Stotland, Inga" To: "michal.lowas-rzechonek@silvair.com" , "linux-bluetooth@vger.kernel.org" Subject: Re: [PATCH BlueZ v2 0/5] Use composition data to validate app against the node Thread-Topic: [PATCH BlueZ v2 0/5] Use composition data to validate app against the node Thread-Index: AQHVQT5Yu1XcKKob3U+c3KTqJpe7vKbZpiOA Date: Wed, 24 Jul 2019 04:38:29 +0000 Message-ID: <493521147b6462323359fc24106204f7488ef4fc.camel@intel.com> References: <20190723100623.6957-1-michal.lowas-rzechonek@silvair.com> In-Reply-To: <20190723100623.6957-1-michal.lowas-rzechonek@silvair.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.255.231.148] Content-Type: multipart/signed; micalg=sha-1; protocol="application/x-pkcs7-signature"; boundary="=-Dq5TjahQsCZHbOfHSOgu" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --=-Dq5TjahQsCZHbOfHSOgu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michal, On Tue, 2019-07-23 at 12:06 +0200, Micha=C5=82 Lowas-Rzechonek wrote: > This patchset streamlines app validation by creating a temporary node > during Attach, Join and CreateNetwork calls, then validating its > composition data to: > - fit in Config Model Composition Data Get message > - declare mandatory models on primary element > - declare consecutive element indexes >=20 > During Attach call, temporary composition data is also compared with > data generated for existing node, guaranteeing immutablity required > by > the specification. >=20 > Micha=C5=82 Lowas-Rzechonek (5): > mesh: Convert void pointers to anonymous unions in > managed_obj_request > mesh: Validate application by comparing composition data > mesh: Keep element and model lists sorted and unique > mesh: Check that element indexes are consecutive > mesh: Check that config server is present in primary element >=20 > mesh/mesh-defs.h | 2 + > mesh/node.c | 507 ++++++++++++++++++++++----------------------- > -- > 2 files changed, 241 insertions(+), 268 deletions(-) >=20 I agree with the general idea of this change. There are just a couple of things that need to be fixed (sent as comments to a specific patch). Regards, Inga --=-Dq5TjahQsCZHbOfHSOgu Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKbDCCBOsw ggPToAMCAQICEDabxALowUBS+21KC0JI8fcwDQYJKoZIhvcNAQEFBQAwbzELMAkGA1UEBhMCU0Ux FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5hbCBUVFAgTmV0 d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9vdDAeFw0xMzEyMTEwMDAwMDBa Fw0yMDA1MzAxMDQ4MzhaMHkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEUMBIGA1UEBxMLU2Fu dGEgQ2xhcmExGjAYBgNVBAoTEUludGVsIENvcnBvcmF0aW9uMSswKQYDVQQDEyJJbnRlbCBFeHRl cm5hbCBCYXNpYyBJc3N1aW5nIENBIDRCMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA yzuW/y/g0bznz8BD48M94luFzqHaqY9yGN9H/W0J7hOVBpl0rTQJ6kZ7z7hyDb9kf2UW4ZU25alC i+q5m6NwHg+z9pcN7bQ84SSBueaYF7cXlAg7z3XyZbzSEYP7raeuWRf5fYvYzq8/uI7VNR8o/43w PtDP10YDdO/0J5xrHxnC/9/aU+wTFSVsPqxsd7C58mnu7G4VRJ0n9PG4SfmYNC0h/5fLWuOWhxAv 6MuiK7MmvTPHLMclULgJqVSqG1MbBs0FbzoRHne4Cx0w6rtzPTrzo+bTRqhruaU18lQkzBk6OnyJ UthtaDQIlfyGy2IlZ5F6QEyjItbdKcHH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