diff options
author | Zach Reizner <zachr@google.com> | 2019-02-13 17:33:32 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-28 03:24:24 -0800 |
commit | a60744b42ee2589e9318029cf3fd7d87fd73f29d (patch) | |
tree | 4819c7b24caab92956d95474e638eb067a5ce926 /seccomp | |
parent | b7196e2a1c1eb7123e7eace5418b7eb4a3e24dbe (diff) | |
download | crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.tar crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.tar.gz crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.tar.bz2 crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.tar.lz crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.tar.xz crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.tar.zst crosvm-a60744b42ee2589e9318029cf3fd7d87fd73f29d.zip |
crosvm: use seqpacket rather than datagram sockets
The advantage of seqpacket is that they are connection oriented. A listener can be created that accepts new connections, useful for the path based VM control sockets. Previously, the only bidirectional sockets in crosvm were either stream based or made using socketpair. This change also whitelists sendmsg and recvmsg for the common device policy. TEST=cargo test BUG=chromium:848187 Change-Id: I83fd46f54bce105a7730632cd013b5e7047db22b Reviewed-on: https://chromium-review.googlesource.com/1470917 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'seccomp')
-rw-r--r-- | seccomp/arm/common_device.policy | 2 | ||||
-rw-r--r-- | seccomp/x86_64/common_device.policy | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/seccomp/arm/common_device.policy b/seccomp/arm/common_device.policy index 9ccf48b..d2b5a6b 100644 --- a/seccomp/arm/common_device.policy +++ b/seccomp/arm/common_device.policy @@ -32,11 +32,13 @@ prctl: arg0 == PR_SET_NAME read: 1 recv: 1 recvfrom: 1 +recvmsg: 1 restart_syscall: 1 rt_sigaction: 1 rt_sigprocmask: 1 rt_sigreturn: 1 sched_getaffinity: 1 +sendmsg: 1 set_robust_list: 1 sigaltstack: 1 write: 1 diff --git a/seccomp/x86_64/common_device.policy b/seccomp/x86_64/common_device.policy index 7fa6e52..2379b95 100644 --- a/seccomp/x86_64/common_device.policy +++ b/seccomp/x86_64/common_device.policy @@ -31,11 +31,13 @@ ppoll: 1 prctl: arg0 == PR_SET_NAME read: 1 recvfrom: 1 +recvmsg: 1 restart_syscall: 1 rt_sigaction: 1 rt_sigprocmask: 1 rt_sigreturn: 1 sched_getaffinity: 1 +sendmsg: 1 set_robust_list: 1 sigaltstack: 1 write: 1 |