Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: trunk/src/sandbox/linux/services/yama_unittests.cc

Issue 376793002: Revert 281666 "Disable two yama tests on 3.2 kernels with 32bit ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/sandbox/linux/services/yama_unittests.cc
===================================================================
--- trunk/src/sandbox/linux/services/yama_unittests.cc (revision 281671)
+++ trunk/src/sandbox/linux/services/yama_unittests.cc (working copy)
@@ -21,21 +21,6 @@
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 @@
}
TEST(Yama, RestrictPtraceWorks) {
- if (HasLinux32Bug())
- return;
-
ScopedProcess process1(base::Bind(&SetYamaRestrictions, true));
ASSERT_TRUE(process1.WaitForClosureToRun());
@@ -152,7 +134,7 @@
void DoNothing() {}
SANDBOX_TEST(Yama, RestrictPtraceIsDefault) {
- if (!Yama::IsPresent() || HasLinux32Bug())
+ if (!Yama::IsPresent())
return;
CHECK(Yama::DisableYamaRestrictions());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698