Re: About Kernel Backtrace

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

 



Hi:

Thank for reply. I have checked the "make menuconfig" in linux 2.4 and
found that the kernel stack is not configurable. I think what you
mentioned is in linux 2.6 kernel.  However, there must be no
difference between 2.6 and 2.4 in irq & softirq context switching if
we use 4k page for softirq stack, am I right?

Another question is how could I enlarge the kernel stack or kernel
backtrace in  linux if we want to backtrace the softirq using the
sysrq key?  I mean in ARM platform, even though I add
-fno-omit-frame-pointer into the Makefile, after pressing sysrq+t key,
the handler just print out two-level backtrace. I think that the first
one was due to exception trigger by sys-rq handler and is of no use,
so I just got backtrace of one-level.It is not enough to trace the
kernel path. Is there any misconfiguration in my kernel debugging
environment or it is correct since we have many context switching and
the frame pointer in kernel stack was corrupted?
ps. I have enabled the CONFIG_FRAME_POINTER in kernel.

Thanks.






On 3/5/07, Rajat Jain <rajat.noida.india@xxxxxxxxx> wrote:
> I am debugging a network driver bug in a platform with ARM 9 processor, and
> putting my debgging code, that is BUG() in somewhere. However, I have
> several questions about Kernel Stack when the kernel path is in softirq.
> After reading the chpater 3 in Understanding the Linux Kernel book. I
> realize that Kernel stack should be located within the the process desriptor
> structure

Not really - the process descriptor (task_struct) USED TO reside at
the end of kernel mode stack. But these days, a smaller struct
thread_info resides at the end of kernel stack (Again, stack is not
"located" within thread_info or task_struct)

> when the user mode process is calling the system call. However,
> there are not any descriptions about where the ISR and SoftIRQ kernel stack
> are. Could you please give me a clue to the interrupt and ISR context swtich
> in kernel mode?

If you've configured your kernel to have a stack size of 2 pages
(which is standard) then your ISRs and softirqs etc will use the same
kernel mode stack. However, if you have configured the kernel stack to
be 1 page, then there will be a separate per CPU stack which will be
shared by all ISRs

Thanks,

Rajat


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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