[Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure
Christophe Fergeau
cfergeau at redhat.com
Thu Jan 3 16:32:49 UTC 2019
On Thu, Jan 03, 2019 at 10:15:43AM -0500, Frediano Ziglio wrote:
> >
> > On Thu, Jan 03, 2019 at 02:14:24PM +0000, Frediano Ziglio wrote:
> > > The SpiceStat structure can be 20 or 24 bytes depending on alignment.
> > > Being a memory mapped structure potentially used with lockless access
> > > is not good to have it unaligned.
> > > The current tool that reads this memory mapped file (reds_stats) is
> > > able to detect if the structure is either 20 or 24 bytes and act
> > > according so changing this structure won't affect the behaviour
> > > (unless you have an old tool but as they are usually packages together
> > > is quite improbable).
spice/stats.h is however a public header shipped by the spice-protocol
package, we cannot really assume that the only user of the SpiceStat
structure is reds_stats.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190103/52b3dfc6/attachment.sig>
More information about the Spice-devel
mailing list