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

Issue 2490893002: seccomp-bpf: Allow MADV_FREE in madvise(2) (Closed)

Created:
4 years, 1 month ago by Raphael Kubo da Costa (rakuco)
Modified:
4 years, 1 month ago
CC:
chromium-reviews, rickyz+watch_chromium.org, jln+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

seccomp-bpf: Allow MADV_FREE in madvise(2) The seccomp filter was assuming MADV_DONTNEED and MADV_FREE were the same thing, but they are not. In particular, a separate MADV_FREE macro was introduced in Linux 4.5, and glibc started defining it in its headers since 2.24 with this commit: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=981569c74cbb6bafa2ddcefa6dd9dbdc938ff1c8 Blink's PageAllocator.cpp sets MADV_FREE to MADV_DONTNEED if the former is not defined as a macro. On systems with glibc >= 2.24, this no longer happens and MADV_FREE will be rejected by the madvise seccomp filter, leading to a crash in Blink's decommitSystemPages(). R=jln@chromium.org,jorgelo@chromium.org,mdempsky@chromium.org,rickyz@chromium.org Committed: https://crrev.com/65180d3bfbec6fb3d0ed2ca7961094fb38452832 Cr-Commit-Position: refs/heads/master@{#430965}

Patch Set 1 #

Patch Set 2 : seccomp-bpf: Allow MADV_FREE in madvise(2) #

Patch Set 3 : Remove stray comma #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc View 1 2 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Raphael Kubo da Costa (rakuco)
PTAL. The coding style in the patch looks pretty ugly, but I thought it'd be ...
4 years, 1 month ago (2016-11-09 08:55:00 UTC) #1
mdempsky
lgtm
4 years, 1 month ago (2016-11-09 17:03:15 UTC) #3
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/2490893002/40001
4 years, 1 month ago (2016-11-09 17:03:28 UTC) #4
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-09 17:46:44 UTC) #5
commit-bot: I haz the power
4 years, 1 month ago (2016-11-09 18:02:51 UTC) #7
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/65180d3bfbec6fb3d0ed2ca7961094fb38452832
Cr-Commit-Position: refs/heads/master@{#430965}

Powered by Google App Engine
This is Rietveld 408576698