Closed haraldh closed 3 years ago
I assume that this is just transitional. If keepldr is just an elf loader, the kernel should know its own initial memory size. Right? We should get away from the keepldr passing any information to the guest (besides sallyport).
I assume that this is just transitional. If keepldr is just an elf loader, the kernel should know its own initial memory size. Right? We should get away from the keepldr passing any information to the guest (besides sallyport).
The shim does not really know the code size, nor the exact size of the memory the loader mapped into guest physical memory. Of course, it can assume, it's the known shim size + the code size after parsing the code elf headers to get a guess for the code size.
The shim does not really know the code size, nor the exact size of the memory the loader mapped into guest physical memory. Of course, it can assume, it's the known shim size + the code size after parsing the code elf headers to get a guess for the code size.
Can't it calculate the size by walking the page tables? If I remember correctly there is a present
bit.
The shim does not really know the code size, nor the exact size of the memory the loader mapped into guest physical memory. Of course, it can assume, it's the known shim size + the code size after parsing the code elf headers to get a guess for the code size.
Can't it calculate the size by walking the page tables? If I remember correctly there is a
present
bit.
No, because the page tables are provided by the shim, not the loader and have identity mapping with 1GiB huge pages for simplicity.
No, because the page tables are provided by the shim, not the loader and have identity mapping with 1GiB huge pages for simplicity.
Who decides how much memory keepldr
should allocate? It should be the shim (in the ELF somewhere).
ok, seems we don't need all of this.. will open a new PR with syscall related stuff