Skip to content

fix(libkernel): keep a protected host stack's guard page, and protect the Linux main stack - #6443

Merged
adriadam10 merged 12 commits into
boykopovar:mainfrom
EagleBearerYS:fix/libkernel-host-stack-guard-page
Oct 19, 2026
Merged

adriadam10 merged 12 commits into
boykopovar:mainfrom
EagleBearerYS:fix/libkernel-host-stack-guard-page

Conversation

@EagleBearerYS

@EagleBearerYS EagleBearerYS commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Follow-up to #5703, which commits the reserved pages of a host stack before protecting it on Windows. This closes the three gaps that commit leaves.

1. Windows: the guard page. Committing every reserved page of the range also cleared the guard page's PAGE_GUARD:

  • the thread had no guard and no reserve left, so an overflow ran into whatever lay below the stack instead of raising a stack overflow;
  • the stack limit in the thread's TEB, which only a guard page hit moves, stopped following the stack;
  • a range that began inside the reserve left the reserved pages below it with no guard above them, so the stack could no longer grow into them.

A protect now leaves the guard page and the reserved pages below it as they are, and commits and protects only what lies above them. Reserved pages above the guard are still committed first, and the protection is recorded for the whole range. This also drops the commit charge #5703 adds, up to the whole reserve of each thread.

Resident Evil Village (PPSA01556, 01.210.000) does this at startup: thread 23012 protects its whole 0x210000-byte host stack with 0xc2 while its lowest 0xd000 bytes are still reserved, so with #5703 alone that thread loses its guard page. A trace of every protect that overlaps a thread's own stack, on main 0b6d033 with #5703's commit:

[stack-protect] thread 23012 (stack 0x176b40000-0x176d50000): guest-stack protect 0x176b40000+0x210000 prot 0xc2, guest stack 0x176b40000-0x176d50000, own stack, reserved bytes committed 0xd000

The other nine protect part of their own stack that is already committed.

