Re: Kernel stack for a process

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

 



Seth Arnold wrote:
> 
> On Sat, Sep 07, 2002 at 04:03:41AM -0600, Joseph A. Knapka wrote:
> > I also suspect (though I do not know this for certain)
> > that the kernel is smart enough to detect kernel-stack
> > overflow and kill the offending process.
> 
> Nope. Things just start acting funny. :) If you are lucky you get a
> panic soon.
> 
> > trivial: just keep a read-only PTE at the end of the
> > kernel stack, and if anything tries to write
> > there, take a page fault, notice that it's adjacent
> > to the task stack, and kill the process.
> 
> Iterate over $n processes .. where $n is disturbingly large on some
> systems.

Hmm... Why not just look at the stack for "current"?

> I agree it would be a nice debugging option to have :) but
> i doubt it would ever be added to the mainstream kernel.

Probably so, but I'd just like to understand your comment :-)

-- Joe
  "I'd rather chew my leg off than maintain Java code, which
   sucks, 'cause I have a lot of Java code to maintain and
   the leg surgery is starting to get expensive." - Me
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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