creating processes in kernel mode using modules at runtime.
As per my understanding to create a process/thread we can use fork()/do_fork()/clone(), based on the flags provided to these funcitons the child process can access the parent resources.
usually to create a thread we use CLONE_KERNEL as flags, where child process can use parent file descriptors, files, memory mapping etc...
1) what are the flags we need, if we want to create a new process which is independent of parent process?
Is there any limitation in creating number of processes in kernel mode?
2) In case if a module consists of two functions which are written in such a way that those are using global variables and if we want to generate two independent processes from these functions, what is the expected behavior?
a) How about address space of these two processes?
b) In run time whether changes to global variables in one process will be reflected in other process?
|All times are GMT -5. The time now is 06:47 AM.|