Build scatterlist covering a process' text segment?

Arvid Brodin arvid.brodin at enea.com
Mon May 23 19:06:13 EDT 2011


Hi,

How do I build a scatterlist covering the text segment of a process? I have
found (struct task_struct).mm->start_code and ->end_code, that gives the address
(in some - unknown to me - address space) of the text segment. Since my try to
convert these addresses to an sglist:

	sg_init_one(&sg, task->mm->start_code, <length>);

failed miserably, I'm guessing these addresses need to be converted to some
address space compatible with sg_init_one()/sg_set_buf() before use? (I probably
need to search for pages containing these addresses?)


Thanks,
Arvid Brodin
Enea Services Stockholm AB



More information about the Kernelnewbies mailing list