You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As suggested by @Freax13 in PR 467, the following fixes and clean-ups need to be done.
In the current ELF parser implementation, verify_phdr function returns an error when p_vaddr is not aligned. But since spec doesn't guarantee that p_vaddr must be aligned, our ELF parser needs to be fixed. Current WA is to use a custom linker script to align p_vaddr.
Remove the custom linker script for the init and dm once the ELF parser issue is fixed.
When parsing the binary, if p_memsz > p_filesz, the range [p_filesz..p_memsz) needs to be zeroed as per spec. This is usually true for .bss section. But we cannot anonymously map just .bss as the segment may contain other sections like .data. To resolve this issue, extend VMFileMapping::new such that if p_filesz is not a multiple of page size, we should make a private copy of the page using .try_cop_page() and zero out the bytes after p_filesz.
The text was updated successfully, but these errors were encountered:
As suggested by @Freax13 in PR 467, the following fixes and clean-ups need to be done.
In the current ELF parser implementation,
verify_phdr
function returns an error when p_vaddr is not aligned. But since spec doesn't guarantee that p_vaddr must be aligned, our ELF parser needs to be fixed. Current WA is to use a custom linker script to align p_vaddr.Remove the custom linker script for the
init
anddm
once the ELF parser issue is fixed.When parsing the binary, if
p_memsz
>p_filesz
, the range[p_filesz..p_memsz)
needs to be zeroed as per spec. This is usually true for.bss
section. But we cannot anonymously map just.bss
as the segment may contain other sections like.data
. To resolve this issue, extendVMFileMapping::new
such that ifp_filesz
is not a multiple of page size, we should make a private copy of the page using.try_cop_page()
and zero out the bytes afterp_filesz
.The text was updated successfully, but these errors were encountered: