Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 20 Feb 2003 11:48:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 20 Feb 2003 11:48:16 -0500 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:22793 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Thu, 20 Feb 2003 11:48:05 -0500 Date: Thu, 20 Feb 2003 08:54:55 -0800 (PST) From: Linus Torvalds To: "Martin J. Bligh" cc: Ingo Molnar , Dave Hansen , Zwane Mwaikambo , Chris Wedgwood , Kernel Mailing List , William Lee Irwin III Subject: Re: doublefault debugging (was Re: Linux v2.5.62 --- spontaneous reboots) In-Reply-To: <39710000.1045757490@[10.10.2.4]> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8692 Lines: 171 On Thu, 20 Feb 2003, Martin J. Bligh wrote: > > There are patches in -mjb from Dave Hansen / Ben LaHaise to detect stack > overflow included with the stuff for the 4K stacks patch (intended for > scaling to large numbers of tasks). I've split them out attatched, should > apply to mainline reasonably easily. Ok, the 4kB stack definitely won't work in real life, but that's because we have some hopelessly bad stack users in the kernel. But the debugging part would be good to try (in fact, it might be a good idea to keep the 8kB stack, but with rather anal debugging. Just the "mcount" part should do that). A sorted list of bad stack users (more than 256 bytes) in my default build follows. Anybody can create their own with something like objdump -d linux/vmlinux | grep 'sub.*$0x...,.*esp' | awk '{ print $9,$1 }' | sort > bigstack and a script to look up the addresses. That ide_unregister() thing uses up >2kB in just one call! And there are several in the 1.5kB range too, with a long list of ~500 byte offenders. Yeah, and this assumes we don't have alloca() users or other dynamic stack allocators (non-constant-size automatic arrays). I hope we don't have that kind of crap anywhere.. Linus ----- 0xc02ae062 : sub $0x8c4,%esp 0xc010535d : sub $0x5b0,%esp 0xc0326a53 : sub $0x590,%esp 0xc0106156 : sub $0x554,%esp 0xc0176150 : sub $0x4b4,%esp 0xc0105fb8 : sub $0x4ac,%esp 0xc035935e : sub $0x398,%esp 0xc035986d : sub $0x394,%esp 0xc0334b85 : sub $0x37c,%esp 0xc0334a97 : sub $0x37c,%esp 0xc02fbc74 : sub $0x32c,%esp 0xc0211b2a : sub $0x314,%esp 0xc034be58 : sub $0x2f0,%esp 0xc0264406 : sub $0x2d8,%esp 0xc02fcdde : sub $0x2c8,%esp 0xc01dbd6b : sub $0x2bc,%esp 0xc0329c6e : sub $0x298,%esp 0xc02a218f : sub $0x294,%esp 0xc01c8457 : sub $0x294,%esp 0xc0327ecc : sub $0x290,%esp 0xc01d781f : sub $0x290,%esp 0xc01c8e56 : sub $0x280,%esp 0xc0330802 : sub $0x27c,%esp 0xc03304af : sub $0x27c,%esp 0xc01ea4c9 : sub $0x27c,%esp 0xc029b57c : sub $0x260,%esp 0xc020a9df : sub $0x25c,%esp 0xc0267205 : sub $0x244,%esp 0xc01d0ac8 : sub $0x240,%esp 0xc01e137a : sub $0x23c,%esp 0xc01bd38c : sub $0x234,%esp 0xc01a5fa4 : sub $0x230,%esp 0xc01fe813 : sub $0x22c,%esp 0xc031f24d : sub $0x21c,%esp 0xc02b4d6f : sub $0x21c,%esp 0xc024adfb : sub $0x218,%esp 0xc02b4cac : sub $0x210,%esp 0xc01ebf96 : sub $0x210,%esp 0xc020b2f0 : sub $0x208,%esp 0xc01fe58d : sub $0x208,%esp 0xc0529e98 : sub $0x204,%esp 0xc038efed : sub $0x1f8,%esp 0xc038b462 : sub $0x1f8,%esp 0xc01fef81 : sub $0x1f8,%esp 0xc038df7f : sub $0x1e4,%esp 0xc0325539 : sub $0x1e0,%esp 0xc01d9328 : sub $0x1cc,%esp 0xc01ffb15 : sub $0x1c4,%esp 0xc01ffa03 : sub $0x1c4,%esp 0xc01c43b6 : sub $0x1c4,%esp 0xc02f6770 : sub $0x1c0,%esp 0xc052a2c7 : sub $0x1bc,%esp 0xc03511c9 : sub $0x1bc,%esp 0xc01a54f8 : sub $0x1b4,%esp 0xc052a0a1 : sub $0x1ac,%esp 0xc02e99f5 : sub $0x19c,%esp 0xc0320fb0 : sub $0x198,%esp 0xc0171860 : sub $0x198,%esp 0xc0155ad4 : sub $0x194,%esp 0xc01b3bea : sub $0x18c,%esp 0xc01b2699 : sub $0x18c,%esp 0xc01b347d : sub $0x17c,%esp 0xc01d71e3 : sub $0x178,%esp 0xc01b333d : sub $0x178,%esp 0xc01b35ca : sub $0x174,%esp 0xc02873a3 : sub $0x16c,%esp 0xc01583a5 : sub $0x158,%esp 0xc033e177 : sub $0x154,%esp 0xc02f13d9 : sub $0x154,%esp 0xc017d267 : sub $0x150,%esp 0xc01f048d : sub $0x148,%esp 0xc01b28aa : sub $0x148,%esp 0xc036d0e8 : sub $0x144,%esp 0xc01d4115 : sub $0x144,%esp 0xc032fec8 : sub $0x140,%esp 0xc0286167 : sub $0x13c,%esp 0xc019608f : sub $0x13c,%esp 0xc0174db5 : sub $0x13c,%esp 0xc03b5ba4 : sub $0x138,%esp 0xc035c698 : sub $0x134,%esp 0xc02f66fe : sub $0x134,%esp 0xc01b2ed9 : sub $0x134,%esp 0xc0172105 : sub $0x134,%esp 0xc02df535 : sub $0x130,%esp 0xc02d8097 : sub $0x130,%esp 0xc034d3db : sub $0x12c,%esp 0xc032e77a : sub $0x12c,%esp 0xc0308874 : sub $0x12c,%esp 0xc01d4c5c : sub $0x12c,%esp 0xc034d2a5 : sub $0x128,%esp 0xc01e148f : sub $0x128,%esp 0xc01d9c88 : sub $0x128,%esp 0xc0325433 : sub $0x124,%esp 0xc0321351 : sub $0x124,%esp 0xc02f4c26 : sub $0x124,%esp 0xc0242307 : sub $0x124,%esp 0xc01e8aff : sub $0x124,%esp 0xc01cc029 : sub $0x124,%esp 0xc01cbfab : sub $0x124,%esp 0xc01cbf2d : sub $0x124,%esp 0xc01cbeaf : sub $0x124,%esp 0xc01cbe31 : sub $0x124,%esp 0xc017c649 : sub $0x124,%esp 0xc016a6b5 : sub $0x124,%esp 0xc01e37ef : sub $0x120,%esp 0xc0198244 : sub $0x120,%esp 0xc016a969 : sub $0x120,%esp 0xc0257e97 : sub $0x11c,%esp 0xc024263a : sub $0x11c,%esp 0xc01e3118 : sub $0x11c,%esp 0xc035c92a : sub $0x118,%esp 0xc031c91e : sub $0x118,%esp 0xc02ee068 : sub $0x118,%esp 0xc02551f0 : sub $0x118,%esp 0xc0241aab : sub $0x118,%esp 0xc016adc3 : sub $0x118,%esp 0xc02deecd : sub $0x114,%esp 0xc02c05c8 : sub $0x114,%esp 0xc020c619 : sub $0x114,%esp 0xc0203c55 : sub $0x114,%esp 0xc012a88b : sub $0x114,%esp 0xc052aeea : sub $0x110,%esp 0xc01a059f : sub $0x110,%esp 0xc01719cf : sub $0x110,%esp 0xc02efd9b : sub $0x10c,%esp 0xc02550e0 : sub $0x10c,%esp 0xc01d2ab5 : sub $0x10c,%esp 0xc01898b5 : sub $0x10c,%esp 0xc024839d : sub $0x108,%esp 0xc029ac87 : sub $0x100,%esp 0xc01beba6 : sub $0x100,%esp - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/