summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam <jam@chromium.org>2015-12-29 13:10:52 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-29 21:12:01 +0000
commit93af6debfce796660a58a8681c9da97c5d43638e (patch)
tree66b91dbc4cfae8bc499bfffdef6180929f82313c
parentf03ecfc1e80a0e089b10aa06a769065d22c808cf (diff)
downloadchromium_src-93af6debfce796660a58a8681c9da97c5d43638e.zip
chromium_src-93af6debfce796660a58a8681c9da97c5d43638e.tar.gz
chromium_src-93af6debfce796660a58a8681c9da97c5d43638e.tar.bz2
Fix ARM Chrome not starting up.
The seccomp bpf filter was complaining because getsockopt and setsockopt were being called but they're not allowed. I had fixed this for x86-64 in r360114 but the change should have also allowed ARM. Really, it's anything other than 32 bit Linux (which doesn't have a specific id for these methods). BUG=572795,561803 Review URL: https://codereview.chromium.org/1553543002 Cr-Commit-Position: refs/heads/master@{#367102}
-rw-r--r--sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc2
-rw-r--r--sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
index 6b42d9b..2bf572c 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -231,7 +231,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
return RestrictSocketcallCommand();
#endif
-#if defined(__x86_64__)
+#if !defined(__i386__)
if (sysno == __NR_getsockopt || sysno ==__NR_setsockopt) {
// Used by Mojo EDK to catch a message pipe being sent over itself.
const Arg<int> level(1);
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
index 09a6ac8..32dc4d1 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
@@ -335,7 +335,7 @@ BPF_DEATH_TEST_C(BaselinePolicy,
clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
}
-#if defined(__x86_64__)
+#if !defined(__i386__)
BPF_DEATH_TEST_C(BaselinePolicy,
GetSockOptWrongLevelSigsys,
DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()),