libxl/arm: Fix build on arm64 + acpi w/ gcc 8.2
authorChristopher Clark <christopher.w.clark@gmail.com>
Thu, 16 Aug 2018 20:22:41 +0000 (13:22 -0700)
committerHans van Kranenburg <hans@knorrie.org>
Thu, 1 Oct 2020 12:50:58 +0000 (13:50 +0100)
commitf43767ce2834f4a1d36b006fef18355752e7cdfe
treec564b6b43ef559c8b4750736c3dce4df0981c07f
parente49d07d95a8405360aa8db51fd62c74d4436722e
libxl/arm: Fix build on arm64 + acpi w/ gcc 8.2

Add zero-padding to #defined ACPI table strings that are copied.
Provides sufficient characters to satisfy the length required to
fully populate the destination and prevent array-bounds warnings.
Add BUILD_BUG_ON sizeof checks for compile-time length checking.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
(cherry picked from commit b8f33431f3dd23fb43a879f4bdb4283fdc9465ad)

Gbp-Pq: Name 0025-libxl-arm-Fix-build-on-arm64-acpi-w-gcc-8.2.patch
tools/libxl/libxl_arm_acpi.c