Re: [PATCH] - Fix stack overflow for large values of MAX_APICS

From: Ingo Molnar
Date: Fri Jun 20 2008 - 06:39:48 EST



* Jack Steiner <steiner@xxxxxxx> wrote:

> physid_mask_of_physid() causes a huge stack (12k) to be created if the
> number of APICS is large. Replace physid_mask_of_physid() with a new
> function that does not create large stacks. This is a problem only on
> large x86_64 systems.

this indeed fixes the crash i reported here:

http://lkml.org/lkml/2008/6/19/98

so i've added both this and the MAXAPICS patch to tip/x86/uv, and will
test it some more. Lets hope it goes all well this time :-)

btw., it would be nice to have an ftrace plugin that prints out the
worst-case stack footprint and generates an assert if we overflow the
stack. -rt's kernel/latency_trace.c used to have that feature. That way
incidents like this would be detected on the spot by -tip's
auto-testing. The code in question is in kernel/trace/ftrace.c (and
other nearby code).

Ingo
--
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/