WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Hypercall by DomU Application

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Hypercall by DomU Application
From: Srujan Kotikela <ksrujandas@xxxxxxxxx>
Date: Fri, 11 Nov 2011 13:04:49 -0600
Cc: Tim Deegan <tim@xxxxxxx>
Delivery-date: Fri, 11 Nov 2011 11:07:25 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uoGJaHF+XaugGSVQqp0SW6qR0awF+LzLshN0REgh0tI=; b=Sz5pIMy+AbFVcXR9Z/jF1RLJkqWHlJ7Xm5NidNc1nqm55LoHMgVSUjk+BbIfw2zZIz 86zWmZwoqKa610J+8NwTDVMyJ/UszB8UFzAdPr/rIOwUQDH2e3DDrRm67KaDMXCE7CEj z0wR1F8tS3qFhTukj7cFlYBNr+3yZzF2wCWvU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111027104323.GE59656@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAKLFbfyTc-Q4ao44suwBC_XQi7KLaGpfS0=kH=iL2CoQzjQXbQ@xxxxxxxxxxxxxx> <20111027104323.GE59656@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx


On Thu, Oct 27, 2011 at 5:43 AM, Tim Deegan <tim@xxxxxxx> wrote:
At 20:16 -0500 on 25 Oct (1319573807), Srujan Kotikela wrote:
> Hi,
>
> I am working on a security architecture. In this architecture, the
> application in DomU has to communicate directly with the hypervisor. But as
> I can see, the xen architecture allows only DomU kernel to raise a
> hypercall. I am planning to enable application to communicate with xen
> directly. I am assuming, setting up a trap gate with Ring-3 access should do
> the trick. I have few questions regarding this.
>
> Is my idea feasible? ==> (  _set_gate(idt_table+HYPERCALL_VECTOR, 15, 3,
> &hypercall); )

Seems like it would be easy to find out. :)

> Are there any security/performance/functional implications with this
> approach?

Well, it totally undermines the security of the kernel if the
application can get the hypervisor to alter memory (since the
hypervisor doesn't know about the kernel's datastructures or policies)
but if you're very restrictive about what hypercalls can be called frum
user-mode, it should be OK.

One thing to look out for is making sure that the hypercall arguments
are actually mapped properly when the call happens (since the kernel
controls paging).

Tim.

Hi,

I am able to successfuly invoke a hypercall from user level just by using int $0x82 from the user level. 
I need this only for specific (custom) hypercalls. I was wondering how could I filter which hypercalls to be invoked from ring-3.

Filtering at the user level is straight forward but have to trust the user (poor design). 

I was wondering if I can somehow check the DPL of the caller before the control goes to the hypercall handler from the hypercall_vector?

~ SDK

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] Hypercall by DomU Application, Srujan Kotikela <=