Hi Paul,
On 06/03/2020 12:19, Paul Durrant wrote:
+
+`<path>` and `<value|>` should be suitable to formulate a `WRITE` operation
+to the receiving xenstored and the `<perm-as-string>|+` list should be
+similarly suitable to formulate a subsequent `SET_PERMS` operation.
+`<perm-count>` specifies the number of entries in the `<perm-as-string>|+`
+list and `<value|>` must be placed at the end because it may contain NUL
+octets.
What is the size of <perm-count>? Also, we may want perm-count to be
aligned to its size so we don't have to worry of unaligned access.
How about moving <perm-count> at the beginning of the data blob?
Not sure we really need to care about alignment... I'll leave as-is for the
moment.
Well, you are just going to make the software more complex because you
will have to do multiple memory access to read the field (unalign access
are not supported everywhere). The fact that field is just after a
flexible size field is going to make the code much worse.
Re-ordering the fields in the stream is going to be so much easier to
do. So I would strongly recommend to rework your stream here.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel