VirtualBox

Changeset 84972 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jun 26, 2020 2:58:51 PM (4 years ago)
Author:
vboxsync
Message:

Additions/WINNT/SharedFolders: Provide a dedicated 32bit VBoxSF driver for Windows <= 7 linked against the W2K3 DDK rdbss.lib and link the default one against the WHL version for Windows >= 8

The reason for shipping two binaries now is that the mmap FsPerf tests failed under certain circumstances, FlushViewOfFile() would return ERROR_INVALID_PARAMETER.
This only happens when the file is opened readonly first, and then opened read/write again while the first open is still active. The test would go on creating
a mapping of the file using the read/write handle, close both handles and then modify the mapping. Upon flushing the mapping ERROR_INVALID_PARAMETER is returned
because RDBSS passes the readonly file handle to our shared folder driver which the host shared folder service complains about rightfully because it is readonly.
The request returns VERR_INVALID_HANDLE for the write which gets translated to ERROR_INVALID_PARAMETER.
This only happens on 32bit Windows 8 and newer when linked against the W2K3 rdbss.lib, the reason is unknown.
Using the WHL version solves this and to not run into weird compatibility issues on older versions we ship two variants now and the installer decides during
install time which one is used.

Location:
trunk/src/VBox/Additions/WINNT
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r84945 r84972  
    9191ifeq ($(KBUILD_TARGET_ARCH),x86)
    9292DRIVER_FILES += \
    93         $(PATH_STAGE_BIN)/additions/VBoxMouseNT.sys
     93        $(PATH_STAGE_BIN)/additions/VBoxMouseNT.sys \
     94        $(PATH_STAGE_BIN)/additions/VBoxSFW2K.sys
    9495endif
    9596DRIVER_FILES += \
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh

    r84945 r84972  
    302302
    303303  ; The Shared Folder IFS goes to the system directory
    304   !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     304  !if $%BUILD_TARGET_ARCH% == "x86"
     305    ; On x86 we have to use a different shared folder driver linked against an older RDBSS for Windows 7 and older.
     306    ${If} $g_strWinVersion == "2000"
     307    ${OrIf} $g_strWinVersion == "Vista"
     308    ${OrIf} $g_strWinVersion == "XP"
     309    ${OrIf} $g_strWinVersion == "7"
     310      !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxSFW2K.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     311    ${Else}
     312      !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     313    ${EndIf}
     314  !else
     315    !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     316  !endif
     317
    305318  !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll" "$g_strSystemDir\VBoxMRXNP.dll" "$INSTDIR"
    306319  AccessControl::GrantOnFile "$g_strSystemDir\VBoxMRXNP.dll" "(BU)" "GenericRead"
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/Makefile.kmk

    r82968 r84972  
    2727#VBoxSF_DEFS       += LOG_ENABLED
    2828
    29 VBoxSF_SDKS.x86    = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K3)
    30 VBoxSF_SDKS.amd64  = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
     29VBoxSF_SDKS        = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
    3130
    3231VBoxSF_LDFLAGS.x86   = -Entry:DriverEntry@8
     
    4443        Win2kWorkaroundsA.asm
    4544
    46 VBoxSF_LIBS.x86 = \
    47         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/rxce.lib \
     45VBoxSF_LIBS = \
     46        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rxce.lib \
    4847        $(VBoxSF_0_OUTDIR)/rdbsslib.lib \
    49         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/copysup.lib \
    50         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \
    51         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/hal.lib \
    52         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ksecdd.lib \
    53         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib
    54 
    55 VBoxSF_LIBS.amd64  = \
    56         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.amd64)/rxce.lib \
    57         $(VBoxSF_0_OUTDIR)/rdbsslib.lib \
    58         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.amd64)/copysup.lib \
    59         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.amd64)/ntoskrnl.lib \
    60         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.amd64)/hal.lib \
    61         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.amd64)/ksecdd.lib \
    62         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.amd64)/BufferOverflowK.lib
    63 
    64 VBoxSF_LIBS = \
     48        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/copysup.lib \
     49        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
     50        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \
     51        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib \
     52        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib \
     53        \
    6554        $(VBOX_LIB_VBGL_R0) \
    6655        $(VBOX_LIB_IPRT_GUEST_R0)
     
    7059
    7160
     61ifeq ($(KBUILD_TARGET_ARCH),x86)
     62 SYSMODS += VBoxSFW2K
     63
     64 VBoxSFW2K_EXTENDS      := VBoxSF
     65 VBoxSFW2K_SDKS         = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K3)
     66 VBoxSFW2K_LIBS         = \
     67        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/rxce.lib \
     68        $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib \
     69        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/copysup.lib \
     70        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \
     71        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/hal.lib \
     72        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ksecdd.lib \
     73        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib \
     74        \
     75        $(VBOX_LIB_VBGL_R0) \
     76        $(VBOX_LIB_IPRT_GUEST_R0)
     77 VBoxSFW2K_CLEAN = \
     78        $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib
     79endif
     80
    7281include $(FILE_KBUILD_SUB_FOOTER)
    7382
    7483$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSF_0_OUTDIR)/rdbsslib.lib)
     84
    7585ifeq ($(KBUILD_TARGET_ARCH),x86)
    76 $(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
     86$(VBoxSF_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
     87        $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
     88        $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
     89                --select "write.obj" \
     90               --redefine-sym "__imp__CcFlushCache@16=_g_pfnWrFlushCache" \
     91               --redefine-sym "__imp__CcPurgeCacheSection@16=_g_pfnWrPurgeCacheSection" \
     92                --select "read.obj" \
     93               --redefine-sym "__imp__CcFlushCache@16=_g_pfnRdFlushCache"
     94
     95$(call KB_FN_AUTO_CMD_DEPS,$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib)
     96$(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib: $$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib | $$(dir $$@) $(VBOX_EDIT_COFF_LIB)
    7797        $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
    7898        $(VBOX_EDIT_COFF_LIB) --input "$(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.$(KBUILD_TARGET_ARCH))/rdbsslib.lib" --output "$@" \
Note: See TracChangeset for help on using the changeset viewer.

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