Lakshman Jayaraju
2013-Jan-28 04:22 UTC
{Beginner''s question}: Invoking hypercalls from domU PV guest domain
Hi all, Is there any way I can invoke hypercalls from domU PV guest without modifying kernel source? I mean either from user programs or Loadable kernel modules. Any pointers for the same? Thanks, Lakshman -- View this message in context: http://xen.1045712.n5.nabble.com/Beginner-s-question-Invoking-hypercalls-from-domU-PV-guest-domain-tp5713824.html Sent from the Xen - User mailing list archive at Nabble.com.
Ian Campbell
2013-Jan-28 10:34 UTC
Re: {Beginner''s question}: Invoking hypercalls from domU PV guest domain
On Mon, 2013-01-28 at 04:22 +0000, Lakshman Jayaraju wrote:> Hi all, > > Is there any way I can invoke hypercalls from domU PV guest without > modifying kernel source?What are you trying to achieve? What is your end goal?> I mean either from user programs or Loadable kernel modules.In theory root inside a guest should be able to use /proc/xen/privcmd via the libxenctrl library. However IIRC this was restricted to dom0 kernels until very recently. A loadable kernel module should still be able to make a hypercall. There''s nothing special about writing such a kernel module for Xen vs a native kernel module AFAIK. Ian.
Lakshman Jayaraju
2013-Jan-28 11:18 UTC
Re: {Beginner''s question}: Invoking hypercalls from domU PV guest domain
Hi Ian, Am a student. As a part of my thesis, I am doing vulnerability analysis on Xen hypervisor. Am still in initial stage. As per my understanding since am trying to find vulnerability, I have to try from within user boundaries(guest domain). I started with domU PV guest since it has got hypercall interface. Initially I tried in dom0 and I was able to invoke hypercalls successfully by using xenctrl library. But am totally stuck in writing a program inside domU PV guest domain. Am not getting how exactly I can invoke hypercalls in my program. I could find xen.h and other files on my PV guest domain which contains hypercalls and its definitions. But confused of whats next. Do I need to write assembly code using *int 0x82h * in my LKM or any wrappers code available to invoke hypercalls. Kindly suggest me on this. Thanks, Lakshman. -- View this message in context: http://xen.1045712.n5.nabble.com/Beginner-s-question-Invoking-hypercalls-from-domU-PV-guest-domain-tp5713824p5713830.html Sent from the Xen - User mailing list archive at Nabble.com.
Ian Campbell
2013-Jan-29 10:14 UTC
Re: {Beginner''s question}: Invoking hypercalls from domU PV guest domain
On Mon, 2013-01-28 at 11:18 +0000, Lakshman Jayaraju wrote:> I could find xen.h and other files on my PV guest domain which contains > hypercalls and its definitions. But confused of whats next. Do I need to > write assembly code using *int 0x82h * in my LKM or any wrappers code > available to invoke hypercalls.There are wrappers available in the kernel. Your standard tools (e.g. grep) should be able to find them. Ian.