Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Consider whether tracking of VMAs can be removed from PAL altogether #1131

Closed
thomasknauth opened this issue Nov 6, 2019 · 1 comment
Closed

Comments

@thomasknauth
Copy link
Contributor

https://github.com/oscarlab/graphene/blob/e8ba52af50e076eb83f67fab6d41f1bdae17c21d/Pal/src/host/Linux-SGX/enclave_pages.c#L17

Relevant blurb from Slack:

I am thinking whether it's actually necessary to keep this VMA list. We can probably just track a few mappings like the PAL area and the exec area. The library OS has already tracked the VMA list.
3:10 PM
Assuming that the library OS has tracked the VMA list correctly, why don't we just give the library OS whatever addresses it asked for?
3:13 PM
The only reason to track VMAs in the PAL is to support DkVirtualMemoryAlloc(NULL, ...), which we no long do anymore.
3:13 PM
Any thought?

Michał Kowalczyk 3:14 PM
sounds good, but I haven't looked at this part of graphene for quite some time, so I'm not sure whether there aren't any problems with this approach (edited) 

dimakuv 3:46 PM
+1 to @chiache's idea of removing this VMA tracking at the PAL level.
3:47 PM
Indeed, all DkVirtualMemoryAlloc() invocations from LibOS already specify the address.
3:47 PM
However, what happens to malloc() which we have in some places in the Linux-SGX PAL?
@mkow mkow changed the title Consider whether tracking of VMAs can be removed from PAL altogether. Consider whether tracking of VMAs can be removed from PAL altogether Jul 12, 2021
@dimakuv
Copy link

dimakuv commented Jul 14, 2021

This is a duplicate of some other issues (e.g. gramineproject/gramine#50), so closing this.

@dimakuv dimakuv closed this as completed Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants