Hypercall_page and hypercall interception
Hi everyone,
My name is Thu, and I am currently working on virtualization security using Xen.
I am interested in intercepting hypercalls from DomU, and would like to know if I can do that using the hypercall_page kernel symbol. In other words, I would like to know if I can use it in the same way system call interception is done using the system_call_table.
I'd be happy if you guys can provide me with some tips on how I can intercept hypercalls in Xen.
Thanks a lot for your help and I look forward to hearing from you.
Best,
Thu
--
View this message in context: http://xen.1045712.n5.nabble.com/Hypercall-page-and-hypercall-interception-tp5721422.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
Quoted 10 lines · VirSecExplorer
Hi everyone,
My name is Thu, and I am currently working on virtualization security using Xen.
I am interested in intercepting hypercalls from DomU, and would like to know if I can do that using the
hypercall_pagekernel symbol. In other words, I would like to know if I can use it in the same way system call interception is done using thesystem_call_table.
Quoted 4 lines
I'd be happy if you guys can provide me with some tips on how I can intercept hypercalls in Xen.
Thanks a lot for your help and I look forward to hearing from you.
Are you trying to intercept hypercalls in the guest or hypervisor context?
The hypercall page is in guest context *but* its content is provided by the hypervisor, transparently to the guest, if you want to intercept on the guest end I would recommend you do so at the points which call into the hypercall page, rather than in the hypercall page itself.
The Xen equivalent to the system_call_table is in the hypervisor itself, called, unsurprisingly, hypercall_table.
Note that such interception may not be the best way to achieve your goal. If you tell us what you are actually trying to do perhaps someone can advise on a better way to achieve your end without intercepting.
Ian.
Hi Ian,
Thanks for your reply.
I would like to monitor hypercalls within the guest OS and intercept them to examine the hypercall parameters, before forwarding them to the hypervisor for execution.
Therefore I would really appreciate it if you can provide me with information on how to go about finding the points which call into the hypercall page in the guest OS.
Thank you very much for your assistance and I look forward to hearing from you.
Sincerely Yours,
Thu
Quoted 28 lines · Ian Campbell
Quoted 3 lines · VirSecExplorer
Hi everyone,
My name is Thu, and I am currently working on virtualization security
using
Quoted 3 lines
Xen.
I am interested in intercepting hypercalls from DomU, and would like to
know
Quoted 1 line
if I can do that using the
hypercall_pagekernel symbol. In other words,I
Quoted 1 line
would like to know if I can use it in the same way system call
interception
Quoted 6 lines
is done using the
system_call_table.I'd be happy if you guys can provide me with some tips on how I can intercept hypercalls in Xen.
Thanks a lot for your help and I look forward to hearing from you.
Are you trying to intercept hypercalls in the guest or hypervisor context?
The hypercall page is in guest context *but* its content is provided by the hypervisor, transparently to the guest, if you want to intercept on the guest end I would recommend you do so at the points which call into the hypercall page, rather than in the hypercall page itself.
Quoted 10 lines
The Xen equivalent to the
system_call_tableis in the hypervisor itself, called, unsurprisingly,hypercall_table.Note that such interception may not be the best way to achieve your goal. If you tell us what you are actually trying to do perhaps someone can advise on a better way to achieve your end without intercepting.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Please don't top post.
Quoted 3 lines
Therefore I would really appreciate it if you can provide me with information on how to go about finding the points which call into the hypercall page in the guest OS.
Use a tool such as "grep".
Ian.
Quoted 3 lines · Thu Yein Win
I would like to monitor hypercalls within the guest OS and intercept them to examine the hypercall parameters, before forwarding them to the hypervisor for execution.
Perhaps xentrace is a better way to do this than hacking the guest? AIUI it provides a log of all the hypercalls made by a guest.
Ian.