From: Keir Fraser Subject: Re: dom0 vs non-dom0 differentiation inside Xen hypervisor Date: Mon, 03 Sep 2007 14:42:30 +0100 Message-ID: References: <804dabb00709021745uad08fe2m7fb8e7acaab9de45@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0722331127==" Return-path: In-Reply-To: <804dabb00709021745uad08fe2m7fb8e7acaab9de45@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Peter Teoh , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --===============0722331127== Content-type: multipart/alternative; boundary="B_3271675356_48996" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3271675356_48996 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Privileged hypercalls are all protected by IS_PRIV() checks on the current domain. See common/sysctl.c and common/domctl.c, for example. -- Keir On 3/9/07 01:45, "Peter Teoh" wrote: > In some parts of IA64 I can see that domain==dom0 checking is done, but in all > of x86 - I have yet to find a proper checking that the hypercalls comes from a > dom0 domain instead of any other domain. > > Theoretically, this means that any domain (PV or HVM) can always modify its > own kernel binary and then make a direct hypercall (via int 0x82 or SYSENTER) > into the hypervisor, executing domain controller commands like create domain > etc. > > Is this possible? Access control should be done from the hypervisor side, so > any existing dom0 checking (CONFIG_XEN_PRIVILEGED_GUEST compilation option - > done from the dom0 side) seems like pointless, because another domU can always > modify its own kernel binaries to achieve all the features what > CONFIG_XEN_PRIVILEGED_GUEST restrict - be it Windows XP or Linux. > > Please enlighten us. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel --B_3271675356_48996 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable Re: [Xen-devel] dom0 vs non-dom0 differentiation inside Xen hypervis= or Privi= leged hypercalls are all protected by IS_PRIV() checks on the current domain= .

See common/sysctl.c and common/domctl.c, for example.

 -- Keir


On 3/9/07 01:45, "Peter Teoh" <htmldeveloper@gmail.com> wro= te:

In some parts of IA64 I can see that domain=3D=3Ddom0 check= ing is done, but in all of x86 - I have yet to find a proper checking that t= he hypercalls comes from a dom0 domain instead of any other domain.

Theoretically, this means that any domain (PV or HVM) can always modify its= own kernel binary and then make a direct hypercall (via int 0x82 or SYSENTE= R) into the hypervisor, executing domain controller commands like create dom= ain etc.

Is this possible?   Access control should be done from the hyperv= isor side, so any existing dom0 checking (CONFIG_XEN_PRIVILEGED_GUEST compil= ation option - done from the dom0 side) seems like pointless, because anothe= r domU can always modify its own kernel binaries to achieve all the features= what CONFIG_XEN_PRIVILEGED_GUEST restrict - be it Windows XP or Linux.

Please enlighten us.


____________________= ___________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/x= en-devel

--B_3271675356_48996-- --===============0722331127== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0722331127==--