[SRU] Wrong permissions on vcio
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
raspberrypi-userland (Ubuntu) |
Fix Released
|
Undecided
|
Dave Jones | ||
Focal |
Fix Released
|
Undecided
|
Dave Jones | ||
Impish |
Fix Released
|
Undecided
|
Dave Jones |
Bug Description
[Impact]
The incorrect permissions on these devices mean the regular console user cannot access various videocore services. An example of a side-effect of this is that camera usage (via the new libcamera mechanism) requires root access. Likewise, usage of the GPU (under the KMS system) for H.264 decoding (via v4l2m2m) likewise requires root access.
[Test Plan]
* Flash the appropriate version to a fresh SD card and boot it
* sudo apt install libraspberrypi-bin # because it's not seeded on focal (this can be skipped on impish)
* sudo reboot
* ls -l /dev/vc* /dev/dma_heap/
* Note that /dev/vcio, /dev/vcsm-cma, /dev/vchiq, /dev/dma_heap/* have incorrect permissions (specifically, their ownership is not root:video and/or their mode is not 0664)
* sudo reboot
* sudo apt install libraspberrypi-bin
* sudo reboot
* ls -l /dev/vc* /dev/dma_heap/
* Note that /dev/vcio, /dev/vcsm-cma, /dev/vchiq, /dev/dma_heap/* now have correct permissions (root:video ownership, and mode 0664)
[Regression Potential]
Only the permission changes are being backported, not a fully updated userland. Nonetheless, existing functionality from userland should be re-tested, in particular the legacy camera stack, with the following procedure:
* Attach a raspberry pi camera module to the board
* Add "start_x=1" and "gpu_mem=128" to /boot/firmware/
* sudo reboot
* raspistill -o test.jpg
* Confirm that test.jpg contains a valid picture
The "tvservice" binary *may* be tested too, but is known to be inoperable under the arm64 architecture (see LP: #1944541). It is also worth noting that the test plan above only looks at the permissions as libcamera is not *currently* expected to operate on Focal.
Tests should be carried out on all supported boards (Zero 2, 2B, 3B, 3A+, 3B+, 4B) under both armhf and arm64 architectures (within the caveats noted above about the arm64 architecture).
[Original Description]
The /dev/vcio can have the wrong permissions due to a change in the kernel. As reported in https:/
Changed in raspberrypi-userland (Ubuntu): | |
assignee: | nobody → Dave Jones (waveform) |
status: | New → Confirmed |
milestone: | none → ubuntu-22.04 |
summary: |
- Wrong permissions on vcio + [SRU] Wrong permissions on vcio |
description: | updated |
description: | updated |
Changed in raspberrypi-userland (Ubuntu Impish): | |
assignee: | nobody → Dave Jones (waveform) |
Changed in raspberrypi-userland (Ubuntu Focal): | |
assignee: | nobody → Dave Jones (waveform) |
description: | updated |
description: | updated |
description: | updated |
Changed in raspberrypi-userland (Ubuntu Focal): | |
milestone: | none → ubuntu-20.04.4 |
tags: |
added: verification-done-focal removed: verification-needed-focal |
tags: |
added: verification-done-impish removed: verification-needed-impish |
Changed in raspberrypi-userland (Ubuntu Focal): | |
milestone: | ubuntu-20.04.4 → none |
Looks like our permissions on vcsm-cma were also incorrect, and we were missing permission overrides for the rpivid devices, and dma_heap for libcamera support. I've uploaded a 0ubuntu2 version which should patch all of these.
Note to self: some of this at least (probably not the libcamera bits?) ought to be backported to focal for .4