qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] How to hook syscall in guest OS?
@ 2009-01-27 23:33 Antonio Ricci
  0 siblings, 0 replies; 2+ messages in thread
From: Antonio Ricci @ 2009-01-27 23:33 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

Hi all,

i want to know if is it possible to intercept syscall's entry point and exit
point for both  Linux and Windows guest operating system in Qemu from the
host Operating System. If is it possible how can I do it?

Thanks in advance for help

Best Regards

-- 
Antonio
MSN: ricciantonio@hotmail.it
Skype: tonyr81fg
Linux Member #374272
*********************************************************************
What is the difference between Jurassic Park and Microsoft?
One is an over-rated high tech theme park based on prehistoric information
and populated mostly by dinosaurs, the other is a Steven Spielberg movie.
*********************************************************************
There are only 10 types of people in this world:
those who understand binary, and those who don't.
*********************************************************************

[-- Attachment #2: Type: text/html, Size: 1108 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] How to hook syscall in guest OS?
       [not found] <20090127233504.6299gmx1@mx040.gmx.net>
@ 2009-01-28  8:10 ` Clemens Kolbitsch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Kolbitsch @ 2009-01-28  8:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: ricciantonio


> Hi all,
>
> i want to know if is it possible to intercept syscall's entry point and
> exit point for both  Linux and Windows guest operating system in Qemu from
> the host Operating System. If is it possible how can I do it?
>
> Thanks in advance for help
>
> Best Regards

Hi Antonio,

I'm not sure if there is an easier way, but back when Qemu still had TB code 
together with dyn_gen, it was very easy to insert a function call (i.e. a 
hook) into the code of the "int" and "sysenter" code blocks.

Using this hook, you can use the registers, etc. to see if it was a system 
call. I'm not sure how it works with the current intermediay code generation, 
but maybe this hint can guide you into a direction that might work ;-)

Cheers,
Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-28  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 23:33 [Qemu-devel] How to hook syscall in guest OS? Antonio Ricci
     [not found] <20090127233504.6299gmx1@mx040.gmx.net>
2009-01-28  8:10 ` Clemens Kolbitsch

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).