Subject: Re: kernel stack overflow detection
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 06/20/2002 17:40:56
In article <20020621.010308.74163985.yamt@mwd.biglobe.ne.jp>,
YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> wrote:
>From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>> > What's the "/ 2" for?!
>>
>> because the starting part of kernel stack is already
>> used at that time, we can't fill out whole of stack.
>> yes, "/ 2" isn't so right. so it's marked as XXX. ;)
>> I'll change to setup magic before cpu_fork.
>
>i updated patches a bit.
>http://www2q.biglobe.ne.jp/~yama/file/kstack/kstack3.diff
>
>can i commit it?
>(maybe without KSTACK_SAFE part?)
I trap.c:
+#ifdef KSTACK_SAFE
+int kstack_check_dr0_panic;
+#ifdef DDB
+int kstack_check_dr0_debug;
+#endif
+#endif
should be:
+#ifdef KSTACK_SAVE_DR0
me thinks.
christos