From: Hans de Goede <hdegoede@redhat.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Thayer <michael.thayer@oracle.com>,
"Knut St . Osmundsen" <knut.osmundsen@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH resend v2 0/3] virt: Add vboxguest driver for Virtual Box Guest integration
Date: Wed, 29 Nov 2017 13:54:43 +0100 [thread overview]
Message-ID: <6c62cc63-f461-b421-fe87-19138fd0518f@redhat.com> (raw)
In-Reply-To: <7f5d966c-8ad9-810b-7b6e-fe8ac0c698ff@lwfinger.net>
Hi,
On 28-11-17 17:15, Larry Finger wrote:
> On 11/28/2017 04:01 AM, Hans de Goede wrote:
>> Hi,
>>
>
>>> I did have two problems when I tried to build these commits and the one that creates vboxsf.
>>>
>>> The more serious one is that it is possible to build vboxguest without vboxvideo. When that happens, a non-privileged user cannot start X. As I say in the review, > I think that combination does not make sense and should not be allowed.
>>
>> vboxguest and vboxvideo are completely independent at least from the kernel pov,
>> I do not believe that making them depend on each other makes sense.
>>
>> AFAIK a non-privileged user cannot start X without vboxvideo at all, independent
>> of vboxguest being build or not. Falling back to vesa modesetting always requires
>> Xorg to be suid root, or the user to be privileged.
>>
>> TL;DR: I can add a dependency between the 2, but I would rather not.
>
> Keep in mind that at some point, the newest kernel will support vboxvideo and vboxguest; however, any distribution package will still need to contain both kernel modules so that older kernels will work. My test showed that loading an in-kernel vboxguest with Oracle's vboxvideo fails *unless* you run as root, which is not acceptable.
Hmm, I guess what is happening here is that the vbox provided vboxguest is not loading
because the one built into the kernel is not loading, and then vboxvideo does not load
because it depends on symbols from vboxguest. But the vboxvideo shipped with the guest
additions has been changed to no longer depend on vboxguest quite a while ago, so with
current guest additions this should not be an issue and functionality wise the 2
vboxguest drivers are equivalent.
"depends on" / "select" really are reserved for when drivers use symbols from another
module and not to express weird interactions like this. There are many ways a .config
can be made which userspace will not like, yet we still allow this. IMHO adding a
depends on between 2 independent modules is simply just wrong.
For the next version I will add a text to the help part of the Kconfig advising to also
enable the vboxvideo driver. That really is the best we can do IMHO.
Talking about the next version, yesterday I ran out of time while working on this,
I hope to post a v3 addressing your review comments today.
> When both are in the kernel, then Xorg starts for a non-privaleged user. That is why I think you need either a "depends on VBOXVIDEO" or a "selects VBOXVIDEO" in the Kconfig for vboxvideo. My preference is for the latter.
>
>>> When the system is booted, vboxsf is not loaded, and the shared folders are not automounted. Of course, that issue is not germane to these patches, but will be important when vboxsf is merged.
>>
>> Hmm, I mount a couple of shares from rc.local (I don't use vbox' automount as I
>> want to specify a uid for the files) and as soon as mount.vboxsf gets executed
>> the vboxsf module gets auto-loaded as the module contains:
>>
>> MODULE_ALIAS_FS("vboxsf");
>>
>> AFAIK the communication of which volumes to automount is done through vboxguest,
>> anyways I will look into this before submitting vboxsf, in the worst case
>> we need to drop a modprobe.conf.d/vboxguest.conf file which has a postinst vboxguest
>> which loads vboxsf.
>
> Thanks. Adding something of this type will make the in-kernel version match the Oracle documentation.
Regards,
Hans
prev parent reply other threads:[~2017-11-29 12:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-26 15:12 Hans de Goede
2017-11-26 15:12 ` [PATCH resend v2 1/3] virt: Add vboxguest driver for Virtual Box Guest integration UAPI Hans de Goede
2017-11-27 19:44 ` Larry Finger
2017-11-28 10:08 ` Hans de Goede
2017-11-26 15:12 ` [PATCH resend v2 2/3] virt: Add vboxguest VMMDEV communication code Hans de Goede
2017-11-27 19:46 ` Larry Finger
2017-11-29 13:17 ` Hans de Goede
2017-11-26 15:12 ` [PATCH resend v2 3/3] virt: Add vboxguest driver for Virtual Box Guest integration Hans de Goede
2017-11-27 19:46 ` Larry Finger
2017-11-29 14:16 ` Hans de Goede
2017-11-27 19:44 ` [PATCH resend v2 0/3] " Larry Finger
2017-11-28 10:01 ` Hans de Goede
2017-11-28 16:15 ` Larry Finger
2017-11-29 12:54 ` Hans de Goede [this message]
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=6c62cc63-f461-b421-fe87-19138fd0518f@redhat.com \
--to=hdegoede@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=knut.osmundsen@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.thayer@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®