[compiler-rt] [sanitizer] Disable writes to log files for binaries in a secure context. (PR #92593)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 09:54:19 PDT 2024
================
@@ -518,6 +518,12 @@ bool IsStateDetached(int state) {
return state == PTHREAD_CREATE_DETACHED;
}
+# if !SANITIZER_LINUX
----------------
fmayer wrote:
Wouldn't it be easier to put all code here, and make it:
```
bool ShouldTreatRuntimeSecurely() {
#ifdef SANITIZER_LINUX
if (&getauxval)
return getauxval(/* AT_SECURE */ 23) != 0;
#endif
return getuid() == geteuid() && getgid() == getegid();
}
```
https://github.com/llvm/llvm-project/pull/92593
More information about the llvm-commits
mailing list