crosvm/seccomp/arm/cras_audio_device.policy
paulhsia 7cf768d02d ac97: Fix device real time priority issue
- Add allow sched_setscheduler call in seccomp policy
- Change the real time priority constant AUDIO_THREAD_RTPRIO to 10 to match
all other clients' priority.

Run the following commands to test
1. ulimit -r 10
2. crosvm run -r ./vm_rootfs.img -c 1 -m 1024 -s /run --cid 5 --host_ip \
   100.115.92.25 --netmask 255.255.255.252 --cras-audio \
   --params="snd_intel8x0.inside_vm=1 snd_intel8x0.ac97_clock=48000" \
   --mac d2:47:f7:c5:9e:53 ./vm_kernel
3. aplay -Dhw:0,0 -f dat /dev/zero
4. ps -AT -o comm,rtprio | grep crosvm
should see a thread running with rtprio=10

BUG=chromium:983533
BUG=b:138262556
TEST=Test with eve (x86_64) and bob (arm)

Change-Id: Idc3711d03d716741f7cefd9a89b14ae4c20c2033
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1729089
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
2019-08-01 09:25:59 +00:00

15 lines
348 B
Text

# Copyright 2019 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.
@include /usr/share/policy/crosvm/common_device.policy
madvise: 1
prlimit64: 1
setrlimit: 1
recvmsg: 1
sched_setscheduler: 1
sendmsg: 1
socketpair: arg0 == AF_UNIX
clock_gettime: 1