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

Issue 2536103002: Linux Sandbox: Whitelist prlimit64 when used as getrlimit (Closed)

Created:
4 years ago by Daniel Kurtz
Modified:
4 years ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, rickyz+watch_chromium.org, jln+watch_chromium.org
Target Ref:
refs/pending/branch-heads/2924
Project:
chromium
Visibility:
Public.

Description

Linux Sandbox: Whitelist prlimit64 when used as getrlimit From http://man7.org/linux/man-pages/man2/getrlimit.2.html: The Linux-specific prlimit() system call combines and extends the functionality of setrlimit() and getrlimit(). It can be used to both set and get the resource limits of an arbitrary process. Since version 2.13, the glibc getrlimit() and setrlimit() wrapper functions no longer invoke the corresponding system calls, but instead employ prlimit(), for the reasons described in BUGS. If new_limit is not NULL, then the rlimit structure to which it points is used to set new values. If it is NULL, then prlimit() acts as getrlimit(). So, allow prlimit() with new_limit=NULL, and pid is the current process (or 0), so the glib implementation of getrlimit can succeed. BUG=chromium:662450 TEST=boot on ChromeOS w/ sandbox enabled No messages like: getrlimit(RLIMIT_NOFILE) failed NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2484393004 Cr-Commit-Position: refs/heads/master@{#434872} (cherry picked from commit 5ce3b357d4cb9906b57f5758ef271cb69dbb664b)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -1 line) Patch
M content/common/sandbox_linux/bpf_renderer_policy_linux.cc View 1 chunk +2 lines, -1 line 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h View 1 chunk +5 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (9 generated)
djkurtz
On 2016/12/06 08:23:16, djkurtz wrote: > mailto:djkurtz@google.com changed reviewers: > + mailto:jorgelo@chromium.org, mailto:rickyz@chromium.org, mailto:rickyz@google.com This ...
4 years ago (2016-12-06 08:23:28 UTC) #7
Jorge Lucangeli Obes
lgtm
4 years ago (2016-12-06 14:22:46 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2536103002/1
4 years ago (2016-12-08 17:29:09 UTC) #10
commit-bot: I haz the power
4 years ago (2016-12-08 17:35:56 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:1)

Powered by Google App Engine
This is Rietveld 408576698