From owner-freebsd-current@FreeBSD.ORG Tue Jul 23 12:03:08 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) by hub.freebsd.org (Postfix) with ESMTP id C2881537; Tue, 23 Jul 2013 12:03:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 9B02920FD; Tue, 23 Jul 2013 12:03:07 +0000 (UTC) Message-ID: <51EE7024.5040706@FreeBSD.org> Date: Tue, 23 Jul 2013 15:59:32 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: IPSEC crashes after r253088 References: <20130721054323.915f865769e6042c7dc62d08@tackymt.homeip.net> <51EE309D.2030106@FreeBSD.org> <51EE68D8.9020603@freebsd.org> In-Reply-To: <51EE68D8.9020603@freebsd.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: George Neville-Neil , Taku YAMAMOTO , freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 12:03:08 -0000 On 23.07.2013 15:28, Andre Oppermann wrote: > On 23.07.2013 09:28, Andrey V. Elsukov wrote: >> On 21.07.2013 00:43, Taku YAMAMOTO wrote: >>> After r253088, systems with IPSEC and KSTACK_PAGES < 4 crashes on >>> booting into multi-user mode. >>> >>> The crash is due to sysctl -a in /etc/rc.d/initrandom ended up with >>> kernel stack overflow. >> >>> where type is struct ipsecstat which is 12560 bytes of size (larger than >>> 3 pages) of size when processing net.inet.ipsec.ipsecstats. >> >> Hi, >> >> Only few fields of struct ipsecstat is used, the rest fields are never >> updated. We can split it to several structures, or just remove unused >> fields. What is better? > > Not storing it on the stack? It seems that only about 120 bytes are used from all 12 Kbytes. The old ipsecstat structure was concatenated with newipsecstat some time ago. And in fact, only fields of newipsecstat are used. I see no sense to just waste 12*ncpu Kbytes of memory. -- WBR, Andrey V. Elsukov