[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.11 1/2] libxc/x86: fix mapping of the start_info area
The start_info size calculated in bootlate_hvm is wrong. It should use HVMLOADER_MODULE_MAX_COUNT instead of dom->num_modules and it doesn't take into account the size of the modules command line. This is not a problem so far because the actually used amount of memory doesn't cross a page boundary, and so no page-fault is triggered. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxc/xc_dom_x86.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c index 0b65dab4bc..e29c666b89 100644 --- a/tools/libxc/xc_dom_x86.c +++ b/tools/libxc/xc_dom_x86.c @@ -1671,7 +1671,11 @@ static int bootlate_hvm(struct xc_dom_image *dom) unsigned int i; start_info_size = sizeof(*start_info) + dom->cmdline_size; - start_info_size += sizeof(struct hvm_modlist_entry) * dom->num_modules; + start_info_size += sizeof(struct hvm_modlist_entry) * + HVMLOADER_MODULE_MAX_COUNT; + start_info_size += HVMLOADER_MODULE_CMDLINE_SIZE * + HVMLOADER_MODULE_MAX_COUNT; + if ( start_info_size > dom->start_info_seg.pages << XC_DOM_PAGE_SHIFT(dom) ) -- 2.16.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |