Hi all. Does anyone know how to get all the information a pt_regs structure (as parameter for the sys_clone() system call) must contain? I know that this structure contains the state of the user space processes just before doing the system call, but how to fill it within kernel mode? I suppose there exists a function or a macro that returns such a struct for the current process, but all my efforts searching for something like that were without success so far. Calling sys_clone() from within the kernel mode makes this neccessary I think. In addition I'm interested in something like a specification for linux system calls in general. For example how should I know how sys_clone expects the child stack to be set up and so on. Is there such a document? After all the glibc developer suceeded implementing all this, so how did they know how to do it? :) Thank you all in advance. Regards, E.X.
Attachment:
signature.asc
Description: This is a digitally signed message part