On Tue, 21 Oct 2025, Mark Johnston wrote:

The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e11768e94787bef2866486ba8616353716a10447

commit e11768e94787bef2866486ba8616353716a10447
Author:     Mark Johnston <[email protected]>
AuthorDate: 2025-10-21 17:34:29 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2025-10-21 17:34:29 +0000

   vmm: Add PRIV_DRIVER checks for passthru ioctls

   In preparation for allowing non-root users to create and access bhyve
   VMs, add privilege checks for ioctls which operate on passthru devices.

Does this mean we need to have a way to give a user a priveledge in order
to also use pssthru (likely not easily possible currently; different longer
topic I am happy to talk about as it came up elsewhere recently).

That said if we go there I think DRIVER may be a dangerous priveledge
but then again the user may need to setup interfaces for networking just
as well which is kind of orthotognal to the system administration concept.

Giving a user PRIV_DRIVER is likely never ever going to be a good idea given
the catchall it is used as so we one day might need a more flexible, more
finegrained system ...


So in conclusion what your commit message is saying (if I understand it right):
a user will be allowed to start bhyve but not be allowed to use certain 
features,
like passthru?


   Reviewed by:    corvink
   MFC after:      2 weeks
   Sponsored by:   The FreeBSD Foundation
   Sponsored by:   Klara, Inc.
   Differential Revision:  https://reviews.freebsd.org/D53144
---
sys/amd64/vmm/vmm_dev_machdep.c | 18 +++++++++++-------
sys/dev/vmm/vmm_dev.c           |  7 +++++++
sys/dev/vmm/vmm_dev.h           |  1 +
3 files changed, 19 insertions(+), 7 deletions(-)

--
Bjoern A. Zeeb                                                     r15:7

Reply via email to