[pve-devel] [PATCH cluster/guest-common/manager/qemu-server v3 00/11] fix #5657: allow configuring RNG device as non-root user
Filip Schauer
f.schauer at proxmox.com
Mon Feb 10 16:37:23 CET 2025
Allow users with the VM.Config.HWType privilege to configure VirtIO RNG
devices on VMs with either /dev/urandom or /dev/random as the entropy
source.
Further introduce hardware RNG device mapping to be able to selectively
allow non-root users with the Mapping.Use privilege to configure
hardware RNG devices as entropy sources.
Changes since v2:
* Restrict RNG device format to enum of
* Add descriptive commit message
* Code style fixes
* Remove outdated remarks about entropy stravation of /dev/random
* Split helpers for VirtIO RNG command line arguments into its own
commit
* Add explicit "use PVE::QemuServer::RNG;" statement to PVE/API2/Qemu.pm
* Fix "map: type check ('array') failed" error when adding a mapping in
the UI
* ui: split resource mapping types into tabbed views
Changes since v1:
* Restrict use of /dev/hwrng to the root user
* introduce hardware RNG mapping
pve-guest-common:
Filip Schauer (1):
mapping: add a hardware RNG mapping config
src/Makefile | 1 +
src/PVE/Mapping/HWRNG.pm | 147 +++++++++++++++++++++++++++++++++++++++
2 files changed, 148 insertions(+)
create mode 100644 src/PVE/Mapping/HWRNG.pm
pve-cluster:
Filip Schauer (1):
cfs: add 'mapping/hwrng.cfg' to observed files
src/PVE/Cluster.pm | 1 +
src/pmxcfs/status.c | 1 +
2 files changed, 2 insertions(+)
pve-manager:
Filip Schauer (5):
introduce hardware rng mapping api
introduce hardware rng scanning api
ui: add hardware RNG resource mapping
ui: allow use of mapped hardware RNGs as entropy sources for VMs
ui: split resource mapping types into tabbed views
PVE/API2/Cluster/Mapping.pm | 7 +
PVE/API2/Cluster/Mapping/HWRNG.pm | 286 ++++++++++++++++++
PVE/API2/Cluster/Mapping/Makefile | 5 +-
PVE/API2/Hardware.pm | 7 +
PVE/API2/Hardware/HWRNG.pm | 47 +++
PVE/API2/Hardware/Makefile | 1 +
www/manager6/Makefile | 12 +-
www/manager6/data/PermPathStore.js | 1 +
www/manager6/dc/Config.js | 41 +--
www/manager6/form/HWRNGMapSelector.js | 99 ++++++
www/manager6/qemu/HardwareView.js | 9 +-
www/manager6/qemu/RNGEdit.js | 79 +++--
www/manager6/resource-map/HWRNGMapEdit.js | 149 +++++++++
www/manager6/resource-map/HWRNGMapView.js | 76 +++++
.../{window => resource-map}/PCIMapEdit.js | 2 +-
.../{dc => resource-map}/PCIMapView.js | 4 +-
www/manager6/resource-map/ResourceMapView.js | 23 ++
.../{window => resource-map}/USBMapEdit.js | 2 +-
.../{dc => resource-map}/USBMapView.js | 4 +-
19 files changed, 778 insertions(+), 76 deletions(-)
create mode 100644 PVE/API2/Cluster/Mapping/HWRNG.pm
create mode 100644 PVE/API2/Hardware/HWRNG.pm
create mode 100644 www/manager6/form/HWRNGMapSelector.js
create mode 100644 www/manager6/resource-map/HWRNGMapEdit.js
create mode 100644 www/manager6/resource-map/HWRNGMapView.js
rename www/manager6/{window => resource-map}/PCIMapEdit.js (99%)
rename www/manager6/{dc => resource-map}/PCIMapView.js (96%)
create mode 100644 www/manager6/resource-map/ResourceMapView.js
rename www/manager6/{window => resource-map}/USBMapEdit.js (99%)
rename www/manager6/{dc => resource-map}/USBMapView.js (95%)
qemu-server:
Filip Schauer (4):
refactor: move rng related code into its own module
add helpers for VirtIO RNG command line arguments
allow non-root users to set /dev/u?random as an RNG source
let VirtIO RNG devices source entropy from mapped HWRNGs
PVE/API2/Qemu.pm | 48 +++++++++++++
PVE/QemuServer.pm | 97 ++++++-------------------
PVE/QemuServer/Makefile | 1 +
PVE/QemuServer/RNG.pm | 153 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 224 insertions(+), 75 deletions(-)
create mode 100644 PVE/QemuServer/RNG.pm
Summary over all repositories:
27 files changed, 1152 insertions(+), 151 deletions(-)
--
Generated by git-murpp 0.6.0
More information about the pve-devel
mailing list