public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stotland, Inga" <inga.stotland@intel.com>
To: "michal.lowas-rzechonek@silvair.com" 
	<michal.lowas-rzechonek@silvair.com>
Cc: "jakub.witowski@silvair.com" <jakub.witowski@silvair.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Gix, Brian" <brian.gix@intel.com>
Subject: Re: [RFC BlueZ 0/1] Validate element indexation
Date: Tue, 9 Jul 2019 06:36:12 +0000	[thread overview]
Message-ID: <17fa8e7dc1318ba9a1d141ad819be86d1a7ec9ea.camel@intel.com> (raw)
In-Reply-To: <20190708182211.yxkucondnw5x6ay7@kynes>

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

Hi Michal,

On Mon, 2019-07-08 at 20:22 +0200, Michał Lowas-Rzechonek wrote:
> Inga, Jakub,
> 
> On 07/08, Stotland, Inga wrote:
> > I agree that the validation for the gaps is needed. Interesting
> > point
> > about max number of elements...
> > 
> > I wonder if a better check woul be to we to add to construct
> > composition data as a validation point to make sure it fits in mesh
> > message. Plus, an additional strict check can be done when Attach
> > method is called: stored composition can be byte compared to the
> > one
> > dynamically generated from collected properties...
> 
> If I read that correctly, this means we would need a way to build
> Composition Data on the fly, during get_manager_object_cb processing.
> 
> I think it would be possible to get rid of validate_model_property
> function - instead, we could build a temporary mesh_node instance
> using information provided by the application as-is, and then:
> 
> - in case of existing nodes, generate Composition Data from both
>   existing and temporary instances, and byte-compare the two
> 
> - in case of new nodes, simply save the temporary instace to 'nodes'
>   list
> 
> All of that assumes that Composition Data generationchecks that:
>  - everything fits into a buffer (this is already done)
>  - mandatory models are present
>  - indexation is OK
> 
> I think this would make things slightly more consistent, and we would
> get rid of most "is_new" checks during attach/join/create/import.
> 

This is exactly what I meant. Thanks for writing this up in a more
explanatory way.
This would be a comprehensive validation of the node's integrity.

Regards,
Inga


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3265 bytes --]

      reply	other threads:[~2019-07-09  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 14:13 [RFC BlueZ 0/1] Validate element indexation Jakub Witowski
2019-07-08 14:13 ` [RFC BlueZ 1/1] mesh: " Jakub Witowski
2019-07-08 16:53 ` [RFC BlueZ 0/1] " Stotland, Inga
2019-07-08 18:22   ` Michał Lowas-Rzechonek
2019-07-09  6:36     ` Stotland, Inga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17fa8e7dc1318ba9a1d141ad819be86d1a7ec9ea.camel@intel.com \
    --to=inga.stotland@intel.com \
    --cc=brian.gix@intel.com \
    --cc=jakub.witowski@silvair.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=michal.lowas-rzechonek@silvair.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox