fix: stacks at top of user VA in own 1 MiB band (guard, heap kept below), 8/16 pages default; kernel fault msg names pid, kind, flags stack overflow; flaky OVERFLOW + spawntest/test-qemu check it
This commit is contained in:
@@ -79,9 +79,12 @@ the slots of the console, log and storage capabilities it was handed, and
|
||||
whether its parent put an arguments page at `ARGS_VA` (NUL-separated, the
|
||||
program's name first; the parent fills a page and `MapPage`s it over, so
|
||||
the program owns it and it goes when the program does). It sits at
|
||||
`0x1000`, above the unmapped page 0; the stack runs from just below the
|
||||
image (`0x10000`) down toward it: 4 pages for system programs unless init's
|
||||
table says more, 8 for apps.
|
||||
`0x1000`, above the unmapped page 0, below the image (`0x10000`). The
|
||||
stack is at the top of the user window (`types::layout`): it ends at
|
||||
`STACK_TOP` (1 GiB) in a 1 MiB band of its own, 8 pages for system
|
||||
programs unless init's table says more, 16 for apps; the rest of the band
|
||||
is never mapped (the heap stays below it), so running off the stack
|
||||
faults there and the kernel prints `stack overflow` with the process id.
|
||||
|
||||
Boot loads only init and storage, both packed into the kernel image (they
|
||||
are what reads the disk, so they cannot come from it). The disk is one ext4
|
||||
|
||||
Reference in New Issue
Block a user