summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao2018-02-19 01:50:19 -0600
committerJosh Gao2018-02-19 01:50:19 -0600
commitedd28f6edee6577b0c4b0e3d39a08108a326c203 (patch)
treeb1549d50c4d1b26a3a72eab8f2e659a3140ca2ac /debuggerd
parent40ecb9abf2b02f5d1fe571719c566457c56d7cfe (diff)
downloadplatform-system-core-edd28f6edee6577b0c4b0e3d39a08108a326c203.tar.gz
platform-system-core-edd28f6edee6577b0c4b0e3d39a08108a326c203.tar.xz
platform-system-core-edd28f6edee6577b0c4b0e3d39a08108a326c203.zip
debuggerd seccomp: explain why we define PROT_READ/WRITE.
Add a comment explaining why we define PROT_READ/PROT_WRITE, even though a current libminijail supports both cosntants. Bug: http://b/73273658 Test: treehugger Change-Id: I51c1be1b1b569e94dbc9045a90bc28221b7dc9c7
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/seccomp_policy/crash_dump.policy.def8
1 files changed, 7 insertions, 1 deletions
diff --git a/debuggerd/seccomp_policy/crash_dump.policy.def b/debuggerd/seccomp_policy/crash_dump.policy.def
index 9190ed749..2ef31b0b0 100644
--- a/debuggerd/seccomp_policy/crash_dump.policy.def
+++ b/debuggerd/seccomp_policy/crash_dump.policy.def
@@ -33,9 +33,15 @@ rt_sigaction: 1
33rt_tgsigqueueinfo: 1 33rt_tgsigqueueinfo: 1
34 34
35#define PR_SET_VMA 0x53564d41 35#define PR_SET_VMA 0x53564d41
36prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA
37
38#if 0
39libminijail on vendor partitions older than P does not have constants from <sys/mman.h>.
40Define the values of PROT_READ and PROT_WRITE ourselves to maintain backwards compatibility.
41#else
36#define PROT_READ 0x1 42#define PROT_READ 0x1
37#define PROT_WRITE 0x2 43#define PROT_WRITE 0x2
38prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA 44#endif
39 45
40madvise: 1 46madvise: 1
41mprotect: arg2 in PROT_READ|PROT_WRITE 47mprotect: arg2 in PROT_READ|PROT_WRITE