From owner-freebsd-current@FreeBSD.ORG Sat Jul 20 20:43:28 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 696B4AA8 for ; Sat, 20 Jul 2013 20:43:28 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (basalt.tackymt.homeip.net [IPv6:2001:470:fd92:0:20d:61ff:fecc:2253]) by mx1.freebsd.org (Postfix) with ESMTP id 768962FC for ; Sat, 20 Jul 2013 20:43:27 +0000 (UTC) Received: from basalt.tackymt.homeip.net (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id 80F5983C5 for ; Sun, 21 Jul 2013 05:43:26 +0900 (JST) X-Virus-Scanned: amavisd-new at tackymt.homeip.net Received: from localhost by basalt.tackymt.homeip.net (amavisd-new, unix socket) with ESMTP id rZIxb3lA_Ber for ; Sun, 21 Jul 2013 05:43:24 +0900 (JST) Received: from basalt.tackymt.homeip.net (basalt.tackymt.homeip.net [IPv6:2001:470:fd92:0:20d:61ff:fecc:2253]) by basalt.tackymt.homeip.net (Postfix) with ESMTPSA for ; Sun, 21 Jul 2013 05:43:24 +0900 (JST) Date: Sun, 21 Jul 2013 05:43:23 +0900 From: Taku YAMAMOTO To: freebsd-current@freebsd.org Subject: IPSEC crashes after r253088 Message-Id: <20130721054323.915f865769e6042c7dc62d08@tackymt.homeip.net> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.6; i386-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Sat, 20 Jul 2013 20:43:28 -0000 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. The problem is what we have in sys/net/vnet.h: #define SYSCTL_VNET_PCPUSTAT(parent, nbr, name, type, array, desc) \ static int \ array##_sysctl(SYSCTL_HANDLER_ARGS) \ { \ type s; \ CTASSERT((sizeof(type) / sizeof(uint64_t)) == \ (sizeof(VNET(array)) / sizeof(counter_u64_t))); \ COUNTER_ARRAY_COPY(VNET(array), &s, sizeof(type) / sizeof(uint64_t));\ if (req->newptr) \ COUNTER_ARRAY_ZERO(VNET(array), \ sizeof(type) / sizeof(uint64_t)); \ return (SYSCTL_OUT(req, &s, sizeof(type))); \ } \ SYSCTL_VNET_PROC(parent, nbr, name, CTLTYPE_OPAQUE | CTLFLAG_RW, NULL, \ 0, array ## _sysctl, "I", desc) where type is struct ipsecstat which is 12560 bytes of size (larger than 3 pages) of size when processing net.inet.ipsec.ipsecstats. -- -|-__ YAMAMOTO, Taku | __ < - A chicken is an egg's way of producing more eggs. -