From: Mulyadi Santosa <mulyadi.santosa@gmail.com>
To: Jong Chun Park <joumon@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Please discard the previous mail] System call from a Guest Linux
Date: Thu, 4 Feb 2010 02:25:43 +0700 [thread overview]
Message-ID: <f284c33d1002031125j72e8f6e0m5f381166b194c127@mail.gmail.com> (raw)
In-Reply-To: <2e320c2d1002031008y7a01880ay7d17d419b38fb089@mail.gmail.com>
Hi Jong
(Sorry, I am not sure how to politely call a Korean name...so
apologize if it turns out to be rude...)
On Thu, Feb 4, 2010 at 1:08 AM, Jong Chun Park <joumon@gmail.com> wrote:
> after compilation in the guest OS:
> int main() {
> int fd;
> if (access("hello.txt", R_OK) != 0) {
> exit(0);
> }
> fd=open("hello.txt", O_RDONLY);
> close(fd);
> return 0;
> }
>
> For this simple sequence of system calls, acess() -> open() -> close(), QEMU
> goes through disas_insn() and helper_sysenter() more than 3 times. This
> makes me really confused because I believed those should be called 3 times,
> though. It'd be greatly appreciated in advance if someone helps me out this.
> Thanks a lot,
> Jong
Try to run that compile and run that code under strace (without using
Qemu, I mean), then you'll understand how many system calls are
executed.
clues: opening certain libraries, doing mmap() s and so on
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
prev parent reply other threads:[~2010-02-03 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 18:03 [Qemu-devel] System call from a Guest Linux Jong Chun Park
2010-02-03 18:08 ` [Qemu-devel] [Please discard the previous mail] " Jong Chun Park
2010-02-03 19:25 ` Mulyadi Santosa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f284c33d1002031125j72e8f6e0m5f381166b194c127@mail.gmail.com \
--to=mulyadi.santosa@gmail.com \
--cc=joumon@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).