Commit graph

8 commits

Author SHA1 Message Date
Douglas Anderson
e742c70edc seccomp: Add io_uring_setup / io_uring_enter to gpu_common.policy
The top part of gpu_common.policy is supposed to match
common_device.policy. In https://crrev.com/c/1993163 we added
io_uring_setup and io_uring_enter to common_device.policy. Even though
there's nothing known to be broken, add these to the gpu_common.policy
to keep things matching.

BUG=None
TEST=kokoro

Change-Id: Ifd4c53c50ec12eb7e1e14f7eb80d2c9b8f0fbe46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3631411
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
2022-05-06 22:09:01 +00:00
Douglas Anderson
0508572d3c seccomp: Move prctl in gpu_common to gpu-specific section
The top part of gpu_common.policy is supposed to match
common_device.policy, but "prctl" is in this top part and isn't in
common_device.policy. A bit of history:
* prctl used to be in the common_device.policy but was removed in
  <https://crrev.com/c/2837307>.
* Even when prctl was in common_device.policy, it had different
  arguments than what we allow in gpu_common.policy.

This is a no-op cleanup change.

BUG=None
TEST=None

Change-Id: Ic71c9da3ef9eb24665711d2000416ff9c87d49a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3631410
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
2022-05-06 22:09:00 +00:00
Kazuhiro Inaba
6b8153e9c1 seccomp: add sched_yield for arm64
We already allow the system call in arm32.
Testing revealed that the call is actually in use.

BUG=b:231660764, b:230609113
TEST=cheets_CTS_R.internal.arm.CtsSkQP

Change-Id: Ia04089d1454312ac637e5c76d0aceafd2ab55134
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3632320
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-05-06 20:19:04 +00:00
Douglas Anderson
3df2a8db60 seccomp: Add memfd_create: arg1 == 3 for arm64
With testing, we're seeing secomp violations on aarch64. We need to
give access to "memfd_create" just like we did for arm32. Copy the
snippet from there.

BUG=b:223410173, b:230609113
TEST=Start arcvm; start android-sh; run tast arc.VMConfig

Change-Id: I4922e6decd67c3bc23fb090987b0318c384e0d68
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3626017
Auto-Submit: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-05-04 00:22:28 +00:00
Douglas Anderson
5124d62f86 seccomp: Fixes needed for aarch64 to allow arcvm to start
With these changes arcvm starts when running with 64-bit userspace and
this grep turns up blank:
  grep SECCOMP /var/log/audit/audit.log

Generated by:
* Hacking minijail0 to always log <https://r.android.com/2072091> and
  making sure it was compiled in debug mode.
* Hacking "crosvm run" to be "crosvm run --seccomp-log-failures". I
  don't truly know if this is needed but it didn't hurt.
* Diffing arm vs. arm64

From comparing arm vs. arm64 there could still be some things missing,
or it's possible that arm has simply accumulated some cruft. More can
be added later if we find it's needed.

BUG=b:223410173, b:230609113
TEST=Start arcvm; start android-sh; run tast arc.VMConfig

Change-Id: Ib5407ddecc3d19f43e14e5b036ac64baee9335bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3543889
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Douglas Anderson <dianders@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
2022-04-29 00:05:48 +00:00
Daniel Verkamp
9f7a50fb50 seccomp: allow clock_gettime in all devices
This was already allowed in common_device.policy for arm platforms, and
it can be called via future/async code that is used by many devices. Add
it to x86_64 and aarch64 common policies as well.

BUG=b:220908060
TEST=Start Crostini with virtio-snd on hatch and trogdo

Change-Id: I9bf8f56ebed0cfe6d5e17e45226cac73db3d6d37
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3482026
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-02-22 23:15:48 +00:00
Chia-I Wu
b86f7f6110 gpu: allow syslog from the render server
BUG=b:177267762
TEST=run vk and gl apps on volteer

Change-Id: I6fe2ce831eb671fedd1c0aa749066c41d181d152
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3335301
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Chia-I Wu <olv@google.com>
2021-12-14 16:54:22 +00:00
Chia-I Wu
64ba89ac84 seccomp: add gpu_common.policy
Let gpu_device.policy include gpu_common.policy.  No functional change.

BUG=b:177267762
TEST=run vk and gl apps on volteer

Change-Id: Ic83c29b5713c95374562ee6eba35002142e00357
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3311904
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
2021-12-09 20:16:10 +00:00