Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 05:43:23 +0900
From:      Taku YAMAMOTO <taku@tackymt.homeip.net>
To:        freebsd-current@freebsd.org
Subject:   IPSEC crashes after r253088
Message-ID:  <20130721054323.915f865769e6042c7dc62d08@tackymt.homeip.net>

next in thread | raw e-mail | index | archive | help
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
 | __ <     <taku@tackymt.homeip.net>

      - A chicken is an egg's way of producing more eggs. -



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130721054323.915f865769e6042c7dc62d08>