Re: Wanted: simple, safe x86 stack overflow detection

From: Hugh Dickins
Date: Tue Mar 06 2007 - 14:43:58 EST


On Tue, 6 Mar 2007, Chuck Ebbert wrote:
>
> In the 4k/4k stack i386 kernel, is there any fundamental reason it
> can't be 4k/8k? We seem to be mostly hitting problems in overflowing
> the IRQ stack... I think. Overhead would only be 4k per CPU for that.

For all of history prior to 2.6.20, there's been the fundamental
reason that even interrupt stacks need to access current_thread_info,
and that involved the (THREAD_SIZE - 1) mask. But 2.6.20's read_pda
using %gs gets away from that: my guess is that it's now possible
for i386 to use different sized stacks.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/