Hi Joe, I know that pt_regs is like below. But I have to look where the stack is allocated. [Taken from ptrace.h] /* this struct defines the way the registers are stored on the stack during a system call. */ struct pt_regs { long ebx; long ecx; long edx; long esi; long edi; long ebp; long eax; int xds; int xes; long orig_eax; long eip; int xcs; long eflags; long esp; int xss; }; rgds, -Sup % -----Original Message----- % From: kernelnewbies-bounce@nl.linux.org % [mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of Joseph A Knapka % Sent: Wednesday, December 05, 2001 5:35 AM % To: Anumula Venkat; kernelnewbies % Subject: Re: runtimeimage of kernel module % % % 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/ %
------------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:mailadmin@wipro.com and delete this mail from your records. ----------------------------------------------------------------------------------------------------------------------