On Monday 01 May 2006 17:57, Abhay Raghu wrote:
> i) Can you please explain the difference between PTRACE_SYSCALL and
Download latest man-pages (at least 2.27) and read man 2 ptrace; if something
is not clear, I'll answer to your further doubts.
> ii) This question is related to uml: How do all applications run within a
> single userspace thread?
Doing context switching is fairly easy: with ptrace you change all registers
and so on. I guess you know that, if I'm wrong feel free to ask.
There is a further problem however: different apps have different address
spaces, with different mappings (or different memory images, they're running
different executables with different libraries... there are various way to
To solve this problem, we introduce on the host the SKAS3 patch whihch allows
one process to have multiple address spaces - only one is in use, but via
ptrace(PTRACE_SWITCH_MM) we can replace that one with another one - this is
done by making a pointer in the process descriptor (i.e. current in Linux
kernel code) point to another "mapping set" (called struct mm_struct), so
it's very fast; you must also invalidate the TLB (i.e. the processor caches
of page table entries) like on any "memory context switching", obviously.
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB