summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Yun2018-02-18 19:42:42 -0600
committerJustin Yun2018-02-18 19:42:42 -0600
commit40ecb9abf2b02f5d1fe571719c566457c56d7cfe (patch)
tree31660d1f3584eae301c1957f7f18ad3abb72d7b2 /debuggerd
parent277a95bfef00baffbe66fef10e3828d827e16641 (diff)
downloadplatform-system-core-40ecb9abf2b02f5d1fe571719c566457c56d7cfe.tar.gz
platform-system-core-40ecb9abf2b02f5d1fe571719c566457c56d7cfe.tar.xz
platform-system-core-40ecb9abf2b02f5d1fe571719c566457c56d7cfe.zip
Define PROT_READ and PROT_WRITE when generating the policy files
When generating crash_dump.*.policy, replace PROT_READ and PROT_WRITE to numeric constants to make the policy backward compatible with old libminijail.so. Bug: 73273658 Test: use the new policy in OMR1 devices Change-Id: I936a733340ad4df8aef6562c03eb10c29ffdada2
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/seccomp_policy/crash_dump.arm.policy4
-rw-r--r--debuggerd/seccomp_policy/crash_dump.arm64.policy4
-rw-r--r--debuggerd/seccomp_policy/crash_dump.policy.def2
-rw-r--r--debuggerd/seccomp_policy/crash_dump.x86.policy4
-rw-r--r--debuggerd/seccomp_policy/crash_dump.x86_64.policy4
5 files changed, 10 insertions, 8 deletions
diff --git a/debuggerd/seccomp_policy/crash_dump.arm.policy b/debuggerd/seccomp_policy/crash_dump.arm.policy
index b1f459da8..254330d51 100644
--- a/debuggerd/seccomp_policy/crash_dump.arm.policy
+++ b/debuggerd/seccomp_policy/crash_dump.arm.policy
@@ -26,11 +26,11 @@ rt_sigaction: 1
26rt_tgsigqueueinfo: 1 26rt_tgsigqueueinfo: 1
27prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41 27prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
28madvise: 1 28madvise: 1
29mprotect: arg2 in PROT_READ|PROT_WRITE 29mprotect: arg2 in 0x1|0x2
30munmap: 1 30munmap: 1
31getuid32: 1 31getuid32: 1
32fstat64: 1 32fstat64: 1
33mmap2: arg2 in PROT_READ|PROT_WRITE 33mmap2: arg2 in 0x1|0x2
34geteuid32: 1 34geteuid32: 1
35getgid32: 1 35getgid32: 1
36getegid32: 1 36getegid32: 1
diff --git a/debuggerd/seccomp_policy/crash_dump.arm64.policy b/debuggerd/seccomp_policy/crash_dump.arm64.policy
index e5e7afb2c..9b3ef09ef 100644
--- a/debuggerd/seccomp_policy/crash_dump.arm64.policy
+++ b/debuggerd/seccomp_policy/crash_dump.arm64.policy
@@ -25,11 +25,11 @@ rt_sigaction: 1
25rt_tgsigqueueinfo: 1 25rt_tgsigqueueinfo: 1
26prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41 26prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
27madvise: 1 27madvise: 1
28mprotect: arg2 in PROT_READ|PROT_WRITE 28mprotect: arg2 in 0x1|0x2
29munmap: 1 29munmap: 1
30getuid: 1 30getuid: 1
31fstat: 1 31fstat: 1
32mmap: arg2 in PROT_READ|PROT_WRITE 32mmap: arg2 in 0x1|0x2
33geteuid: 1 33geteuid: 1
34getgid: 1 34getgid: 1
35getegid: 1 35getegid: 1
diff --git a/debuggerd/seccomp_policy/crash_dump.policy.def b/debuggerd/seccomp_policy/crash_dump.policy.def
index b78c94a2b..9190ed749 100644
--- a/debuggerd/seccomp_policy/crash_dump.policy.def
+++ b/debuggerd/seccomp_policy/crash_dump.policy.def
@@ -33,6 +33,8 @@ rt_sigaction: 1
33rt_tgsigqueueinfo: 1 33rt_tgsigqueueinfo: 1
34 34
35#define PR_SET_VMA 0x53564d41 35#define PR_SET_VMA 0x53564d41
36#define PROT_READ 0x1
37#define PROT_WRITE 0x2
36prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA 38prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_VMA
37 39
38madvise: 1 40madvise: 1
diff --git a/debuggerd/seccomp_policy/crash_dump.x86.policy b/debuggerd/seccomp_policy/crash_dump.x86.policy
index b1f459da8..254330d51 100644
--- a/debuggerd/seccomp_policy/crash_dump.x86.policy
+++ b/debuggerd/seccomp_policy/crash_dump.x86.policy
@@ -26,11 +26,11 @@ rt_sigaction: 1
26rt_tgsigqueueinfo: 1 26rt_tgsigqueueinfo: 1
27prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41 27prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
28madvise: 1 28madvise: 1
29mprotect: arg2 in PROT_READ|PROT_WRITE 29mprotect: arg2 in 0x1|0x2
30munmap: 1 30munmap: 1
31getuid32: 1 31getuid32: 1
32fstat64: 1 32fstat64: 1
33mmap2: arg2 in PROT_READ|PROT_WRITE 33mmap2: arg2 in 0x1|0x2
34geteuid32: 1 34geteuid32: 1
35getgid32: 1 35getgid32: 1
36getegid32: 1 36getegid32: 1
diff --git a/debuggerd/seccomp_policy/crash_dump.x86_64.policy b/debuggerd/seccomp_policy/crash_dump.x86_64.policy
index e5e7afb2c..9b3ef09ef 100644
--- a/debuggerd/seccomp_policy/crash_dump.x86_64.policy
+++ b/debuggerd/seccomp_policy/crash_dump.x86_64.policy
@@ -25,11 +25,11 @@ rt_sigaction: 1
25rt_tgsigqueueinfo: 1 25rt_tgsigqueueinfo: 1
26prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41 26prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
27madvise: 1 27madvise: 1
28mprotect: arg2 in PROT_READ|PROT_WRITE 28mprotect: arg2 in 0x1|0x2
29munmap: 1 29munmap: 1
30getuid: 1 30getuid: 1
31fstat: 1 31fstat: 1
32mmap: arg2 in PROT_READ|PROT_WRITE 32mmap: arg2 in 0x1|0x2
33geteuid: 1 33geteuid: 1
34getgid: 1 34getgid: 1
35getegid: 1 35getegid: 1