From owner-cvs-all@FreeBSD.ORG Thu Mar 3 22:15:16 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DEFE16A4D0 for ; Thu, 3 Mar 2005 22:15:16 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41D4E43D54 for ; Thu, 3 Mar 2005 22:15:15 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 23998 invoked from network); 3 Mar 2005 22:15:15 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 3 Mar 2005 22:15:14 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j23MEqDw092866; Thu, 3 Mar 2005 17:15:09 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Bill Paul Date: Thu, 3 Mar 2005 15:28:18 -0500 User-Agent: KMail/1.6.2 References: <200503031735.j23HZ5hv094849@repoman.freebsd.org> In-Reply-To: <200503031735.j23HZ5hv094849@repoman.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503031528.18834.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net80211 ieee80211_ioctl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 22:15:16 -0000 On Thursday 03 March 2005 12:35 pm, Bill Paul wrote: > wpaul 2005-03-03 17:35:05 UTC > > FreeBSD src repository > > Modified files: > sys/net80211 ieee80211_ioctl.c > Log: > Recently, it was reported to me that you could provoke a double fault > panic with the NDISulator if you did "ifconfig ndis0 10.0.0.1/24," > whereas "ifconfig ndis0 10.0.0.1/24 up" worked fine. The double fault > was caused by the ifconfig thread running out of kernel stack space. > (This was partly due to the NDIsulator using a couple of big buffers on > the stack, but even after fixing that the double fault persisted.) > > It turns out that ndis_init() is called in both cases, but in the first > case the code path passes through ieee80211_ioctl(), and it turns out > ieee80211_ioctl() consumes a whopping 2400 bytes of stack space. > Apparently, gcc -O2 causes the ieee80211_ioctl_get80211() routine to > be inlined into ieee80211_ioctl(), and for some reason which I do not > fully understand, this causes ieee80211_ioctl() to consume an extra 2K > of stack space. > > To prevent this overly agressive optimization, ieee80211_ioctl_get80211() > is now declared with __attribute__ ((noinline)). With this change, > ieee80211_ioctl() now only reserves about 200 bytes of stack instead of > 2400. Hmm, this might fix the double fault panics with wlan_wep.ko when WITNESS is enabled as well. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org