linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Regarding getpid
@ 2006-12-12  4:26 Krishnappa Abhijith-A21204
  2006-12-12  9:49 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Krishnappa Abhijith-A21204 @ 2006-12-12  4:26 UTC (permalink / raw)
  To: user-mode-linux-devel


[-- Attachment #1.1: Type: text/plain, Size: 233 bytes --]

Hi ,
            "Process system calls must be nullified in the host, and
this is done by converting them into getpid. "
How is system calls  are nullified by converting them to getpid() ?
 
Pls let me know.
 
Regards,
Abhi

[-- Attachment #1.2: Type: text/html, Size: 1227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Regarding getpid
  2006-12-12  4:26 [uml-devel] Regarding getpid Krishnappa Abhijith-A21204
@ 2006-12-12  9:49 ` Geert Uytterhoeven
  2006-12-12 10:12   ` Krishnappa Abhijith-A21204
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2006-12-12  9:49 UTC (permalink / raw)
  To: Krishnappa Abhijith-A21204; +Cc: User-mode Linux Kernel Development

On Tue, 12 Dec 2006, Krishnappa Abhijith-A21204 wrote:
>             "Process system calls must be nullified in the host, and
> this is done by converting them into getpid. "
> How is system calls  are nullified by converting them to getpid() ?

Instead of calling the actual system call, it just calls getpid(). I.e. the
actual system call is not executed, and getpid() is more or less a NOP.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Regarding getpid
  2006-12-12  9:49 ` Geert Uytterhoeven
@ 2006-12-12 10:12   ` Krishnappa Abhijith-A21204
  2006-12-12 14:46     ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Krishnappa Abhijith-A21204 @ 2006-12-12 10:12 UTC (permalink / raw)
  To: Geert Uytterhoeven

Ok Thanks. So actually getpid() doesn't cause mode switch.
But is it mandatory to execute  getpid()? If yes why

Regards,
Abhi

-----Original Message-----
From: geert@sonytel.be [mailto:geert@sonytel.be] On Behalf Of Geert
Uytterhoeven
Sent: Tuesday, December 12, 2006 3:19 PM
To: Krishnappa Abhijith-A21204
Cc: User-mode Linux Kernel Development
Subject: Re: [uml-devel] Regarding getpid

On Tue, 12 Dec 2006, Krishnappa Abhijith-A21204 wrote:
>             "Process system calls must be nullified in the host, and 
> this is done by converting them into getpid. "
> How is system calls  are nullified by converting them to getpid() ?

Instead of calling the actual system call, it just calls getpid(). I.e.
the actual system call is not executed, and getpid() is more or less a
NOP.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker.
But when I'm talking to journalists I just say "programmer" or something
like that.
							    -- Linus
Torvalds

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Regarding getpid
  2006-12-12 10:12   ` Krishnappa Abhijith-A21204
@ 2006-12-12 14:46     ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2006-12-12 14:46 UTC (permalink / raw)
  To: Krishnappa Abhijith-A21204; +Cc: Geert Uytterhoeven, user-mode-linux-devel

On Tue, Dec 12, 2006 at 06:12:24PM +0800, Krishnappa Abhijith-A21204 wrote:
> Ok Thanks. So actually getpid() doesn't cause mode switch.

Sure it does.  Any system call does.

> But is it mandatory to execute  getpid()? If yes why

That's the way ptrace traditionally works.  PTRACE_SYSEMU, which came later
avoids the need to invoke some system call.  It just nullifies the system
call in the expectation that the tracer will emulate it.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2006-12-12 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12  4:26 [uml-devel] Regarding getpid Krishnappa Abhijith-A21204
2006-12-12  9:49 ` Geert Uytterhoeven
2006-12-12 10:12   ` Krishnappa Abhijith-A21204
2006-12-12 14:46     ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox