Chromium Code Reviews
Descriptionseccomp-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 #Messages
Total messages: 7 (2 generated)
|