Skip to content

Commit

Permalink
Revert of Disable yama on 3.2 kernels with 32bit userland and 64bit k…
Browse files Browse the repository at this point in the history
…ernel. (https://codereview.chromium.org/371113003/)

Reason for revert:
Broke clang builders:
https://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20(dbg)/builds/61819/steps/compile/logs/stdio

Original issue's description:
> 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
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281666
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281757

TBR=jorgelo@chromium.org,keescook@chromium.org,thakis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=391916

Review URL: https://codereview.chromium.org/374933002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281763 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
eseidel@chromium.org committed Jul 8, 2014
1 parent d669825 commit f51fbca
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions sandbox/linux/services/yama_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_util.h"
#include "base/sys_info.h"
#include "sandbox/linux/services/scoped_process.h"
#include "sandbox/linux/services/yama.h"
#include "sandbox/linux/tests/unit_tests.h"
Expand All @@ -23,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);
Expand Down

0 comments on commit f51fbca

Please sign in to comment.