de-referencing l4lx linear addresses
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Mon Jul 11 21:59:25 CEST 2005
On Mon Jul 11, 2005 at 12:17:03 -0400, Andrew Davenport wrote:
> I had an idea I wanted to try out: Taking the esp register from the task state,
> then masking off the bits (basically perform the current() macro as the linux
> kernel does) to obtain the address of the task_struct of the currently runnning
In 2.6 the task struct is not on the stack but a structure called
thread_info. One can find the task_struct from the thread_info struct.
> process. I have a stripped down sched.h which contians the declaration of the
> struct task_struct { ... } inside .../fiasco/src/kern (i am modifying
> thread-ipc.cpp). However, the compiler compains that "Struct task struct" is
> undefined.
Well, hard to say. Go the build directory and issue "make thread-ipc.i"
and look at the generated file if the contents are ok. The .i file
contains the contents after cpp went over it.
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list