setup_linux: Improve segments init & add modify_ldt fallback

This commit is contained in:
2025-11-11 00:24:42 -07:00
parent 6c4f332705
commit f18f2a929d
9 changed files with 323 additions and 86 deletions

View File

@@ -98,8 +98,7 @@ bool initializeLdtBitmapLocked() {
if (count > kMaxLdtEntries) {
DEBUG_LOG("setup_darwin: i386_get_ldt returned too many entries (%d), truncating to %d\n", count,
kMaxLdtEntries);
errno = ENOSPC;
return false;
count = kMaxLdtEntries;
}
for (int i = 0; i < count; ++i) {
markLdtEntryUsed(i);