All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/xen: explicitly disable checkpolicy logic
@ 2020-01-19 17:03 Peter Korsgaard
  2020-01-19 17:03 ` [Buildroot] [PATCH 2/3] package/xen: security bump to version 4.12.2 Peter Korsgaard
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Peter Korsgaard @ 2020-01-19 17:03 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/14af2dc3219847a92c6ec2db14ba387159b61fde

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@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 b0dc2dfe4c..167f0ad638 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -26,6 +26,7 @@ XEN_MAKE_ENV = \
 	XEN_TARGET_ARCH=$(XEN_ARCH) \
 	CROSS_COMPILE=$(TARGET_CROSS) \
 	HOST_EXTRACFLAGS="-Wno-error" \
+	XEN_HAS_CHECKPOLICY=n \
 	$(TARGET_CONFIGURE_OPTS)
 
 ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-03-05 20:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-19 17:03 [Buildroot] [PATCH 1/3] package/xen: explicitly disable checkpolicy logic Peter Korsgaard
2020-01-19 17:03 ` [Buildroot] [PATCH 2/3] package/xen: security bump to version 4.12.2 Peter Korsgaard
2020-01-20  0:26   ` Alistair Francis
2020-01-20  7:39   ` Peter Korsgaard
2020-03-05 20:25   ` Peter Korsgaard
2020-01-19 17:03 ` [Buildroot] [PATCH 3/3] package/xen: add upstream security fix for XSA-312 Peter Korsgaard
2020-01-20  0:28   ` Alistair Francis
2020-01-20  7:39   ` Peter Korsgaard
2020-03-05 20:25   ` Peter Korsgaard
2020-01-20  0:23 ` [Buildroot] [PATCH 1/3] package/xen: explicitly disable checkpolicy logic Alistair Francis
2020-01-20  7:39 ` Peter Korsgaard
2020-01-21 21:29 ` Arnout Vandecappelle
2020-01-21 21:45   ` Peter Korsgaard
2020-01-22  7:57     ` Arnout Vandecappelle
2020-03-05 20:21 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.