Poison free blocks with 0xAA bytes and verify them when a block is
allocated in order to spot use-after-free issues.
+config COLORING_DEBUG
+ bool "Coloring debug messages"
+ depends on ARM_64 && COLORING
+ ---help---
+ Cache coloring debug messages will be logged to XEN output.
+ This feature only works if CONFIG_EARLY_PRINTK is set.
+
+ If unsure, say N here.
+
endif # DEBUG || EXPERT
endmenu
--- /dev/null
+/*
+ * xen/include/asm-arm/coloring.h
+ *
+ * Coloring support for ARM
+ *
+ * Copyright (C) 2019 Xilinx Inc.
+ *
+ * Authors:
+ * Luca Miccio <lucmiccio@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __ASM_ARM_COLORING_H__
+#define __ASM_ARM_COLORING_H__
+
+/* Logging utilities */
+#if defined(CONFIG_COLORING) && defined(CONFIG_COLORING_DEBUG)
+#define C_DEBUG(fmt, args...) \
+ printk(fmt, ##args)
+#else
+#define C_DEBUG(fmt, args...) { }
+#endif
+
+#endif /* !__ASM_ARM_COLORING_H__ */