]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: Use a larger boot stack
authorMark Johnston <markj@FreeBSD.org>
Mon, 24 Jul 2023 22:47:42 +0000 (18:47 -0400)
committerMark Johnston <markj@FreeBSD.org>
Mon, 24 Jul 2023 22:49:36 +0000 (18:49 -0400)
commit789df254cc9e20c860ccc149b94dd1f92843ec9a
treeae300ba6bead1583a79315b5a73b5b79975ca912
parent5b353925ff61b9ddb97bb453ba75278b578ed7d9
amd64: Use a larger boot stack

With sanitizers enabled, it becomes possible to overflow the stack when
only a single page is used.  Follow arm64's example and use the default
kernel stack size instead.  This is a bit wasteful, but without a guard
page, overflow merely corrupts adjacent .bss entries and is thus
difficult to debug.

Note, with a GENERIC kernel we already consume over half of the
available boot stack space, see the review for an example.

Reviewed by: kib
Reported by: Jenkins
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41166
sys/amd64/amd64/genassym.c
sys/amd64/amd64/locore.S