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

[Xen-devel] Print ebx parameter VM syscalls

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Print ebx parameter VM syscalls
From: Int0x82 <int0x82@xxxxxxxxx>
Date: Fri, 19 Feb 2010 14:05:03 +0100
Delivery-date: Fri, 19 Feb 2010 05:05:55 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=7pciFg9bFd15WP9QJNLsJVXN08vgaF3dXT+qKEsSh28=; b=ZfGfYZtFUjP9jvjWNFK3JBXNI8JfHFBumGGXv2GDkWl9AtnkhIXx9UZXHlUI/8fkht BkomD/wDxGiAfrtwCU/nb10GhAPcvwR6bqZr86ryLg+fCIZaryMX5qTvAbUaX4vaf+J0 qyG38YYg8rn8aCOHjE9bDvtSVVtJfFm7KczNM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=VWcCyHolz8e/vFXJFavRW7msvNTpn7Kpn6VVc0mTCkT7z4124AhL5p27GjKeU0qEmJ pXytmKeBtGSRx6zmLzwTvq3ApTZeRIOSyQAngnHSWS7fWTWmOnOfMR7SGNMxALx62xt+ nHdEaYF469LefqHgkwesBbytjOcdzWwXHRmuk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Print ebx parameter VM syscalls, Int0x82 <=