summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authordnicoara <dnicoara@chromium.org>2015-04-15 10:25:01 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-15 17:25:30 +0000
commit4c05c94295ee26adffe966678719085f02b15f2f (patch)
tree4e3ce7e8cb75c2c076b4e62de8e4b078e93805b5 /sandbox
parentf482ff08a753d5a85abf0c97753eea90c81e0fb6 (diff)
downloadchromium_src-4c05c94295ee26adffe966678719085f02b15f2f.zip
chromium_src-4c05c94295ee26adffe966678719085f02b15f2f.tar.gz
chromium_src-4c05c94295ee26adffe966678719085f02b15f2f.tar.bz2
Revert of Small refactor around futex.h. (patchset #1 id:20001 of https://codereview.chromium.org/1076213002/)
Reason for revert: Breaks ChromeOS veyron_jerry boot. BUG=477352 Original issue's description: > Small refactor around futex.h. > > This is the preparation of seccomp-bpf implementation > for nacl_helper_nonsfi. > PNaCl toolchain does not provides linux/futex.h. > This CL is the preparation to reuse android_futex.h > for PNaCl toolchain, too. > > TEST=Ran bots. > BUG=358465 > > Committed: https://crrev.com/3b996212fa3c92af3233246ae54af728eb7c3591 > Cr-Commit-Position: refs/heads/master@{#324996} TBR=mdempsky@chromium.org,hidehiko@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=358465 Review URL: https://codereview.chromium.org/1084173003 Cr-Commit-Position: refs/heads/master@{#325265}
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/linux/BUILD.gn2
-rw-r--r--sandbox/linux/sandbox_linux.gypi2
-rw-r--r--sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc3
-rw-r--r--sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc4
-rw-r--r--sandbox/linux/system_headers/android_futex.h (renamed from sandbox/linux/system_headers/linux_futex.h)8
5 files changed, 10 insertions, 9 deletions
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
index 21f856b..1794199 100644
--- a/sandbox/linux/BUILD.gn
+++ b/sandbox/linux/BUILD.gn
@@ -290,11 +290,11 @@ source_set("sandbox_services_headers") {
sources = [
"system_headers/android_arm64_ucontext.h",
"system_headers/android_arm_ucontext.h",
+ "system_headers/android_futex.h",
"system_headers/android_i386_ucontext.h",
"system_headers/android_ucontext.h",
"system_headers/arm64_linux_syscalls.h",
"system_headers/arm_linux_syscalls.h",
- "system_headers/linux_futex.h",
"system_headers/linux_seccomp.h",
"system_headers/linux_syscalls.h",
"system_headers/x86_32_linux_syscalls.h",
diff --git a/sandbox/linux/sandbox_linux.gypi b/sandbox/linux/sandbox_linux.gypi
index 1cf3b2d..4305b41 100644
--- a/sandbox/linux/sandbox_linux.gypi
+++ b/sandbox/linux/sandbox_linux.gypi
@@ -280,13 +280,13 @@
'sources': [
'system_headers/android_arm64_ucontext.h',
'system_headers/android_arm_ucontext.h',
+ 'system_headers/android_futex.h',
'system_headers/android_i386_ucontext.h',
'system_headers/android_mips_ucontext.h',
'system_headers/android_ucontext.h',
'system_headers/arm64_linux_syscalls.h',
'system_headers/arm_linux_syscalls.h',
'system_headers/capability.h',
- 'system_headers/linux_futex.h',
'system_headers/linux_seccomp.h',
'system_headers/linux_syscalls.h',
'system_headers/mips_linux_syscalls.h',
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
index 614849f..e6e8934 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
@@ -6,6 +6,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <linux/futex.h>
#include <sched.h>
#include <signal.h>
#include <string.h>
@@ -31,7 +32,7 @@
#include "sandbox/linux/seccomp-bpf/syscall.h"
#include "sandbox/linux/services/syscall_wrappers.h"
#include "sandbox/linux/services/thread_helpers.h"
-#include "sandbox/linux/system_headers/linux_futex.h"
+#include "sandbox/linux/system_headers/android_futex.h"
#include "sandbox/linux/system_headers/linux_syscalls.h"
#include "sandbox/linux/tests/test_utils.h"
#include "sandbox/linux/tests/unit_tests.h"
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
index 282e727..b315f12a 100644
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -7,6 +7,7 @@
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
+#include <linux/futex.h>
#include <linux/net.h>
#include <sched.h>
#include <signal.h>
@@ -29,11 +30,12 @@
#include "sandbox/linux/bpf_dsl/seccomp_macros.h"
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
-#include "sandbox/linux/system_headers/linux_futex.h"
#include "sandbox/linux/system_headers/linux_syscalls.h"
#if defined(OS_ANDROID)
+#include "sandbox/linux/system_headers/android_futex.h"
+
#if !defined(F_DUPFD_CLOEXEC)
#define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6)
#endif
diff --git a/sandbox/linux/system_headers/linux_futex.h b/sandbox/linux/system_headers/android_futex.h
index 91733a8..11b766f 100644
--- a/sandbox/linux/system_headers/linux_futex.h
+++ b/sandbox/linux/system_headers/android_futex.h
@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_FUTEX_H_
-#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_FUTEX_H_
-
-#include <linux/futex.h>
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_
+#define SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_
#if !defined(FUTEX_WAIT)
#define FUTEX_WAIT 0
@@ -79,4 +77,4 @@
#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
#endif
-#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_FUTEX_H_
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_