Guest User

vmnet-15.0.3-5.0.patch

a guest
Mar 23rd, 2019
243
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -urN a/vmnet-only/Makefile b/vmnet-only/Makefile
  2. --- a/vmnet-only/Makefile 2019-03-23 13:44:04.625219877 +0100
  3. +++ b/vmnet-only/Makefile 2019-03-23 13:51:37.186069807 +0100
  4. @@ -107,7 +107,7 @@
  5. postbuild:: ;
  6.  
  7. $(DRIVER_KO): prebuild
  8. - $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
  9. + $(MAKE) -C $(BUILD_DIR) M=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
  10. MODULEBUILDDIR=$(MODULEBUILDDIR) modules
  11. $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
  12. MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
  13. diff -urN a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
  14. --- a/vmnet-only/Makefile.kernel 2019-03-23 13:44:04.625219877 +0100
  15. +++ b/vmnet-only/Makefile.kernel 2019-03-23 13:51:37.186069807 +0100
  16. @@ -32,6 +32,6 @@
  17. ####
  18.  
  19. clean:
  20. - rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko \
  21. + rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko .cache.mk \
  22. .tmp_versions Module.symvers Modules.symvers Module.markers \
  23. modules.order $($(DRIVER)-y) .*.cmd .*.o.flags
  24. diff -urN a/vmnet-only/userif.c b/vmnet-only/userif.c
  25. --- a/vmnet-only/userif.c 2019-03-23 13:44:04.625219877 +0100
  26. +++ b/vmnet-only/userif.c 2019-03-23 13:51:37.186069807 +0100
  27. @@ -85,6 +85,12 @@
  28. # define compat_kunmap(page) kunmap((page).p)
  29. #endif
  30.  
  31. +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) && defined(VERIFY_WRITE)
  32. + #define write_access_ok(addr, size) access_ok(VERIFY_WRITE, addr, size)
  33. +#else
  34. + #define write_access_ok(addr, size) access_ok(addr, size)
  35. +#endif
  36. +
  37. /*
  38. *-----------------------------------------------------------------------------
  39. *
  40. @@ -142,7 +148,7 @@
  41. struct page **p, // OUT: locked page
  42. void **ptr) // OUT: kernel mapped pointer
  43. {
  44. - if (!access_ok(VERIFY_WRITE, (void *)uAddr, size) ||
  45. + if (!write_access_ok((void *)uAddr, size) ||
  46. (((uAddr + size - 1) & ~(PAGE_SIZE - 1)) !=
  47. (uAddr & ~(PAGE_SIZE - 1)))) {
  48. return -EINVAL;
  49. diff -urN a/vmnet-only/vm_device_version.h b/vmnet-only/vm_device_version.h
  50. --- a/vmnet-only/vm_device_version.h 2019-03-23 13:44:04.625219877 +0100
  51. +++ b/vmnet-only/vm_device_version.h 2019-03-23 13:51:37.189403122 +0100
  52. @@ -35,6 +35,8 @@
  53. #endif
  54. #endif
  55.  
  56. +#include <linux/pci_ids.h>
  57. +
  58. /* LSILogic 53C1030 Parallel SCSI controller
  59. * LSILogic SAS1068 SAS controller
  60. */
  61. @@ -53,7 +55,10 @@
  62. * VMware HD Audio codec
  63. * VMware HD Audio controller
  64. */
  65. +#ifndef PCI_VENDOR_ID_VMWARE
  66. #define PCI_VENDOR_ID_VMWARE 0x15AD
  67. +#endif
  68. +
  69. #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
  70. #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
  71. #define PCI_DEVICE_ID_VMWARE_VGA 0x0711
  72. @@ -70,7 +75,11 @@
  73. #define PCI_DEVICE_ID_VMWARE_1394 0x0780
  74. #define PCI_DEVICE_ID_VMWARE_BRIDGE 0x0790
  75. #define PCI_DEVICE_ID_VMWARE_ROOTPORT 0x07A0
  76. +
  77. +#ifndef PCI_DEVICE_ID_VMWARE_VMXNET3
  78. #define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0
  79. +#endif
  80. +
  81. #define PCI_DEVICE_ID_VMWARE_PVSCSI 0x07C0
  82. #define PCI_DEVICE_ID_VMWARE_82574 0x07D0
  83. #define PCI_DEVICE_ID_VMWARE_AHCI 0x07E0
RAW Paste Data