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

Issue 371113003: Disable yama on 3.2 kernels with 32bit userland and 64bit kernel. (Closed)

Created:
6 years, 5 months ago by Nico
Modified:
6 years, 5 months ago
CC:
chromium-reviews, agl, jln+watch_chromium.org, jln (very slow on Chromium)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

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

Patch Set 1 #

Total comments: 8

Patch Set 2 : comment #

Total comments: 2

Patch Set 3 : - #

Total comments: 3

Patch Set 4 : reland #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -0 lines) Patch
M sandbox/linux/services/yama_unittests.cc View 1 2 3 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Nico
Kees: I'm not sure if this is the right fix; I guessed from your commit ...
6 years, 5 months ago (2014-07-07 23:00:29 UTC) #1
Jorge Lucangeli Obes
https://codereview.chromium.org/371113003/diff/1/sandbox/linux/services/yama.cc File sandbox/linux/services/yama.cc (right): https://codereview.chromium.org/371113003/diff/1/sandbox/linux/services/yama.cc#newcode36 sandbox/linux/services/yama.cc:36: if (enable_restrictions && Yama::HasLinux32Bug()) { This doesn't really make ...
6 years, 5 months ago (2014-07-08 04:14:28 UTC) #2
Nico
Thanks! All done. https://codereview.chromium.org/371113003/diff/1/sandbox/linux/services/yama.cc File sandbox/linux/services/yama.cc (right): https://codereview.chromium.org/371113003/diff/1/sandbox/linux/services/yama.cc#newcode135 sandbox/linux/services/yama.cc:135: base::SysInfo::OperatingSystemVersion(), "3.2", /*case_sensitive=*/false); On 2014/07/08 04:14:28, ...
6 years, 5 months ago (2014-07-08 04:24:43 UTC) #3
Jorge Lucangeli Obes
lgtm but please fix the nits. https://codereview.chromium.org/371113003/diff/20001/sandbox/linux/services/yama_unittests.cc File sandbox/linux/services/yama_unittests.cc (right): https://codereview.chromium.org/371113003/diff/20001/sandbox/linux/services/yama_unittests.cc#newcode26 sandbox/linux/services/yama_unittests.cc:26: // On 3.2 ...
6 years, 5 months ago (2014-07-08 04:57:14 UTC) #4
Nico
Thanks! https://codereview.chromium.org/371113003/diff/20001/sandbox/linux/services/yama_unittests.cc File sandbox/linux/services/yama_unittests.cc (right): https://codereview.chromium.org/371113003/diff/20001/sandbox/linux/services/yama_unittests.cc#newcode26 sandbox/linux/services/yama_unittests.cc:26: // On 3.2 kernels, yama doesn't work for ...
6 years, 5 months ago (2014-07-08 05:00:47 UTC) #5
Nico
Committed patchset #3 manually as r281666 (presubmit successful).
6 years, 5 months ago (2014-07-08 05:01:54 UTC) #6
Kees Cook
https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/yama_unittests.cc File sandbox/linux/services/yama_unittests.cc (right): https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/yama_unittests.cc#newcode27 sandbox/linux/services/yama_unittests.cc:27: // This is fixed in 3.4. Strictly speaking, Yama ...
6 years, 5 months ago (2014-07-08 05:14:57 UTC) #7
nhiroki
A revert of this CL has been created in https://codereview.chromium.org/378793002/ by nhiroki@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-08 05:54:49 UTC) #8
Lei Zhang
Bot failed with: ../../sandbox/linux/services/yama_unittests.cc: In function 'bool sandbox::{anonymous}::HasLinux32Bug()': ../../sandbox/linux/services/yama_unittests.cc:29:13: error: 'base::SysInfo' has not been declared ...
6 years, 5 months ago (2014-07-08 06:02:45 UTC) #9
Jorge Lucangeli Obes
On 2014/07/08 06:02:45, Lei Zhang wrote: > Bot failed with: > > ../../sandbox/linux/services/yama_unittests.cc: In function ...
6 years, 5 months ago (2014-07-08 13:56:58 UTC) #10
Nico
https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/yama_unittests.cc File sandbox/linux/services/yama_unittests.cc (right): https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/yama_unittests.cc#newcode27 sandbox/linux/services/yama_unittests.cc:27: // This is fixed in 3.4. On 2014/07/08 05:14:57, ...
6 years, 5 months ago (2014-07-08 15:29:05 UTC) #11
Nico
Committed patchset #4 manually as r281757 (presubmit successful).
6 years, 5 months ago (2014-07-08 15:30:47 UTC) #12
eseidel
This broke clang with an unused function warning? https://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20(dbg)/builds/61819/steps/compile/logs/stdio
6 years, 5 months ago (2014-07-08 16:09:06 UTC) #13
eseidel
A revert of this CL has been created in https://codereview.chromium.org/374933002/ by eseidel@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-08 16:09:35 UTC) #14
Kees Cook
https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/yama_unittests.cc File sandbox/linux/services/yama_unittests.cc (right): https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/yama_unittests.cc#newcode27 sandbox/linux/services/yama_unittests.cc:27: // This is fixed in 3.4. On 2014/07/08 15:29:04, ...
6 years, 5 months ago (2014-07-08 17:49:43 UTC) #15
Nico
6 years, 5 months ago (2014-07-08 17:54:23 UTC) #16
Message was sent while issue was closed.
On 2014/07/08 17:49:43, Kees Cook wrote:
>
https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/y...
> File sandbox/linux/services/yama_unittests.cc (right):
> 
>
https://codereview.chromium.org/371113003/diff/40001/sandbox/linux/services/y...
> sandbox/linux/services/yama_unittests.cc:27: // This is fixed in 3.4.
> On 2014/07/08 15:29:04, Nico (away) wrote:
> > On 2014/07/08 05:14:57, Kees Cook wrote:
> > > Strictly speaking, Yama doesn't _exist_ on stock 3.2 kernels. I think it
> would
> > > be better to directly test the failure condition instead of using kernel
> > > version.
> > > 
> > > (i.e. calling prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...) returns
EINVAL
> > > means the feature is busted.)
> > 
> > So you'd write this function as
> > 
> >  return prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0) < 0) && errno ==
> > EINVAL;
> > 
> > ?
> 
> Correct. (Also note that the fix has landed in Precise's kernel tree, so the
> next kernel update will include the fix.)

Doing that here: https://codereview.chromium.org/376823005/

Powered by Google App Engine
This is Rietveld 408576698