]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xen: arm: enable stack protector feature
authorVolodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Thu, 13 Feb 2025 22:00:27 +0000 (22:00 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Feb 2025 22:11:21 +0000 (22:11 +0000)
Enable previously added CONFIG_STACK_PROTECTOR feature for ARM
platform. Initialize stack protector very early, at the very beginning
of start_xen() function.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
xen/arch/arm/Kconfig
xen/arch/arm/setup.c

index a26d3e11827cfe030d36400e322aa9b65502674c..8f1a3c7d747b89f329eb2d6b4d1ed306dc26a466 100644 (file)
@@ -16,6 +16,7 @@ config ARM
        select GENERIC_UART_INIT
        select HAS_ALTERNATIVE if HAS_VMAP
        select HAS_DEVICE_TREE
+       select HAS_STACK_PROTECTOR
        select HAS_UBSAN
 
 config ARCH_DEFCONFIG
index c1f2d1b89d4317224bb1011e0db3a7372df807e2..0dca69120716028bdffa7b9d18f700c0e6232b7d 100644 (file)
@@ -30,6 +30,7 @@
 #include <xen/virtual_region.h>
 #include <xen/version.h>
 #include <xen/vmap.h>
+#include <xen/stack-protector.h>
 #include <xen/trace.h>
 #include <xen/libfdt/libfdt-xen.h>
 #include <xen/acpi.h>
@@ -305,6 +306,8 @@ void asmlinkage __init start_xen(unsigned long fdt_paddr)
     struct domain *d;
     int rc, i;
 
+    boot_stack_chk_guard_setup();
+
     dcache_line_bytes = read_dcache_line_bytes();
 
     percpu_init_areas();