Re: IPSEC crashes after r253088

From: Andrey V. Elsukov <ae_at_FreeBSD.org>
Date: Tue, 23 Jul 2013 15:59:32 +0400
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
Received on Tue Jul 23 2013 - 10:03:08 UTC

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