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

why untrusted shared memory must be from the buddy allocator? #40

Open
Peng-Hu opened this issue Jan 22, 2021 · 3 comments
Open

why untrusted shared memory must be from the buddy allocator? #40

Peng-Hu opened this issue Jan 22, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@Peng-Hu
Copy link

Peng-Hu commented Jan 22, 2021

hello,we want to know why untrusted shared memory must be from the buddy allocator, which results in that the data transmitted at one time must be less than or equal to 4MB, and the large-size data that needs to be processed by the eapp must be split for multiple transmission without any sdk support.
Thank you!
hupeng

@Peng-Hu
Copy link
Author

Peng-Hu commented Jan 22, 2021

When setting the untrusted size, there is no check on the upper limit of the size(4MB) in sdk/host/param.h or in driver/utm_init, which causes the driver crash when a large size is allocated for untrusted shared buffer.

@dayeol
Copy link
Contributor

dayeol commented Jan 22, 2021

Thank you for the question. I think we may need an SDK lib for chunking large data.
The reason for using the buddy allocator was because we didn't think that it would be necessary, but we might be able to also support CMA-allocated untrusted buffer by changing the security monitor to be aware of it.

@dayeol dayeol added the help wanted Extra attention is needed label Jan 22, 2021
@Peng-Hu
Copy link
Author

Peng-Hu commented Jan 22, 2021

What changes does SM need to do to support it if we allocate large-size untrusted shared buffer from CMA? We increase the size of malloc_region to 20MB in app.lds to support malloc large size memory in eapp, as a result, the size of EPM is larger than 4MB, which must be allocated from CMA. But we don't see that SM needs to make additional changes to support EPM in CMA?

@Peng-Hu Peng-Hu closed this as completed Jan 22, 2021
@Peng-Hu Peng-Hu reopened this Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants