There were a lot, but it seems to be a loop within libusb.
So qemu uses libusb and libusb on udev_enumerate_scan_devices uses libudev.
That is on libusb_init called from qemu within the scope of a qdev_device_add.
This is in qemu's "usb_host_init" to initialize "static libusb_context *ctx;"
The apparmor denies kill it's internal representation of the devices and thereby make the attach fail.
While attaching: sys_enter_ open -R --pid 24846 --call-graph dwarf sleep 10
7fc9f16d81 60 __opendir (/lib/x86_ 64-linux- gnu/libc- 2.23.so)
7fc9f66545 5c [unknown] (/lib/x86_ 64-linux- gnu/libudev. so.1.6. 4)
7fc9f664a5 ac udev_enumerate_ scan_devices (/lib/x86_ 64-linux- gnu/libudev. so.1.6. 4)
7fc9f2a4ab 25 [unknown] (/lib/x86_ 64-linux- gnu/libusb- 1.0.so. 0.1.0)
7fc9f2a486 e1 [unknown] (/lib/x86_ 64-linux- gnu/libusb- 1.0.so. 0.1.0)
7fc9f2a40b 1d libusb_init (/lib/x86_ 64-linux- gnu/libusb- 1.0.so. 0.1.0)
bd11d7a0f2 [unknown] (/usr/bin/ qemu-system- x86_64)
bd11d7b952 [unknown] (/usr/bin/ qemu-system- x86_64)
bd11d4c7e1 [unknown] (/usr/bin/ qemu-system- x86_64)
bd11c94bb5 [unknown] (/usr/bin/ qemu-system- x86_64)
bd11dd8e4e [unknown] (/usr/bin/ qemu-system- x86_64)
bd11ddccc1 object_ property_ set_qobject (/usr/bin/ qemu-system- x86_64)
bd11ddab60 object_ property_ set_bool (/usr/bin/ qemu-system- x86_64)
bd11c1544d qdev_device_add (/usr/bin/ qemu-system- x86_64)
$ perf record -e syscalls:
Gives:
There were a lot, but it seems to be a loop within libusb. scan_devices uses libudev.
So qemu uses libusb and libusb on udev_enumerate_
That is on libusb_init called from qemu within the scope of a qdev_device_add.
This is in qemu's "usb_host_init" to initialize "static libusb_context *ctx;"
The apparmor denies kill it's internal representation of the devices and thereby make the attach fail.