DynamoRIO / DynamoRIO/dynamorio

Consider using access() or faccessat() to implement drfront_access()

Open
#2,200 0 comments 0 reactions 0 assignees View on GitHub
OpSys-UNIX
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.