libxl: adjustment to initiate_domain_create
cover libxl: adjustment to initiate_domain_create
Wei Liu (2):
libxl: set ret in the check for nestedhvm and altp2m
libxl: disallow enabling PoD and ALTP2M at the same time
tools/libxl/libxl_create.c | 9 +++++++++ 1 file changed, 9 insertions(+)
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 1/2 libxl: set ret in the check for nestedhvm and altp2m
The error path expects ret to be set, otherwise an assertion is triggered.
---
Cc: Ian Jackson <[email protected]>
Please backport to 4.6 and 4.7.
--- tools/libxl/libxl_create.c | 1 + 1 file changed, 1 insertion(+)
tools/libxl/libxl_create.c +1 -0
@@ -910,6 +910,7 @@ static void initiate_domain_create(libxl__egc *egc,if (d_config->c_info.type ==LIBXL_DOMAIN_TYPE_HVM && (libxl_defbool_val (d_config->b_info.u.hvm.nested_hvm) &&libxl_defbool_val (d_config->b_info.u.hvm.altp2m))) { + ret =ERROR_INVAL ;LOG (ERROR ,"nestedhvm and altp2mhvm cannot be used together" ); goto error_out; }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH for-4.8 1/2] libxl: set ret in the check for nestedhvm and altp2m
Wei Liu writes ("[PATCH for-4.8 1/2] libxl: set ret in the check for nestedhvm and altp2m"):
Quoted 2 lines
The error path expects ret to be set, otherwise an assertion is triggered.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH 2/2 libxl: disallow enabling PoD and ALTP2M at the same time
In reply to Wei LiuThat combination would cause Xen to crash.
Note that although this is a security issue, is not XSA-worthy because ALTP2M is experimental.
---
Move the snippet to the correct location after altp2m is correctly initialised. Also correctly set ret before exiting.
--- tools/libxl/libxl_create.c | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/libxl/libxl_create.c +8 -0
@@ -915,6 +915,14 @@ static void initiate_domain_create(libxl__egc *egc, goto error_out; } +if (d_config->c_info.type ==LIBXL_DOMAIN_TYPE_HVM && +libxl_defbool_val (d_config->b_info.u.hvm.altp2m) && + pod_enabled) { + ret =ERROR_INVAL ; +LOG (ERROR ,"Cannot enable PoD and ALTP2M at the same time" ); + goto error_out; + } + ret =libxl__domain_make (gc, d_config, &domid, &state->config);if (ret) {LOG (ERROR ,"cannot make domain: %d" , ret);
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH for-4.8 2/2] libxl: disallow enabling PoD and ALTP2M at the same time
Quoted 43 lines
From: Wei Liu [mailto:[email protected]]
Sent: Friday, November 04, 2016 12:42 AMThat combination would cause Xen to crash.
Note that although this is a security issue, is not XSA-worthy because ALTP2M is experimental.
Signed-off-by Wei Liu <[email protected]>---
Move the snippet to the correct location after altp2m is correctly initialised. Also correctly set ret before exiting.Cc Ian Jackson <[email protected]>Cc Jan Beulich <[email protected]>Cc George Dunlap <[email protected]>,Cc Andrew Cooper <[email protected]>Cc Kevin Tian <[email protected]>Cc Jun Nakajima <[email protected]>--- tools/libxl/libxl_create.c | 8 ++++++++ 1 file changed, 8 insertions(+)tools/libxl/libxl_create.c +8
-1@@ -915,6 +915,14 @@ static void initiate_domain_create(libxl__egc *egc, goto error_out; } +if (d_config->c_info.type ==LIBXL_DOMAIN_TYPE_HVM && +libxl_defbool_val (d_config->b_info.u.hvm.altp2m) && + pod_enabled) { + ret =ERROR_INVAL ; +LOG (ERROR ,"Cannot enable PoD and ALTP2M at the same time" ); + goto error_out; + } + ret =libxl__domain_make (gc, d_config, &domid, &state->config);if (ret) {LOG (ERROR ,"cannot make domain: %d" , ret); --
Quoted 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH for-4.8 2/2] libxl: disallow enabling PoD and ALTP2M at the same time
In reply to Wei LiuWei Liu writes ("[PATCH for-4.8 2/2] libxl: disallow enabling PoD and ALTP2M at the same time"):
Quoted 4 lines
That combination would cause Xen to crash.
Note that although this is a security issue, is not XSA-worthy because ALTP2M is experimental.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel