1
0
forked from pool/virtualbox
virtualbox/fixes_for_Leap15.1.patch
Larry Finger 2296780557 Accepting request 696073 from home:lwfinger:branches:openSUSE:Factory
- Updated file "Fixes_for_Leap15.1.patch" to handle one addition problem due to backporting of kernel APIa.
  Remove "BuildRequires: quilt" - that package is not needed.
  VirtualBox 6.0.6 fixes the following: CVE-2019-2656, CVE-2019-2680, CVE-2019-2696, CVE-2019-2703, CVE-2019-2721,
                                        CVE-2019-2722, CVE-2019-2723, CVE-2019-2657, CVE-2019-2690, CVE-2019-2679,
                                        CVE-2019-2678, and CVE-2019-2574 boo#1132827.

- Version bump to 6.0.6 (released April 17 2019 by Oracle)
The following files in the openSUSE implemetation are removed: "fix_32_bit_builds.patch", "fixes_for_5.0.patch", and
"fixes_for_5.1.patch". These issues are fixed upstream.

OBS-URL: https://build.opensuse.org/request/show/696073
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=486
2019-04-30 00:56:27 +00:00

169 lines
7.2 KiB
Diff

Index: VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_drv.c
===================================================================
--- VirtualBox-6.0.6.orig/src/VBox/Additions/linux/drm/vbox_drv.c
+++ VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_drv.c
@@ -283,12 +283,6 @@ static struct drm_driver driver = {
.lastclose = vbox_driver_lastclose,
.master_set = vbox_master_set,
.master_drop = vbox_master_drop,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
-# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) && !defined(RHEL_75)
- .set_busid = drm_pci_set_busid,
-# endif
-#endif
-
.fops = &vbox_fops,
.irq_handler = vbox_irq_handler,
.name = DRIVER_NAME,
Index: VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_mode.c
===================================================================
--- VirtualBox-6.0.6.orig/src/VBox/Additions/linux/drm/vbox_mode.c
+++ VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_mode.c
@@ -498,7 +498,8 @@ static void vbox_set_edid(struct drm_con
for (i = 0; i < EDID_SIZE - 1; ++i)
sum += edid[i];
edid[EDID_SIZE - 1] = (0x100 - (sum & 0xFF)) & 0xFF;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || \
+ defined(CONFIG_SUSE_VERSION)
drm_connector_update_edid_property(connector, (struct edid *)edid);
#else
drm_mode_connector_update_edid_property(connector, (struct edid *)edid);
@@ -669,7 +670,8 @@ static int vbox_connector_init(struct dr
drm_connector_register(connector);
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || \
+ defined(CONFIG_SUSE_VERSION)
drm_connector_attach_encoder(connector, encoder);
#else
drm_mode_connector_attach_encoder(connector, encoder);
Index: VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_ttm.c
===================================================================
--- VirtualBox-6.0.6.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
+++ VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_ttm.c
@@ -210,7 +210,8 @@ static struct ttm_backend_func vbox_tt_b
.destroy = &vbox_ttm_backend_destroy,
};
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
unsigned long size,
u32 page_flags,
@@ -227,7 +228,8 @@ static struct ttm_tt *vbox_ttm_tt_create
return NULL;
tt->func = &vbox_tt_backend_func;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
#else
if (ttm_tt_init(tt, bo, page_flags)) {
@@ -240,7 +242,8 @@ static struct ttm_tt *vbox_ttm_tt_create
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
-# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
+# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
{
return ttm_pool_populate(ttm);
@@ -274,7 +277,8 @@ static struct ttm_bo_driver vbox_bo_driv
.io_mem_reserve = &vbox_ttm_io_mem_reserve,
.io_mem_free = &vbox_ttm_io_mem_free,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL_75)
-# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
+# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
.io_mem_pfn = ttm_bo_default_io_mem_pfn,
# endif
#endif
@@ -420,7 +424,8 @@ int vbox_bo_create(struct drm_device *de
ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size,
ttm_bo_type_device, &vboxbo->placement,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && !defined(RHEL_76)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
align >> PAGE_SHIFT, false, NULL, acc_size,
#else
align >> PAGE_SHIFT, false, acc_size,
@@ -449,7 +454,8 @@ static inline u64 vbox_bo_gpu_offset(str
int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76) || \
+ defined(CONFIG_SUSE_VERSION)
struct ttm_operation_ctx ctx = { false, false };
#endif
int i, ret;
@@ -467,7 +473,8 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
for (i = 0; i < bo->placement.num_placement; i++)
PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
#else
ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
@@ -485,7 +492,8 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
int vbox_bo_unpin(struct vbox_bo *bo)
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76) || \
+ defined(CONFIG_SUSE_VERSION)
struct ttm_operation_ctx ctx = { false, false };
#endif
int i, ret;
@@ -501,7 +509,8 @@ int vbox_bo_unpin(struct vbox_bo *bo)
for (i = 0; i < bo->placement.num_placement; i++)
PLACEMENT_FLAGS(bo->placements[i]) &= ~TTM_PL_FLAG_NO_EVICT;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
#else
ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
@@ -519,7 +528,8 @@ int vbox_bo_unpin(struct vbox_bo *bo)
*/
int vbox_bo_push_sysram(struct vbox_bo *bo)
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76) || \
+ defined(CONFIG_SUSE_VERSION)
struct ttm_operation_ctx ctx = { false, false };
#endif
int i, ret;
@@ -540,7 +550,8 @@ int vbox_bo_push_sysram(struct vbox_bo *
for (i = 0; i < bo->placement.num_placement; i++)
PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) && \
+ !defined(CONFIG_SUSE_VERSION)
ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
#else
ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
Index: VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_main.c
===================================================================
--- VirtualBox-6.0.6.orig/src/VBox/Additions/linux/drm/vbox_main.c
+++ VirtualBox-6.0.6/src/VBox/Additions/linux/drm/vbox_main.c
@@ -600,7 +600,7 @@ int vbox_dumb_destroy(struct drm_file *f
}
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && !defined(CONFIG_SUSE_VERSION)
static void ttm_bo_put(struct ttm_buffer_object *bo)
{
ttm_bo_unref(&bo);