2. Windows: the bottom of the reserve. HotSpot makes its stack guard zones with a read/write protect of the lowest pages of a thread's stack, then PROT_NONE. On native Windows it commits them there (os::pd_create_stack_guard_pages, then os::guard_memory, in OpenJDK's os_windows.cpp). Under change 1 alone such a protect would only be recorded: the pages would stay reserved, so they couldn't be written after the read/write protect.

  • A protect of reserved pages that starts at the bottom of the reserve and stops short of the guard page is still committed and protected, as fix(libkernel): commit a reserved host stack before protecting it #5703 does. The guard page and the reserve above it stay as they are, so the stack still grows through the guard down to the zones, and the TEB's stack limit still follows it.
  • Windows moves its guard page down by committing the pages below it as read/write guard pages, whether they were reserved or committed. So the zones hold until the stack grows to within one guard region of them (three 4 KiB pages on GitHub's runners), then the pages the guard reaches come in read/write. It's the same with fix(libkernel): commit a reserved host stack before protecting it #5703's commit; the test pins both halves, and the debt file records it.

3. Linux: the main thread's stack. sceKernelIsStack reports the range pthread_getattr_np gives, which for the main thread is sized by RLIMIT_STACK and mostly unmapped (0x7fd000 bytes, 0x23000 of them mapped, on glibc 2.39). A protect of that range failed with ENOMEM, and sceKernelMprotect let the exception through, which stopped the title. When the stack branch's mprotect fails with ENOMEM, the unmapped runs are now mapped read/write in place (MAP_FIXED_NOREPLACE, no swap reserved) and the protection is applied again. The usual call still costs one mprotect.

  • Up to the stack's top. The mapping runs from the bottom of the protect up to the top of the reported stack, not just over the protected pages. Linux won't grow a stack to within its guard gap (1 MiB by default) of a readable mapping below it, so after a read-only protect at the bottom of the stack a deep call above it faulted where the console has stack. The pages are mapped lazily and cost nothing until touched.
  • The range is kept. glibc builds the main thread's range from /proc/self/maps on each call and cuts it at the mapping below the stack, so after the first protect it reported a smaller stack that started above the mapped pages, and a second protect of the same pages failed. Each thread's first queried range is now kept, so the main thread's range is the one from before any protect. A thread's stack never moves, so this changes nothing for other threads.
  • Runs, not pages. Unmapped pages are found one run at a time, with one msync per run instead of one per page. Under ulimit -s unlimited glibc reports the main stack down to the heap (tens of TiB), and a whole-stack protect probed it page by page for hours; it now takes a few dozen calls.

The commits:

  1. fix(libkernel): map the unmapped pages of a host stack before protecting it on Linux (3).
  2. test(libkernel): protect the whole main-thread stack on Linux too.
  3. fix(libkernel): keep a host stack's guard page and reserve when protecting it on Windows (1).
  4. test(libkernel): protect the bottom of a reserved host stack, then make it inaccessible (passes at its own commit: both protects return 0, the guard page stays, and the stack still grows).
  5. fix(libkernel): commit a protect at the bottom of a host stack's reserve (2), with the test's checks that the zone is writable, then inaccessible, and how far it holds.
  6. fix(libkernel): map a host stack's unmapped pages in runs on Linux (3, runs), with an unlimited-stack check.
  7. fix(libkernel): keep a host thread's stack range once queried on Linux (3, the range is kept), with a check that protects the bottom of the main stack twice.
  8. fix(libkernel): map a protected main stack up to its top on Linux (3, up to the top), with read-only and re-protected bottom checks, and the debt entry's Linux sentence.
  9. fix(libkernel): keep the cached host stack range in two scalar thread-locals (3, the range is kept), after a merge of main. Commit 7 kept the range in one 16-byte thread_local std::pair, which GCC stores with an aligned SSE move; in CI's Linux link libkernel.prx's TLS segment isn't 16-byte aligned, so a library that loads libkernel.prx with dlopen got that pair 8 bytes off and faulted on the first store. Two 8-byte thread-locals carry no such alignment.

Scope:

  • Holding a bottom zone exactly as on the console, until the stack touches it, would mean removing Windows' guard page for that thread and keeping the stack limit in its TEB by hand. That trades the host's own overflow detection and the unwinder's invariant for an edge case, and it is fragile when one thread protects another's stack, so it isn't done here. The debt entry says so.
  • Elsewhere below the guard page, the reserved pages take a protection only as the stack grows into them, and then read/write. A protection other than read/write there, PROT_NONE included, doesn't hold, where on the console every page of the reported range takes it; the debt file records this. fix(libkernel): report the precommitted stack of an adopted thread on Windows #5918 reports an adopted thread's committed range instead, which keeps such pages out of the range.
  • A host error while committing, mapping or protecting throws with the host's error code, which the posix mprotect doesn't map to an errno, so FreeBSD's ENOMEM for a failed commit isn't reproduced. Pages committed or mapped before a later step throws stay read/write; nothing rolls them back.
  • On Linux a host thread's reported range also holds its TCB and static TLS, which aren't guarded the way guest threads' host-only pages are.
  • On Linux, pages below a protect of the main stack that doesn't start at the stack's bottom are out of reach, because the stack can't grow through the new mapping; the debt entry says so. Mapping the whole reported range would cover it, but under an unlimited stack limit that range covers the heap's growth space, so it would need a cap on the reported range first.
  • A protect of another guest thread's stack can race that thread's exit, as before this PR.

Tested

  • guest_kernel_stack_protect (core/libs/tests/GuestKernelStackProtect.cpp):
    • Windows:
      • The main thread protects its whole stack (from sceKernelIsStack) with 0xc2. Host threads created with a reserved, uncommitted stack (STACK_SIZE_PARAM_IS_A_RESERVATION) protect their whole stack, and their stack from the middle of the reserve.
      • After each protect, the guard page is still above the reserved pages, the pages above it are writable, the TEB's stack limit is the committed start, and the stack grows through the guard: a recursion two pages below it commits the old guard page, moves the guard down, and moves the stack limit with it. A PROT_NONE protect of the lowest page leaves all of that as it is.
      • The bottom of the reserve: a read/write protect of the lowest 48 KiB makes them writable, and PROT_NONE makes them inaccessible and unreadable. The stack then grows through the guard to one guard region above them: the guard sits right on the zone, the zone is intact, and the stack limit matches. One page further, the guard's lowest page moves into the zone's top page as read/write guard, while the rest of the zone stays inaccessible.
    • Linux: the main thread protects its whole stack with 0xc2 and writes to its lowest page. Three more checks run each in a fresh child, so each starts with an untouched main stack:
      • protect the bottom 64 KiB PROT_NONE, then read/write: sceKernelIsStack reports the same range after each, and writes just above the zone and 256 KiB above it succeed;
      • protect the bottom 64 KiB read-only, then make the same two writes;
      • under an unlimited stack limit, protect the whole reported stack and write its bottom byte within 5 s (skipped where the hard limit isn't unlimited or overcommit is strict).
  • GitHub's runners, on my fork:
    • Commit 5: with commit 4's DirectMemory.cpp, the test fails on Windows in every one of 3 runs, at the check that the read/write-protected zone is writable; with commit 5 it passes 20 of 20 on both (run).
    • Commit 4 passes 20 of 20 on both at its own commit (run).
    • On fix(libkernel): commit a reserved host stack before protecting it #5703's commit alone the test fails on Linux, where the main thread's whole-stack mprotect returns an error, and on Windows at the check that a guard page is still above the reserved pages. With commits 1-3 it passes 20 of 20 on both (run). With commits 1-2 it still fails on Windows at the same guard-page check and passes on Linux; with commit 3, 20 of 20 on both (run).
    • The libc and libkernel suites pass in every build (75 and 143 tests on Linux, 96 and 146 on Windows at the head), apart from guest_kqueue on Windows, which fails on main in the same runs.
    • At the head, on main 92e5041, which has fix(libkernel): commit a reserved host stack before protecting it #5703: with main's DirectMemory.cpp the test fails in every one of 3 runs, on Linux at the main thread's whole-stack protect and on Windows at the check that a guard page is still above the reserved pages. With this PR it passes 20 of 20 on both (run). Commit 4 alone passes 5 of 5 on both (run).
    • The full Build workflow on my fork at the head (run): 1,294 of 1,294 pass on Windows, 485 skipped, all expected by check_skips.py, and the write-watch, relinker and register-context jobs (macOS and Linux) pass.
  • Linux (Ubuntu 24.04, GCC 13.3, CI's configure flags, unprivileged user), commits 6-8, each with the previous commit's code: commit 6's check is still probing when its 5-second alarm fires (exit 142), and with commit 6 it finishes in 25 ms with 32 msync calls; commit 7's check fails at "sceKernelIsStack after a protect must report the same range"; commit 8's two checks die with SIGSEGV at the write just above the zone. Each passes at its own commit, the test passes 10 of 10 at commit 8, and the libc and libkernel suites pass apart from five network tests that need IPv6, which that machine lacks and which fail the same at commit 5.
  • GitHub's runners, commits 6-8 (run): with commit 5's code and the new checks the test fails on Linux, at "sceKernelIsStack after a protect must report the same range"; with commits 6-8 it passes 5 of 5. On Windows, where the new checks don't run, it passes with and without them. The only suite failure is guest_kqueue on Windows, with and without the change.
  • Linux (Ubuntu 24.04, GCC 13.3, CI's configure flags) on commits 1-2, on the branch's earlier base: each builds. With commit 1's code reverted, commit 2's test fails at the whole-stack protect of the main thread (0x7fd000 bytes, 0x23000 mapped) and ctest reports "Subprocess aborted"; with it, it passes 20 of 20.
  • Resident Evil Village with commit 3, on a local test tree whose stack-protect code (AboveStackGuard, CommitReservedPages and DoMprotect's stack branch) is identical to commit 3's; the tree carries other local changes on an older main. NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42; Windows 11 Home 10.0.26300. Resident Evil Village went from the start-up dialogs to the title (0.28 fps) and was held there 5.5 min, with no access violation or stack overflow in any thread. The 17,734-line log has no FATAL or abort() line.
  • PPSA99869: karimibrahim07 ran fix(libkernel): commit a reserved host stack before protecting it #5703's commit (187e5fc) on fix(libkernel): report the precommitted stack of an adopted thread on Windows #5918. Its stack guard zones take the bottom-of-reserve path, which commits and protects them as that commit does: they behave as with fix(libkernel): commit a reserved host stack before protecting it #5703 until the stack grows to within one guard region of them (12 KiB on GitHub's runners). karimibrahim07 then ran commit 5 merged onto main 5d9dcc4 (review): VM creation gets as far as with fix(libkernel): commit a reserved host stack before protecting it #5703, HotSpot commits the main thread's guard zones at the bottom of the reservation, and JNI_CreateJavaVM returns 0; guest_kernel_stack_protect and guest_thread_self pass on that tree.
  • Commit 9, on Linux with CI's Linux job (Ubuntu 24.04, GCC 13.3, CI's configure flags and linker; tests run as root, since that worker couldn't create an unprivileged user), at the head merged with main e1ac330: without it, guest_memory_lifetime fails 5 of 5 ("memory lifetime: child failed during native exit (status=11)", a SIGSEGV in HostStackLimits called from DoMprotect after the child's module loaded libkernel.prx with dlopen), while main passes it 5 of 5. With it, the test passes 10 of 10 and guest_kernel_stack_protect 10 of 10. The libkernel suite passes 10 times under --parallel 4 apart from two tests that fail on main on that machine (a shared-memory test that fails as root, and guest_tcp, which needs IPv6), and the full ctest run (1,328 tests) fails only the tests that fail on main there.
  • GitHub's runners at the head (run): guest_kernel_stack_protect and the guest_thread* and guest_pthread* tests pass 5 of 5 on Windows and on Linux, and guest_memory_lifetime 5 of 5 on Linux (it isn't built on Windows). The libc and libkernel suites pass on Linux. On Windows their only failure is guest_kqueue, which the same verify script fails on a branch without this PR too (run).
  • The full Build workflow on my fork at the head, merged with main 6a32550 (run): 1,366 of 1,366 pass on Windows, guest_kqueue included, and the 505 skipped are all expected by check_skips.py.
  • python3 tools/check_conventions.py --base origin/main: passed.

Checklist

…ing it on Linux

On Linux the guest's main runs on the host main thread's stack, which
the kernel maps only as it grows. sceKernelIsStack reports the whole
range that pthread_getattr_np gives, which is sized by RLIMIT_STACK and
is mostly not mapped yet. A protection of that range failed with ENOMEM,
so mprotect returned EINVAL and sceKernelMprotect stopped the title.

When the stack branch's mprotect fails with ENOMEM, the range's unmapped
pages are now mapped read-write at their own addresses
(MAP_FIXED_NOREPLACE) and the protection is applied again. This matches
how the reserved pages of a host stack are committed on Windows.
ProtectWholeStack also runs on the Linux main thread, whose reported
stack is mostly not mapped yet.
…cting it on Windows

Committing the reserved pages of a host thread's stack before protecting
it, as the stack branch did for a range the arena doesn't own, also
cleared the guard page's PAGE_GUARD. The thread was left with no guard
and no reserve: an overflow ran into whatever lay below the stack instead
of raising a stack overflow, and the stack limit in the thread's TEB,
which Windows moves only when the guard page is hit, stopped following
the stack. A range that began inside the reserve also left the reserved
pages below it with no guard above them, so the stack could no longer
grow into them.

The stack branch now leaves the guard page and the reserved pages below
it as they are, and commits and protects only what lies above them;
reserved pages above the guard are still committed first. The protection
is recorded for the whole range, and a range of only reserved and guard
pages changes nothing on the host. The test protects the main thread's
whole stack and a reserved thread's whole stack and upper part, then
checks that the guard page is still there and that the stack grows
through it, also after a PROT_NONE protect of its lowest page. The debt
file records that those pages come in read/write as the stack grows.
…ke it inaccessible

HotSpot makes its stack guard zones this way: an RW protect of the
lowest 48 KiB of the thread's stack, then PROT_NONE. Both calls succeed,
the guard page stays above them, and the stack still grows through it.
Every case now also checks that the stack limit in the TEB follows the
committed stack.
HotSpot makes its stack guard zones with an RW protect of the lowest
pages of the thread's stack, then PROT_NONE, as it commits them on
native Windows (os::pd_create_stack_guard_pages, then os::guard_memory).
Below a host stack's guard page such a protect was only recorded, so the
pages stayed reserved: they could not be written after the RW protect,
and the zones never held.

A protect of reserved pages that starts at the bottom of the reserve and
stops short of the guard page now commits and protects them. The guard
page and the reserve above the range stay as they are, so the stack still
grows through the guard down to it, and the stack limit in the TEB still
follows the committed stack.

Windows moves the guard down by committing the pages below it as
read/write guard pages, committed or not. The zones therefore hold until
the stack is within one guard region of them (three pages on GitHub's
runners), and the pages the guard reaches then come in read/write. The
test checks both, and the debt entry says so.
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@karimibrahim07, you ran #5703's commit on PPSA99869 (#5918). Could you run this one too, at 5796ddf, when you have a moment? Its guard-zone path at the bottom of a thread's stack commits and protects the zones as #5703 did. What changes is that the guard page and the reserve above the zones now stay, so the zones behave as they did with #5703 until the stack grows to within one guard region of them. A run that gets as far as it did with #5703, or a log line if it doesn't, would confirm that.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 3986 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 5021 core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
docs/dev/debt/libkernel.md
PR 6044 core/libs/tests/GuestKernelStackProtect.cpp
PR 6149 docs/dev/debt/libkernel.md
PR 6446 docs/dev/debt/libkernel.md
PR 6487 core/libs/prx/libkernel/Pthread/src/Thread.cpp
docs/dev/debt/libkernel.md
PR 6510 docs/dev/debt/libkernel.md
PR 6519 docs/dev/debt/libkernel.md
PR 6534 core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/tests/GuestKernelStackProtect.cpp
docs/dev/debt/libkernel.md
PR 6879 core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 6908 docs/dev/debt/libkernel.md
PR 6915 docs/dev/debt/libkernel.md
PR 6936 docs/dev/debt/libkernel.md
PR 6977 docs/dev/debt/libkernel.md
PR 7039 docs/dev/debt/libkernel.md
PR 7049 docs/dev/debt/libkernel.md
PR 7075 docs/dev/debt/libkernel.md
PR 7088 docs/dev/debt/libkernel.md
PR 7105 core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp
docs/dev/debt/libkernel.md
PR 7121 docs/dev/debt/libkernel.md
PR 7129 docs/dev/debt/libkernel.md
PR 7149 core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
docs/dev/debt/libkernel.md
PR 7192 docs/dev/debt/libkernel.md
PR 7201 core/libs/prx/libkernel/DirectMemory/DirectMemory.cpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/tests/GuestKernelStackProtect.cpp
PR 7509 docs/dev/debt/libkernel.md
PR 7565 core/libs/prx/libkernel/Pthread/src/Thread.cpp
docs/dev/debt/libkernel.md
PR 7653 docs/dev/debt/libkernel.md

…s own line

The stack branch now records the reserve and guard below a protected
range with a separate RecordProtection call, and keeps the call that
records the protected range itself as main has it. The ranges recorded
are the same: RecordProtection replaces what it covers, so the two calls
together record the whole requested range, as before. boykopovar#6184 adds a line
next to that call, and the two no longer touch.
…protect entries

The entry now sits with the other sceKernelMprotect entries for
DirectMemory.cpp, before the Windows guest module image protection one,
instead of after the setcontext entry, where boykopovar#5918 adds its own.
MapUnmappedPages probed every 4 KiB page of the protected range with
msync before mapping it. Under an unlimited stack limit the main
thread's reported stack reaches down to the heap, tens of TiB, so a
guest protect over the whole stack ran for hours. Mapped and unmapped
runs are now found by halving the remaining range, and the unmapped
ones are mapped without reserving swap, as the stack itself grows.
glibc reports the main thread's stack as reaching down to the end of
the mapping below it. The pages a protect maps under the main stack
become that mapping, so after the first protect sceKernelIsStack
reported a stack starting above them, and a second protect of the same
pages, such as restoring them to read/write, failed as outside any
stack. Each thread now queries its host stack once, which also stops
every protect on the main thread from reading /proc/self/maps.
A protect below the main thread's stack mapping mapped only the
protected pages. Linux keeps a growing stack one guard gap (1 MiB by
default) above a readable mapping, so after a read-only protect, or a
protect later restored to read/write, at the bottom of the reported
stack the stack could no longer grow into the megabyte above it and a
deep enough call faulted where the console has stack pages. The pages
between the protect and the top of the stack are now mapped as well,
so the stack never has to grow past them.

@karimibrahim07 karimibrahim07 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EagleBearerYS here's PPSA99869 with this PR. Head f697e1a41 merged onto main 5d9dcc42d (clean merge; it also merges cleanly with #6534). Windows 11 Pro (26300), Ryzen 5 3600, RTX 3060, WinLibs GCC 15.2.0 r7, Ninja Release. Same setup as in #5918 (--windows --to-intel --trap-sdk-syscall-stubs --registry). Two runs:

  • VM creation gets as far as with #5703. HotSpot commits the main thread's guard zones at the bottom of the reservation: DONE: Native RW memory commit addr=0x400000 bytes=49152 mode=3 errno=0. There is no Attempt to allocate stack guard pages failed, and JNI_CreateJavaVM returned 0.
  • DestroyJavaVM complete, with the usual Attempt to deallocate stack guard pages failed for the main thread (0x400000) and one VM thread. #6534 addresses those.
  • DNS went past the app's 8-second limit in both runs. That isn't this PR: a control run on plain main 5d9dcc42d, same day and machine, times out the same way, while the host resolves example.com fine. With #5703 it passed here two days ago. The LAN row has no helper and wasn't run.

guest_kernel_stack_protect and guest_thread_self pass on this tree.

AI-assisted: yes. I ran the builds, the tests and the title above.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

Thanks for running it on PPSA99869, @karimibrahim07. I've added your run to the Tested section.

EagleBearerYS added a commit to EagleBearerYS/AnyPS5 that referenced this pull request Oct 17, 2026
…-locals

HostStackLimits cached the queried stack range in one thread_local
std::pair. GCC gives that 16-byte object 16-byte alignment and stores it
with movaps. With CI's wild 0.10.0 link, libkernel.prx's PT_TLS segment
starts at an address that is 8 mod 16 (p_align 16), so the pair sits at
TLS offset 0x38. When libkernel.prx is loaded by dlopen its TLS block is
allocated dynamically and the pair ends up 8 bytes off a 16-byte boundary.
The first store then faults: guest_memory_lifetime's child, which loads
libkernel through its module and calls DoMprotect after static
destruction, died with SIGSEGV in HostStackLimits.

Two 8-byte thread-locals carry no 16-byte alignment assumption, so the
cache works with either linker.
@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 18, 2026
@adriadam10
adriadam10 merged commit bebc294 into boykopovar:main Oct 19, 2026
10 checks passed
ycarogabriel-lgtm added a commit to ycarogabriel-lgtm/AnyPS5 that referenced this pull request Oct 19, 2026
main's host stack guard change (boykopovar#6443) calls MapUnmappedPages from the
mprotect path on every non-Windows host, but the function was defined
for Linux only, so libkernel stopped building on macOS. Its one
Linux-specific step is MAP_FIXED_NOREPLACE, which XNU lacks; on macOS
the run is mapped at its address as a hint and given back if the
kernel places it elsewhere, which the halving loop already treats as
an occupied range.

The new main stack checks in guest_kernel_stack_protect re-run the
test through /proc/self/exe; on macOS the child is started from
_NSGetExecutablePath instead. There the main stack is mapped down to
its bottom and its limit cannot be raised to unlimited, so those
checks report themselves skipped, as the test already provides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs libkernel unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants