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

@ -48,8 +48,8 @@ ssize_t __zipos_write(struct ZiposHandle *, const struct iovec *, size_t,
int64_t __zipos_lseek(struct ZiposHandle *, int64_t, unsigned) _Hide;
int __zipos_fcntl(int, int, uintptr_t) _Hide;
int __zipos_notat(int, const char *) _Hide;
void *__zipos_mmap(void *, uint64_t, int32_t, int32_t, struct ZiposHandle *,
int64_t) _Hide;
noasan void *__zipos_Mmap(void *, uint64_t, int32_t, int32_t,
struct ZiposHandle *, int64_t) _Hide;
#ifdef _NOPL0
#define __zipos_lock() _NOPL0("__threadcalls", __zipos_lock)