Make ZipOS mmap safer (#735)

- It now runs entirely under __mmi_lock
- Hide implementation strace
This commit is contained in:
Gavin Hayes 2023-02-22 21:57:36 -05:00 committed by GitHub
parent e323527ffa
commit b275e664ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 29 deletions

View file

@ -40,8 +40,6 @@
#define ADDR(x) ((int64_t)((uint64_t)(x) << 32) >> 16)
#define FRAME(x) ((int)((intptr_t)(x) >> 16))
static noasan int Munmap(char *, size_t);
static noasan void MunmapShadow(char *p, size_t n) {
intptr_t a, b, x, y;
KERNTRACE("MunmapShadow(%p, %'zu)", p, n);
@ -115,7 +113,7 @@ static noasan void MunmapImpl(char *p, size_t n) {
}
}
static noasan int Munmap(char *p, size_t n) {
noasan int Munmap(char *p, size_t n) {
unsigned i;
char poison;
intptr_t a, b, x, y;