Kernel: Stop eagerly loading entire executables

We were forced to do this because the page fault code would fall apart
when trying to generate a backtrace for a non-current thread.

This issue has been fixed for a while now, so let's go back to lazily
loading executable pages which should make everything a little better.
This commit is contained in:
Andreas Kling 2019-08-15 10:29:44 +02:00
parent eaa9cf58f5
commit 77737be7b3
Notes: sideshowbarker 2024-07-19 12:40:45 +09:00
3 changed files with 0 additions and 7 deletions

View file

@ -109,7 +109,6 @@ CXXFLAGS += -nostdlib -nostdinc -nostdinc++
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/ CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/i686-pc-serenity/ CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/i686-pc-serenity/
DEFINES += -DKERNEL DEFINES += -DKERNEL
DEFINES += -DEXPENSIVE_USERSPACE_STACKS
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
all: $(KERNEL) kernel.map all: $(KERNEL) kernel.map

View file

@ -361,10 +361,6 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
ASSERT(success); ASSERT(success);
} }
#ifdef EXPENSIVE_USERSPACE_STACKS
region->page_in();
#endif
OwnPtr<ELFLoader> loader; OwnPtr<ELFLoader> loader;
{ {
// Okay, here comes the sleight of hand, pay close attention.. // Okay, here comes the sleight of hand, pay close attention..

View file

@ -595,11 +595,9 @@ String Thread::backtrace_impl() const
if (!symbol.address) if (!symbol.address)
break; break;
if (!symbol.ksym) { if (!symbol.ksym) {
#ifdef EXPENSIVE_USERSPACE_STACKS
if (!Scheduler::is_active() && process.elf_loader() && process.elf_loader()->has_symbols()) if (!Scheduler::is_active() && process.elf_loader() && process.elf_loader()->has_symbols())
builder.appendf("%p %s\n", symbol.address, process.elf_loader()->symbolicate(symbol.address).characters()); builder.appendf("%p %s\n", symbol.address, process.elf_loader()->symbolicate(symbol.address).characters());
else else
#endif
builder.appendf("%p\n", symbol.address); builder.appendf("%p\n", symbol.address);
continue; continue;
} }