spice-protocol/spice
Frediano Ziglio f6e4cb65da stats: Avoid holes in SpiceStat structure
The SpiceStat structure can be 20 or 24 bytes depending on alignment.
Being a memory mapped structure potentially used with lockless access,
it is not good to have it unaligned.
The only tool that we know of that reads this memory mapped file
(reds_stats) is able to detect if the structure is either 20 or 24
bytes and act accordingly so changing this structure won't affect the
behaviour (unless you have an old tool but as they are usually
packaged together this is quite improbable).
This will also help on Windows as in that system it is not possible
for reds_stats to implement the same discovery trick implemented on
Linux.  On Windows it is not possible to read the size of the file
mapping (on Windows to implement shared memory you can use a file
mapping not associated to a file).
The structure will change layout only on 32-bit architectures which is
not recommended nowadays (the 64-bit platforms that we support align
64-bit integers to 64 bits).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2019-01-17 17:10:58 +00:00
..
barrier.h Use gcc builtin rather than asm for memory barriers 2016-01-08 15:31:38 +01:00
controller_prot.h Fix typo in comment 2018-06-21 11:27:09 +01:00
end-packed.h qxl_dev: Align QXLRam to 4 bytes 2018-07-11 10:19:45 +01:00
enums.h Add support for h265 video codec 2018-06-19 15:31:32 +01:00
foreign_menu_prot.h Fix typo in comment 2018-06-21 11:27:09 +01:00
ipc_ring.h Fix up SPICE_SPICE typo 2010-02-04 18:10:50 +01:00
macros.h macros: Use Visual C++ built-ins for byte swapping if available 2018-03-09 15:41:09 +00:00
Makefile.am error_codes: Remove obsolete header file 2019-01-02 10:00:52 +00:00
meson.build error_codes: Remove obsolete header file 2019-01-02 10:00:52 +00:00
protocol.h Add support for h265 video codec 2018-06-19 15:31:32 +01:00
qxl_dev.h qxl_dev: Align QXLRam to 4 bytes 2018-07-11 10:19:45 +01:00
qxl_windows.h Add QXL_ESCAPE_MONITOR_CONFIG enum 2015-06-30 16:23:42 +02:00
start-packed.h qxl_dev: Align QXLRam to 4 bytes 2018-07-11 10:19:45 +01:00
stats.h stats: Avoid holes in SpiceStat structure 2019-01-17 17:10:58 +00:00
stream-device.h Add the StreamMsgGraphicsDeviceInfo message 2019-01-16 13:48:25 +00:00
types.h Add byteswapping macros 2010-05-19 16:02:40 +02:00
vd_agent.h Add the VDAgentGraphicsDeviceInfo message 2019-01-16 13:48:02 +00:00
vdi_dev.h Define and use new SPICE_MAGIC_CONST macro 2015-08-12 14:15:27 +02:00