|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.10] xen/pvshim: set max_pages to the value of tot_pages
commit 004646a1dd4ff2f768d942689545dd3b6e2135e2
Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Thu Jan 11 11:41:20 2018 +0000
Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx>
CommitDate: Fri Jan 12 15:47:32 2018 +0000
xen/pvshim: set max_pages to the value of tot_pages
So that the guest is not able to deplete the memory pool of the shim
itself by trying to balloon up.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/pv/shim.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 6dc1ee45d7..e3e101a5b1 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -204,6 +204,12 @@ void __init pv_shim_setup_dom(struct domain *d,
l4_pgentry_t *l4start,
(hypercall_fn_t *)pv_shim_grant_table_op,
(hypercall_fn_t *)pv_shim_grant_table_op);
guest = d;
+
+ /*
+ * Set the max pages to the current number of pages to prevent the
+ * guest from depleting the shim memory pool.
+ */
+ d->max_pages = d->tot_pages;
}
static void write_start_info(struct domain *d)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |