VirtualBox

Changeset 103788 in vbox


Ignore:
Timestamp:
Mar 11, 2024 5:50:25 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162157
Message:

Linux Additions: Add possiblity to prevent kernel modules from loading in kernel command line, bugref:8409.

Add to kernel command line either vboxguest.disabled=1 and/or vboxsf.disabled=1
and/or vboxvideo.disabled=1 in order to prevent certain module or all of them
from loading during system boot.

Location:
trunk/src/VBox/Additions
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r103024 r103788  
    8080#include <VBox/err.h>
    8181#include <VBox/log.h>
     82#include <VBox/VBoxLnxModInline.h>
    8283
    8384
     
    708709    PRTLOGGER                   pRelLogger;
    709710    int                         rc;
     711
     712    /* Check if modue loading was disabled. */
     713    if (!vbox_mod_should_load())
     714        return -EINVAL;
    710715
    711716    /*
  • trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest

    r103007 r103788  
    9999    ${PATH_ROOT}/include/VBox/VBoxGuestMangling.h=>include/VBox/VBoxGuestMangling.h \
    100100    ${PATH_ROOT}/include/VBox/version.h=>include/VBox/version.h \
     101    ${PATH_ROOT}/include/VBox/VBoxLnxModInline.h=>VBox/VBoxLnxModInline.h \
    101102    ${PATH_ROOT}/include/VBox/HostServices/GuestPropertySvc.h=>include/VBox/HostServices/GuestPropertySvc.h \
    102103    ${PATH_ROOT}/include/VBox/vmm/cpuidcall.h=>include/VBox/vmm/cpuidcall.h \
  • trunk/src/VBox/Additions/linux/drm/files_vboxvideo_drv

    r98103 r103788  
    3939    ${PATH_ROOT}/include/VBox/Graphics/VBoxVideoErr.h=>vbox_err.h \
    4040    ${PATH_ROOT}/include/VBox/Graphics/VBoxVideoVBE.h=>vboxvideo_vbe.h \
     41    ${PATH_ROOT}/include/VBox/VBoxLnxModInline.h=>VBox/VBoxLnxModInline.h \
    4142    ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp=>hgsmi_base.c \
    4243    ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp=>modesetting.c \
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.c

    r102874 r103788  
    6464#endif /* !CONFIG_VGA_CONSOLE */
    6565
     66#include <VBox/VBoxLnxModInline.h>
     67
    6668static int vbox_modeset = -1;
    6769
     
    414416static int __init vbox_init(void)
    415417{
     418        /* Check if modue loading was disabled. */
     419        if (!vbox_mod_should_load())
     420                return -EINVAL;
     421
    416422        printk("vboxvideo: loading version " VBOX_VERSION_STRING " r" __stringify(VBOX_SVN_REV) "\n");
    417423        if (VBOX_VIDEO_NOMODESET())
  • trunk/src/VBox/Additions/linux/sharedfolders/files_vboxsf

    r103007 r103788  
    7474    ${PATH_ROOT}/include/VBox/VMMDev.h=>include/VBox/VMMDev.h \
    7575    ${PATH_ROOT}/include/VBox/VMMDevCoreTypes.h=>include/VBox/VMMDevCoreTypes.h \
     76    ${PATH_ROOT}/include/VBox/VBoxLnxModInline.h=>VBox/VBoxLnxModInline.h \
    7677    ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibInternal.h=>VBoxGuestR0LibInternal.h \
    7778    ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibGenericRequest.cpp=>VBoxGuestR0LibGenericRequest.c \
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r103067 r103788  
    6464# include <linux/parser.h>
    6565#endif
     66#include <VBox/VBoxLnxModInline.h>
    6667
    6768
     
    16211622    SFLOGFLOW(("vboxsf: init\n"));
    16221623
     1624    /* Check if modue loading was disabled. */
     1625    if (!vbox_mod_should_load())
     1626        return -EINVAL;
     1627
    16231628    /*
    16241629     * Must be paranoid about the vbsf_mount_info_new size.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette