From: Krishnappa Abhijith-A. <abh...@mo...> - 2006-12-12 04:26:44
|
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() ? =20 Pls let me know. =20 Regards, Abhi |
From: Geert U. <ge...@li...> - 2006-12-12 09:49:34
|
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 -- ge...@li... 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 |
From: Krishnappa Abhijith-A. <abh...@mo...> - 2006-12-12 10:39:57
|
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: ge...@so... [mailto:ge...@so...] 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=20 > 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 -- ge...@li... 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 |
From: Jeff D. <jd...@ad...> - 2006-12-12 14:51:09
|
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 |