DynamoRIO / DynamoRIO/dynamorio
Consider using access() or faccessat() to implement drfront_access()
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
Summarising https://codereview.appspot.com/312180043/, a patch proposal that turned into a discussion:
We could reimplement drfront_access() using POSIX access().
Advantage: On Linux, at least, access() checks for a read-only filesystem, SELinux restrictions, and so on, so the current complex, flaky and inefficient implementation could be replaced by something much simpler. (Things not handled correctly by the current implementation include several DynamoRIO processes running as different users and processes with umask 0222.)
Disadvantage: "The check is done using the calling process's real UID and GID, rather than the effective IDs as is done when actually attempting an operation", which is different from the current, documented behaviour. There is also faccessat with AT_EACCESS, which does use effective user and group IDs, but that might not be available everywhere.
Contributor guide
Assessment
This issue has not been assessed yet.