From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH for-4.8 2/2] libxl: disallow enabling PoD and ALTP2M at the same time
Date: Thu, 3 Nov 2016 16:41:57 +0000 [thread overview]
Message-ID: <1478191317-2755-3-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1478191317-2755-1-git-send-email-wei.liu2@citrix.com>
That 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 <wei.liu2@citrix.com>
---
Move the snippet to the correct location after altp2m is correctly
initialised. Also correctly set ret before exiting.
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Jun Nakajima <jun.nakajima@intel.com>
---
tools/libxl/libxl_create.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index abd2272..7c1695a 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -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);
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-11-03 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 16:41 [PATCH for-4.8 0/2] libxl: adjustment to initiate_domain_create Wei Liu
2016-11-03 16:41 ` [PATCH for-4.8 1/2] libxl: set ret in the check for nestedhvm and altp2m Wei Liu
2016-11-04 14:39 ` Ian Jackson
2016-11-03 16:41 ` Wei Liu [this message]
2016-11-04 5:00 ` [PATCH for-4.8 2/2] libxl: disallow enabling PoD and ALTP2M at the same time Tian, Kevin
2016-11-04 14:39 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478191317-2755-3-git-send-email-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).