[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH for-4.10 2/2] ubsan: disable unaligned access checks



Currently there are many offenders of the unaligned access checks,
which makes booting with the unaligned check a PVH Dom0 impossible.

The main offenders seem to be the ACPI code, the VMX code and
specially the intremap code (set_ire_sid).

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>
---
I'm not sure whether we prefer to fix the offenders, or just disable
the alignment wholesale. In any case if we decide to disable the
check, the patch should have vary low impact, and hence should be
committed to 4.10 on the base that it only affects ubsan, which is not
enabled by default and not to be used on production systems.
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 2659f8a4d1..1472adf1d6 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -120,7 +120,7 @@ $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) 
$(extra-y)): CFLAGS += -
 endif
 
 ifeq ($(CONFIG_UBSAN),y)
-$(filter-out %.init.o $(noubsan-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS 
+= -fsanitize=undefined
+$(filter-out %.init.o $(noubsan-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS 
+= -fsanitize=undefined -fno-sanitize=alignment
 endif
 
 ifeq ($(CONFIG_LTO),y)
-- 
2.13.5 (Apple Git-94)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.