crosvm/seccomp/x86_64
Alexandre Courbot cd88647f7d seccomp: x86_64: inline common_device syscalls into video_device
The video device needs to redefine the filters for mmap and mprotect,
which the minijail compiler rejects:

    compile_file: /usr/share/policy/crosvm/video_device.policy(35): syscall mmap redefined here
    compile_file: /usr/share/policy/crosvm/common_device.policy(26): previous definition here
    compile_file: /usr/share/policy/crosvm/video_device.policy(36): syscall mprotect redefined here
    compile_file: /usr/share/policy/crosvm/common_device.policy(27): previous definition here
    compile_filter: compile_file() failed
    failed to compile seccomp filter BPF program in '/usr/share/policy/crosvm/video_device.policy'

Prevent this error from happening by inlining the common_device
declarations in video_device and removing the declarations for mmap and
mprotect.

BUG=b:210601086
TEST=Video device can be created when making crosvm use the .policy
files instead of compiled .bpfs.

Change-Id: Ifa7aa84772ae59123cc04e8c9ea845ba6ed7b559
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3341131
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2021-12-16 03:50:58 +00:00
..
9p_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
balloon_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
battery.policy seccomp: add getcwd and readlink to common policy for panic 2021-12-02 23:18:03 +00:00
block_device.policy seccomp: allow newfstatat in more amd64/arm64 policies 2021-10-01 17:09:16 +00:00
common_device.frequency seccomp: add frequency file to x86_64 2020-03-19 07:24:56 +00:00
common_device.policy seccomp: add getcwd and readlink to common policy for panic 2021-12-02 23:18:03 +00:00
cras_audio_device.policy seccomp: Allow lseek on cras_audio_device 2021-11-29 23:28:45 +00:00
cras_snd_device.policy seccomp: Add timerfd_* to cras_snd_device.policy 2021-10-11 05:10:11 +00:00
fs_device.policy seccomp: add getcwd and readlink to common policy for panic 2021-12-02 23:18:03 +00:00
gpu_common.policy gpu: allow syslog from the render server 2021-12-14 16:54:22 +00:00
gpu_device.policy gpu: allow syslog from the render server 2021-12-14 16:54:22 +00:00
gpu_render_server.policy gpu: allow syslog from the render server 2021-12-14 16:54:22 +00:00
input_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
iommu_device.policy devices: virtio: iommu: enable virtio IOMMU driver 2021-07-09 05:49:26 +00:00
net_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
null_audio_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
pmem_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
rng_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
serial.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
tpm_device.policy seccomp: add getcwd and readlink to common policy for panic 2021-12-02 23:18:03 +00:00
vfio_device.policy seccomp: add getcwd and readlink to common policy for panic 2021-12-02 23:18:03 +00:00
vhost_net_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
vhost_vsock_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
video_device.policy seccomp: x86_64: inline common_device syscalls into video_device 2021-12-16 03:50:58 +00:00
vios_audio_device.policy Specify prctl's policy only once per device 2021-04-20 22:50:20 +00:00
wl_device.policy wl: add support for host fences 2021-11-04 01:24:37 +00:00
xhci.policy seccomp: add getcwd and readlink to common policy for panic 2021-12-02 23:18:03 +00:00