diff options
author | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-08 06:02:30 +0000 |
---|---|---|
committer | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-08 06:02:30 +0000 |
commit | 96f1abd7c468ab933b55e8688e4ef22e3124e70b (patch) | |
tree | d84ae3b9c124239c7b37b79f89894fa7c073bb0e | |
parent | abad10bba0dc694ba2b43a45f81fddb7018843e1 (diff) | |
download | chromium_src-96f1abd7c468ab933b55e8688e4ef22e3124e70b.zip chromium_src-96f1abd7c468ab933b55e8688e4ef22e3124e70b.tar.gz chromium_src-96f1abd7c468ab933b55e8688e4ef22e3124e70b.tar.bz2 |
Revert 281666 "Disable two yama tests on 3.2 kernels with 32bit ..."
This seems to be breaking Linux builds:
http://build.chromium.org/p/chromium/builders/Linux/builds/51190
http://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29%2832%29/builds/26110
> Disable two yama tests on 3.2 kernels with 32bit userland and 64bit kernel.
>
> Disabling yama restrictions is broken there.
>
> BUG=391916
> R=jorgelo@chromium.org
>
> Review URL: https://codereview.chromium.org/371113003
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/376793002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281672 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | sandbox/linux/services/yama_unittests.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/sandbox/linux/services/yama_unittests.cc b/sandbox/linux/services/yama_unittests.cc index 6666cbc..17ef4b40 100644 --- a/sandbox/linux/services/yama_unittests.cc +++ b/sandbox/linux/services/yama_unittests.cc @@ -21,21 +21,6 @@ namespace sandbox { namespace { -bool HasLinux32Bug() { -#if defined(__i386__) - // On 3.2 kernels, Yama doesn't work for 32-bit binaries on 64-bit kernels. - // This is fixed in 3.4. - bool is_kernel_64bit = - base::SysInfo::OperatingSystemArchitecture() == "x86_64"; - bool is_linux = base::SysInfo::OperatingSystemName() == "Linux"; - bool is_3_dot_2 = StartsWithASCII( - base::SysInfo::OperatingSystemVersion(), "3.2", /*case_sensitive=*/false); - if (is_kernel_64bit && is_linux && is_3_dot_2) - return true; -#endif // defined(__i386__) - return false; -} - bool CanPtrace(pid_t pid) { int ret; ret = ptrace(PTRACE_ATTACH, pid, NULL, NULL); @@ -127,9 +112,6 @@ void SetYamaRestrictions(bool enable_restriction) { } TEST(Yama, RestrictPtraceWorks) { - if (HasLinux32Bug()) - return; - ScopedProcess process1(base::Bind(&SetYamaRestrictions, true)); ASSERT_TRUE(process1.WaitForClosureToRun()); @@ -152,7 +134,7 @@ TEST(Yama, RestrictPtraceWorks) { void DoNothing() {} SANDBOX_TEST(Yama, RestrictPtraceIsDefault) { - if (!Yama::IsPresent() || HasLinux32Bug()) + if (!Yama::IsPresent()) return; CHECK(Yama::DisableYamaRestrictions()); |