* Print ebx parameter VM syscalls
@ 2010-02-19 13:05 Int0x82
0 siblings, 0 replies; only message in thread
From: Int0x82 @ 2010-02-19 13:05 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1176 bytes --]
My mission is intercept VM syscall insmod (sys_init_module) from hypervisor.
I've dirty xen code to try, specifically in do_guest_trap function in
arch/x86/traps.c Xen file. In this function I've added this small part of
code:
unit32_t a;
if (v->domain->domain_id != 0) { /* if domain is not Dom0 */
a=regs->eax;
if (a == 128) {
printk("I've intercepted sys_init_module");
}
}
In this way I'm able to intercept the syscall sys_init_module (number 128)
from any DomU, but my problem now is to intercept the insmod parameter and
print it with printk.
I've tried to assign a
char __user *myvar = (char __user *)regs->ebx
but I can't print it with
printk("%s",myvar)
This is what happen: when I start my domU and happen an insmod in boot time,
my dom0 reboots itself.
Is it true that parameter of my syscall is in regs->ebx register?? What is
the way to print it in human readable (for example if in DomU I print in
shell "insmod mymodule" I'd like print "mymodule" from hypervisor, not the
hex value like 0804b018, but the string).
Can you help me? I'd like only print insmod parameter. I use 3.2.1 xen +
linux-2.6.18-xen.hg.
Thanks a lot.
Elena
[-- Attachment #1.2: Type: text/html, Size: 1378 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-19 13:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-19 13:05 Print ebx parameter VM syscalls Int0x82
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).