mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Automated rollback of commit 54ac8f86fc
.
PiperOrigin-RevId: 368616441 Change-Id: I6ff53b730b44b5f08986be62b32fda13932ec19a
This commit is contained in:
parent
54ac8f86fc
commit
6a679a407d
|
@ -207,6 +207,17 @@ PolicyBuilder& PolicyBuilder::AllowLlvmSanitizers() {
|
||||||
// https://github.com/llvm/llvm-project/blob/62ec4ac90738a5f2d209ed28c822223e58aaaeb7/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h#L98
|
// https://github.com/llvm/llvm-project/blob/62ec4ac90738a5f2d209ed28c822223e58aaaeb7/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h#L98
|
||||||
AllowMmap();
|
AllowMmap();
|
||||||
}
|
}
|
||||||
|
if constexpr (sapi::sanitizers::IsTSan()) {
|
||||||
|
AllowMmap();
|
||||||
|
AllowSyscall(__NR_munmap);
|
||||||
|
AddPolicyOnSyscall(__NR_mprotect,
|
||||||
|
{
|
||||||
|
ARG_32(2),
|
||||||
|
BPF_STMT(BPF_AND | BPF_ALU | BPF_K,
|
||||||
|
~uint32_t{PROT_READ | PROT_WRITE}),
|
||||||
|
JEQ32(0, ALLOW),
|
||||||
|
});
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user