Chromium Code Reviews| Index: components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc |
| diff --git a/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc b/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc |
| index 53ea1ab94afce7a24bf3ee1f0bf23e8378065cd6..744378ab2544541bd018acdd1d9cd73003987fbd 100644 |
| --- a/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc |
| +++ b/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc |
| @@ -202,7 +202,7 @@ BPF_DEATH_TEST_C(NaClNonSfiSandboxTest, |
| #if defined(OS_NACL_NONSFI) |
| BPF_DEATH_TEST_C(NaClNonsfiSandboxTest, |
| - socketpair, |
| + socketpair_af_unix_disallowed, |
| DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), |
| nacl::nonsfi::NaClNonSfiBPFSandboxPolicy) { |
| int tmp_fds[2]; |
| @@ -229,6 +229,19 @@ BPF_TEST_C(NaClNonSfiSandboxTest, |
| } |
| #endif |
| +// On arm and x86_64 the argument to socketpair are passed in registers |
|
Mark Seaborn
2015/05/28 08:44:10
Nit: "arguments ... are"
|
| +// so that can be filtered by seccomp-bpf. This filter cannot be applied |
|
Mark Seaborn
2015/05/28 08:44:10
"...registers so that" -> "...registers, so they"
|
| +// on x86_32 as they arguments are passed in memory. |
|
Mark Seaborn
2015/05/28 08:44:10
"the arguments"
|
| +#if defined(__x86_64__) || defined(__arm__) |
| +BPF_DEATH_TEST_C(NaClNonSfiSandboxTest, |
| + socketpair_af_inet_disallowed, |
| + DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), |
| + nacl::nonsfi::NaClNonSfiBPFSandboxPolicy) { |
| + int fds[2]; |
| + socketpair(AF_INET, SOCK_STREAM, 0, fds); |
| +} |
| +#endif |
| + |
| BPF_DEATH_TEST_C(NaClNonSfiSandboxTest, |
| accept, |
| DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), |
| @@ -393,16 +406,6 @@ BPF_DEATH_TEST_C(NaClNonSfiSandboxTest, |
| #endif |
| } |
| -#if defined(__x86_64__) || defined(__arm__) |
| -BPF_DEATH_TEST_C(NaClNonSfiSandboxTest, |
| - socketpair, |
| - DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), |
| - nacl::nonsfi::NaClNonSfiBPFSandboxPolicy) { |
| - int fds[2]; |
| - socketpair(AF_INET, SOCK_STREAM, 0, fds); |
| -} |
| -#endif |
| - |
| BPF_TEST_C(NaClNonSfiSandboxTest, |
| fcntl_SETFD_allowed, |
| nacl::nonsfi::NaClNonSfiBPFSandboxPolicy) { |