device busy attribute to prevent attaching devices whose children are in use - #59
device busy attribute to prevent attaching devices whose children are in use#59piotrbartman wants to merge 2 commits into
Conversation
read /qubes-usb-devices/{id}/busy (set by children) from QubesDB and enforce it on USB attach
pre-attach raises QubesValueError if the device is busy.
USB extension needs its own read of the busy flag + its own attach-refusal
add tests
if one of subdevices are locally used (e.g. in sys-usb) the parent is considered busy
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026071723-devel&flavor=pull-requests Test run included the following:
Upload failures
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests22 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 25 fixed
Unstable testsDetails
Performance TestsPerformance degradation:19 performance degradations
Remaining performance tests:91 tests
|
Add busy mechanism as the BlockDevice bt for USBDevice:, see: QubesOS/qubes-core-admin/pull/840
a USB device is refused for attachment while one of its exposed block sub-devices is used.
USBDevice.busyreads/qubes-usb-devices/<id>/busythe same way as the block side; mark_busy() writes/clears it.qbool_untrusted_busy: absent key = free, anything else = busy, no fancy parsing, since as for now never wrote a false literal anyway (we remove the key instead).