]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix stack grow for init.
authorKonstantin Belousov <kib@FreeBSD.org>
Thu, 8 Aug 2019 16:48:19 +0000 (16:48 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 8 Aug 2019 16:48:19 +0000 (16:48 +0000)
commit10ae16c7fef61f980bd8883564c2ce02be29ae94
treea1781a8e2a5d86147bc75e15ebd8701041c5fc94
parentb706be23b495ad8aed1cefdcf7cfdece305f8ed1
Fix stack grow for init.

During early stages of kern_exec(), including strings copyout,
p_textvp for init is NULL.  This prevented stack grow from working for
init execution.

Without stack gap enabled, initial stack segment size is enough for
strings passed by kernel to init.  With the gap enabled, the used
address might fall out of the initial segment, which kills init.

Exclude initproc from the check for contexts which should not cause
stack grow in the target map.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/vm/vm_map.c