Re: IPSEC crashes after r253088

From: Maciej Milewski <milu_at_dat.pl>
Date: Sun, 21 Jul 2013 01:04:46 +0200
On 20.07.2013 22: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.
>
>
> 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.
>
I can confirm. I've been hit by that problem on MIPS platform.

-- 
Pozdrawiam,
Maciej Milewski
Received on Sat Jul 20 2013 - 21:04:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:39 UTC