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

[Minios-devel] [UNIKRAFT PATCH v2] plat/xen: Fix memregion index into _libxenplat_mrd



Commit d1aae7129b71 ("plat: Register eh_frame and eh_frame_hdr in
memory.h") added new memory regions but did not update the offset
subtracted to index into _libxenplat_mrd. This breaks the boot on Xen,
as the memory allocator finds no suitable memory regions to use,
indexing beyond the size of the _libxenplat_mrd.

Fixes: d1aae7129b71 ("plat: Register eh_frame and eh_frame_hdr in memory.h")
Signed-off-by: Cristian Banu <cristb@xxxxxxxxx>
---
Changes in v2:
 - Make commit message more verbose
---
 plat/xen/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plat/xen/memory.c b/plat/xen/memory.c
index 4b3e94661a14..cb1c3552a0d9 100644
--- a/plat/xen/memory.c
+++ b/plat/xen/memory.c
@@ -133,7 +133,7 @@ int ukplat_memregion_get(int i, struct 
ukplat_memregion_desc *m)
 #endif
                        return -1;
                } else {
-                       memcpy(m, &_libxenplat_mrd[i - 5], sizeof(*m));
+                       memcpy(m, &_libxenplat_mrd[i - 7], sizeof(*m));
                }
                break;
        }
-- 
2.11.0


_______________________________________________
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®.