Subject: Re: kernel stack overflow detection
To: None <itojun@iijlab.net>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 06/26/2002 13:55:16
On Wed, Jun 26, 2002 at 08:21:12PM +0900, itojun@iijlab.net wrote:
> >i'll commit this if no one objects.
> >http://www2q.biglobe.ne.jp/~yama/file/kstack/kstack4.diff
> 
> 	i bet you will make it on by default in the future (after testing)
> 	i guess?  am i right?
> 	(there are way too many options, so i would like to see fewer options)

It adds an extra call to mi_switch, which is a performance-sensitive
path. So it should not be made the default, it should at least be
wrapped in DIAGNOSTIC.

It's likely that I will replace the debug register check on i386
with a different mechanism in the future. Like putting an unmapped
page below the kstack, and having TSS handlers (which switch stack)
for double faults.

I don't know if stackswitching for certain traps is possible
on all architectures.

- Frank

-- 
Frank van der Linden                                    fvdl@wasabisystems.com
==============================================================================
Quality NetBSD Development, Support & Service.   http://www.wasabisystems.com/