mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Fix dynamic binary startup on PPC and newer glibc (> 2.19)
This allows the `_llseek` syscall when it is defined. PiperOrigin-RevId: 331498182 Change-Id: I2760b264e3a82000b38d278a9c280501a3dbc724
This commit is contained in:
parent
21f7373e76
commit
ed0086eb66
|
@ -533,7 +533,11 @@ PolicyBuilder& PolicyBuilder::AllowStaticStartup() {
|
|||
PolicyBuilder& PolicyBuilder::AllowDynamicStartup() {
|
||||
AllowRead();
|
||||
AllowStat();
|
||||
AllowSyscalls({__NR_lseek, __NR_close, __NR_munmap});
|
||||
AllowSyscalls({__NR_lseek,
|
||||
#ifdef __NR__llseek
|
||||
__NR__llseek, // Newer glibc on PPC
|
||||
#endif
|
||||
__NR_close, __NR_munmap});
|
||||
AddPolicyOnSyscall(__NR_mprotect, {
|
||||
ARG_32(2),
|
||||
JEQ32(PROT_READ, ALLOW),
|
||||
|
|
|
@ -86,6 +86,9 @@ std::unique_ptr<Policy> StackTracePeer::GetPolicy(pid_t target_pid,
|
|||
// libunwind
|
||||
.AllowSyscall(__NR_fstat)
|
||||
.AllowSyscall(__NR_lseek)
|
||||
#ifdef __NR__llseek
|
||||
.AllowSyscall(__NR__llseek) // Newer glibc on PPC
|
||||
#endif
|
||||
.AllowSyscall(__NR_mincore)
|
||||
.AllowSyscall(__NR_mprotect)
|
||||
.AllowSyscall(__NR_munmap)
|
||||
|
|
Loading…
Reference in New Issue
Block a user