[Buildroot] [git commit branch/2019.02.x] package/xen: explicitly disable checkpolicy logic

Peter Korsgaard peter at korsgaard.com
Thu Mar 5 20:21:11 UTC 2020

commit: https://git.buildroot.net/buildroot/commit/?id=a7f4ab8fae0537d31e8046f0abcbb1c21a4d6a2b
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2019.02.x


The Xen build system builds and embeds a default XSM FLASK (Flux Advanced
Security Kernel) security policy if it detects SELinux checkpolicy on the
build machine.

If enabled, a gen-policy.py python script is used to convert the binary
FLASK policy to a C array initialization list to embed it in the Xen binary.
Depending on the python version and locale available on the host, this fails
with byte values outside the 0..255 range:

policy.c:7:10: error: unsigned conversion from 'int' to 'unsigned char' changes value from '56575' to '255' [-Werror=overflow]
  0xdc8c, 0xdcff, 0x7c, 0xdcf9, 0x08, 0x00, 0x00, 0x00, 0x58, 0x65, 0x6e, 0x46, 0x6c,

To fix this and ensure a consistent build, pass XEN_HAS_CHECKPOLICY=n to
disable the checkpolicy detection.

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
Reviewed-by: Alistair Francis <alistair.francis at wdc.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
(cherry picked from commit b60f3e2ae6416c4179b7f6a4028d7f61c6d50526)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
 package/xen/xen.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/xen/xen.mk b/package/xen/xen.mk
index bd8a39f639..92629a3d86 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -26,6 +26,7 @@ XEN_MAKE_ENV = \
 	HOST_EXTRACFLAGS="-Wno-error" \

More information about the buildroot mailing list