From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Michael Thayer <michael.thayer@oracle.com>,
"Knut St . Osmundsen" <knut.osmundsen@oracle.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] virt: vbox: Implement passing requestor info to the host for VirtualBox 6.0.x
Date: Wed, 20 Mar 2019 19:26:14 +0100 [thread overview]
Message-ID: <20190320182614.GB3907@kroah.com> (raw)
In-Reply-To: <20190320093519.26029-1-hdegoede@redhat.com>
On Wed, Mar 20, 2019 at 10:35:19AM +0100, Hans de Goede wrote:
> diff --git a/drivers/virt/vboxguest/vboxguest_version.h b/drivers/virt/vboxguest/vboxguest_version.h
> index 77f0c8f8a231..84834dad38d5 100644
> --- a/drivers/virt/vboxguest/vboxguest_version.h
> +++ b/drivers/virt/vboxguest/vboxguest_version.h
> @@ -9,11 +9,10 @@
> #ifndef __VBOX_VERSION_H__
> #define __VBOX_VERSION_H__
>
> -/* Last synced October 4th 2017 */
We don't care about the date sync anymore?
> -#define VBG_VERSION_MAJOR 5
> -#define VBG_VERSION_MINOR 2
> +#define VBG_VERSION_MAJOR 6
> +#define VBG_VERSION_MINOR 0
> #define VBG_VERSION_BUILD 0
> -#define VBG_SVN_REV 68940
> -#define VBG_VERSION_STRING "5.2.0"
> +#define VBG_SVN_REV 127566
> +#define VBG_VERSION_STRING "6.0.0"
Do we really need to keep track of this?
>
> #endif
> diff --git a/drivers/virt/vboxguest/vmmdev.h b/drivers/virt/vboxguest/vmmdev.h
> index 5e2ae978935d..6337b8d75d96 100644
> --- a/drivers/virt/vboxguest/vmmdev.h
> +++ b/drivers/virt/vboxguest/vmmdev.h
> @@ -98,8 +98,8 @@ struct vmmdev_request_header {
> s32 rc;
> /** Reserved field no.1. MBZ. */
> u32 reserved1;
> - /** Reserved field no.2. MBZ. */
> - u32 reserved2;
> + /** IN: Requestor information (VMMDEV_REQUESTOR_*) */
> + u32 requestor;
They didn't use the first reserved field? Oh well :(
> --- a/include/uapi/linux/vbox_vmmdev_types.h
> +++ b/include/uapi/linux/vbox_vmmdev_types.h
> @@ -102,6 +102,37 @@ enum vmmdev_request_type {
> #define VMMDEVREQ_HGCM_CALL VMMDEVREQ_HGCM_CALL32
> #endif
>
> +/* vmmdev_request_header.requestor defines */
> +
> +/* Requestor user not given. */
> +#define VMMDEV_REQUESTOR_USR_NOT_GIVEN 0x00000000
> +/* The kernel driver (VBoxGuest) is the requestor. */
> +#define VMMDEV_REQUESTOR_USR_DRV 0x00000001
> +/* Some other kernel driver is the requestor. */
> +#define VMMDEV_REQUESTOR_USR_DRV_OTHER 0x00000002
> +/* The root or a admin user is the requestor. */
> +#define VMMDEV_REQUESTOR_USR_ROOT 0x00000003
> +/* Regular joe user is making the request. */
> +#define VMMDEV_REQUESTOR_USR_USER 0x00000006
> +/* User classification mask. */
> +#define VMMDEV_REQUESTOR_USR_MASK 0x00000007
> +/* Kernel mode request. */
> +#define VMMDEV_REQUESTOR_KERNEL 0x00000000
Wait, isn't that the same as VMMDEV_REQUESTOR_USR_NOT_GIVEN?
> +/* User mode request. */
> +#define VMMDEV_REQUESTOR_USERMODE 0x00000008
> +/* Don't know the physical console association of the requestor. */
> +#define VMMDEV_REQUESTOR_CON_DONT_KNOW 0x00000000
And here, why is this number recycled?
> +/* Console classification mask. */
> +#define VMMDEV_REQUESTOR_CON_MASK 0x00000040
> +/* Requestor is member of special VirtualBox user group. */
> +#define VMMDEV_REQUESTOR_GRP_VBOX 0x00000080
Can you add a blank line here to make it more obvious it is "TRUST"
stuff here?
> +/* Requestor trust level: Unspecified */
> +#define VMMDEV_REQUESTOR_TRUST_NOT_GIVEN 0x00000000
> +/* Requestor trust level mask */
> +#define VMMDEV_REQUESTOR_TRUST_MASK 0x00007000
So those bits are the "trust" values?
that's odd, oh well, it's their api, not ours :(
> +/* Requestor is using the less trusted user device node (/dev/vboxuser) */
> +#define VMMDEV_REQUESTOR_USER_DEVICE 0x00008000
Wait, what is this for?
So the dev node isn't as "trusted" as some other api? Why not?
confused,
greg k-h
next prev parent reply other threads:[~2019-03-20 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 9:35 [PATCH] virt: vbox: Implement passing requestor info to the host for VirtualBox 6.0.x Hans de Goede
2019-03-20 9:46 ` Greg Kroah-Hartman
2019-03-20 9:52 ` Hans de Goede
2019-03-20 18:19 ` Greg Kroah-Hartman
2019-03-20 19:52 ` Hans de Goede
2019-03-20 18:26 ` Greg Kroah-Hartman [this message]
2019-03-22 7:58 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190320182614.GB3907@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=hdegoede@redhat.com \
--cc=knut.osmundsen@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.thayer@oracle.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.