mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-12-25 04:14:06 +00:00
5656c124af
It looks like free() will sometimes try to open /proc/sys/vm/overcommit_memory in order to decide whether to return freed heap memory to the kernel; change the seccomp filter to fail the open syscalls with an error code (ENOENT) rather than killing the process. Also allow madvise to free memory for the same free() codepath. BUG=chromium:888212 TEST=Run fio loop test on kevin Change-Id: I1c27b265b822771f76b7d9572d9759476770000e Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1305756 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Dylan Reid <dgreid@chromium.org>
47 lines
1,010 B
Text
47 lines
1,010 B
Text
# Copyright 2018 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
close: 1
|
|
dup: 1
|
|
dup2: 1
|
|
exit_group: 1
|
|
fallocate: 1
|
|
fdatasync: 1
|
|
fstat64: 1
|
|
fsync: 1
|
|
ftruncate64: 1
|
|
futex: 1
|
|
gettimeofday: 1
|
|
_llseek: 1
|
|
# Disallow mmap with PROT_EXEC set. The syntax here doesn't allow bit
|
|
# negation, thus the manually negated mask constant.
|
|
mmap2: arg2 in 0xfffffffb
|
|
mprotect: arg2 in 0xfffffffb
|
|
madvise: arg2 == MADV_DONTDUMP || arg2 == MADV_DONTNEED
|
|
mremap: 1
|
|
munmap: 1
|
|
read: 1
|
|
recv: 1
|
|
sched_getaffinity: 1
|
|
set_robust_list: 1
|
|
sigaltstack: 1
|
|
# Disallow clone's other than new threads.
|
|
clone: arg0 & 0x00010000
|
|
write: 1
|
|
eventfd2: 1
|
|
poll: 1
|
|
ppoll: 1
|
|
getpid: 1
|
|
# Allow PR_SET_NAME only.
|
|
prctl: arg0 == 15
|
|
restart_syscall: 1
|
|
epoll_create1: 1
|
|
epoll_ctl: 1
|
|
epoll_wait: 1
|
|
timerfd_create: 1
|
|
timerfd_gettime: 1
|
|
timerfd_settime: 1
|
|
# libc free() attempts to open /proc/sys/vm/overcommit_memory
|
|
open: return ENOENT
|
|
openat: return ENOENT
|