Lind-Project / native_client

native_client trusted code base
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Remove NaCl Descs #132

Closed rennergade closed 1 year ago

rennergade commented 1 year ago

This PR finally completes the long awaited task of removing the NaClDesc system from system call pathways. We achieve this by

  1. Reverting the opening/loading of runnable-ld.so from interfacing with RustPOSIX. This isn't done by a syscall and I believe should be done like this regardless. This allows us to not interfere with the Desc system for the loader. This also required reverting the HostDesc calls to their original state.
  2. Remove Descs from all system call pathways ie now NaClSysDup directly calls lind_dup
  3. Update mmap slightly to not use descs. I've also removed the unused pathway for mapping executable code.
  4. Update the VMap so that we can store a Max Protection field, This is either RDWR, or the max protection an fd is opened as (ie if a file is opened as RDONLY the max prot is PROT_READ.
  5. I simplified how stat buffers worked, essentially removing the middle man that nacl was using.
rennergade commented 1 year ago

This is going to fail the CI since its a major revamp and dependent on the other two PRs.