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

[Minios-devel] [UNIKRAFT PATCH 5/5] plat/xen: arm: Initialize the bss section to 0



The bss section should be initialized to 0.
This fixes crash in `uk_alloc_register` that
assumes that `uk_alloc_head` is initialized to 0
since it resides in the .bss section.

Signed-off-by: Dafna Hirschfeld <dafna3@xxxxxxxxx>
---
 plat/xen/arm/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plat/xen/arm/setup.c b/plat/xen/arm/setup.c
index 4b9efe5..cc977df 100644
--- a/plat/xen/arm/setup.c
+++ b/plat/xen/arm/setup.c
@@ -193,6 +193,7 @@ void _libxenplat_armentry(void *dtb_pointer, uint32_t 
physical_offset)
 {
        uk_pr_info("Entering from Xen (arm)...\n");
 
+       memset(&__bss_start, 0, &_end - &__bss_start);
        _init_dtb(dtb_pointer);
        _dtb_init_mem(physical_offset); /* relocates dtb */
        uk_pr_info("           dtb: %p\n", HYPERVISOR_dtb);
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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