Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageTable is unsafe #70

Open
efenniht opened this issue Jan 7, 2020 · 0 comments
Open

PageTable is unsafe #70

efenniht opened this issue Jan 7, 2020 · 0 comments

Comments

@efenniht
Copy link
Collaborator

efenniht commented Jan 7, 2020

지금의 PageTable은 unsafe합니다. 왜냐면 identity_map 함수를 호출할 때 Hafnium이 배타적으로 소유하는 메모리 영역 (스택, 바이너리, 힙 ..)을 건드리지 않는다는 것을 확인하지 않기 때문입니다.

  • 실제로 몇몇 mapping 주소는 boot parameter나 FDT에서 읽어오는데, 이 주소를 수정하여 Hafnium의 오동작을 일으킬 수 있습니다.
  • VM의 page table을 업데이트하는 것은 비교적 잘 검사하지만, unsafety를 몰아 넣어서 safe API를 만드는 우리의 모토와 부합하지 않습니다.
  • 최신 버전 코드에서는 API에서 더 낮은 추상화 레벨의 페이지 테이블 조작을 하는 것처럼 보입니다. 이것도 리팩토링의 여지가 있습니다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant