From bb340d9a94d48514cbe310d05e1ce539aae31264 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Mon, 10 Jun 2019 16:45:32 -0700 Subject: usb: update xhci policies to allow newer libusb The updated version of libusb uses USBFS_CONNECTINFO and USBFS_CONNINFO_EX ioctls, as well as readlink and lseek syscalls, so let's enable them. BUG=b:133773289 TEST=Try attaching a USB device to Crostini VM. Change-Id: Ibdcab2da9abe1c0bb35c989d9d62b44ce403e268 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1650534 Reviewed-by: Daniel Verkamp Tested-by: kokoro Tested-by: Dmitry Torokhov --- seccomp/arm/xhci.policy | 6 +++++- seccomp/x86_64/xhci.policy | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'seccomp') diff --git a/seccomp/arm/xhci.policy b/seccomp/arm/xhci.policy index 239eafd..857cecc 100644 --- a/seccomp/arm/xhci.policy +++ b/seccomp/arm/xhci.policy @@ -8,6 +8,7 @@ openat: 1 stat64: 1 fcntl64: 1 lstat64: 1 +readlink: 1 readlinkat: 1 getdents64: 1 getrandom: 1 @@ -35,9 +36,12 @@ uname: 1 # 0x5514 == USBDEVFS_RESET # 0x80045505 == USBDEVFS_SETCONFIGURATION # 0x8108551b == USBDEVFS_DISCONNECT_CLAIM -ioctl: arg1 == 0xc0105500 || arg1 == 0x802c550a || arg1 == 0x8004551a || arg1 == 0x4004550d || arg1 == 0x8004550f || arg1 == 0x80045510 || arg1 == 0x550b || arg1 == 0x5514 || arg1 == 0x80045505 || arg1 == 0x8108551b +# 0x40085511 == USBDEVFS_CONNECTINFO +# 0x80305520 == USBDEVFS_CONNINFO_EX +ioctl: arg1 == 0xc0105500 || arg1 == 0x802c550a || arg1 == 0x8004551a || arg1 == 0x4004550d || arg1 == 0x8004550f || arg1 == 0x80045510 || arg1 == 0x550b || arg1 == 0x5514 || arg1 == 0x80045505 || arg1 == 0x8108551b || arg1 == 0x40085511 || arg1 == 0x80305520 fstat: 1 sigaltstack: 1 recvmsg: 1 getrandom: 1 getdents: 1 +lseek: 1 diff --git a/seccomp/x86_64/xhci.policy b/seccomp/x86_64/xhci.policy index 19a46eb..2d81b74 100644 --- a/seccomp/x86_64/xhci.policy +++ b/seccomp/x86_64/xhci.policy @@ -8,6 +8,7 @@ openat: 1 lstat: 1 gettid: 1 +readlink: 1 readlinkat: 1 timerfd_create: 1 name_to_handle_at: 1 @@ -33,9 +34,12 @@ uname: 1 # 0x5514 == USBDEVFS_RESET # 0x80045505 == USBDEVFS_SETCONFIGURATION # 0x8108551b == USBDEVFS_DISCONNECT_CLAIM -ioctl: arg1 == 0xc0185500 || arg1 == 0x41045508 || arg1 == 0x8004550f || arg1 == 0x4008550d || arg1 == 0x8004551a || arg1 == 0x550b || arg1 == 0x80045510 || arg1 == 0x8038550a || arg1 == 0x5514 || arg1 == 0x80045505 || arg1 == 0x8108551b +# 0x40085511 == USBDEVFS_CONNECTINFO +# 0x80305520 == USBDEVFS_CONNINFO_EX +ioctl: arg1 == 0xc0185500 || arg1 == 0x41045508 || arg1 == 0x8004550f || arg1 == 0x4008550d || arg1 == 0x8004551a || arg1 == 0x550b || arg1 == 0x80045510 || arg1 == 0x8038550a || arg1 == 0x5514 || arg1 == 0x80045505 || arg1 == 0x8108551b || arg1 == 0x40085511 || arg1 == 0x80305520 fstat: 1 sigaltstack: 1 recvmsg: 1 getrandom: 1 getdents: 1 +lseek: 1 -- cgit 1.4.1