Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2025 21:02:59 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Mark Johnston <markj@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,  dev-commits-src-main@FreeBSD.org
Subject:   Re: git: e11768e94787 - main - vmm: Add PRIV_DRIVER checks for  passthru ioctls
Message-ID:  <5pr96847-3p44-6043-50o4-4np23n9022q3@mnoonqbm.arg>
In-Reply-To: <202510211749.59LHnJ49029334@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

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 <markj@FreeBSD.org>
> AuthorDate: 2025-10-21 17:34:29 +0000
> Commit:     Mark Johnston <markj@FreeBSD.org>
> 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5pr96847-3p44-6043-50o4-4np23n9022q3>