Re: runtimeimage of kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anumula Venkat wrote:
> 
> Can u please tell me where does the kernel stack lie.
> And how to get access to it.
> 
> Regards
> Venkat

I believe the kernel stack for a task is located on either
the page above or the page below the task struct. Well, I
used to believe that. After looking at do_fork() and
sys_clone(), it appears the location of the new stack is
actually being passed into sys_clone() in the pt_regs
argument?!?!? That's very weird; the kernel has to allocate
space for a new task's stack somewhere.

In fact I notice all the sys_*() functions get a pt_regs
argument; where does that come from, what does it mean?
I'm not sufficiently clueful about gas assembler syntax
to have any idea what the code in entry.S (system_call)
is doing.

Can anyone clarify how this works?

Cheers,

-- Joe
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux