summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2023-02-17 18:50:51 +0100
committerJean-Marc Lenoir2023-02-17 18:50:51 +0100
commitb159466470eaaaaa33f2c520ac7d549e669bfb7a (patch)
tree726afc99e595ac44afbce5d34fa5274b3b369069
parentad52eeab18be73510ef6bbbbedd503f48462afa2 (diff)
downloadaur-b159466470eaaaaa33f2c520ac7d549e669bfb7a.tar.gz
Sync with vmware-workstation 17.0.1
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--vmnet.patch133
-rw-r--r--vmware-workstation.install2
4 files changed, 66 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0a35e434412f..e2c4fce61464 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vmware-workstation14
pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC.
pkgver = 14.1.7
- pkgrel = 18
+ pkgrel = 19
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
@@ -89,6 +89,6 @@ pkgbase = vmware-workstation14
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
sha256sums = b8ed84e5e33b4f856f1f4ad2a55de3e551a2db4e20b4f25c61d85e2dba0bdf64
- sha256sums = 0ff9dbb139c30f9bed57ae2a3bd493d071d0a1fc89bb12ef584ee75525d4ef33
+ sha256sums = fca821216582060e4e05d7e10dd3ad5c8ca0f575a9060e8369a8331a2968e707
pkgname = vmware-workstation14
diff --git a/PKGBUILD b/PKGBUILD
index feaed46b3001..c28034e666de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ pkgname=vmware-workstation14
pkgver=14.1.7
_buildver=12989993
_pkgver=${pkgver}_${_buildver}
-pkgrel=18
+pkgrel=19
pkgdesc='The industry standard for running multiple operating systems as virtual machines on a single Linux PC.'
arch=(x86_64)
url='https://www.vmware.com/products/workstation-for-linux.html'
@@ -126,7 +126,7 @@ sha256sums=(
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
'b8ed84e5e33b4f856f1f4ad2a55de3e551a2db4e20b4f25c61d85e2dba0bdf64'
- '0ff9dbb139c30f9bed57ae2a3bd493d071d0a1fc89bb12ef584ee75525d4ef33'
+ 'fca821216582060e4e05d7e10dd3ad5c8ca0f575a9060e8369a8331a2968e707'
)
options=(!strip emptydirs)
diff --git a/vmnet.patch b/vmnet.patch
index 02952204df1d..ccedc64c39fb 100644
--- a/vmnet.patch
+++ b/vmnet.patch
@@ -319,78 +319,67 @@
if (port->jack.state == FALSE || hubJack == NULL) {
return -EINVAL;
}
-From 78b77816d39a77b1643426ece1ebd48776d83c1b Mon Sep 17 00:00:00 2001
-From: Michal Kubecek <mkubecek@suse.cz>
-Date: Fri, 7 Oct 2022 12:56:44 +0200
-Subject: [PATCH] vmnet: work around field-spanning write warning
-
-The vmnet code uses struct VNet_EventHeader for an event header which is
-followed by variable amount of payload data but does use a flexible array
-member like most similar structures. When building with FORTIFY_SOURCE
-against kernel 6.1-rc1, this results in runtime warnings like
-
- memcpy: detected field-spanning write (size 28) of single field "&t->event"
-
-in VNetEvent_Send() and VNetUserListenerEventHandler(). Create a helper for
-copying full event structure and for implement it using two separate copy
-statements, one for fixed header and one for the variable payload. Another
-approach would be the use of unsafe_memcpy() but this code does not seem to
-be performance critical so let us split the memcpy() instead.
----
- vmnet-only/vnet.h | 8 ++++++++
- vmnet-only/vnetEvent.c | 2 +-
- vmnet-only/vnetUserListener.c | 2 +-
- 3 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/vmnet-only/vnet.h b/vmnet-only/vnet.h
-index d6691d5c..d5bb5572 100644
---- a/vmnet-only/vnet.h
-+++ b/vmnet-only/vnet.h
-@@ -274,6 +274,7 @@ typedef struct VNet_EventHeader {
- uint32 eventId;
- uint32 classSet;
- uint32 type;
-+ char payload[];
- } VNet_EventHeader;
- #pragma pack(pop)
-
-@@ -291,6 +292,13 @@ typedef struct VNet_LinkStateEvent {
- } VNet_LinkStateEvent;
- #pragma pack(pop)
-
-+static inline void VNet_Event_copy(VNet_EventHeader *dst,
-+ const VNet_EventHeader *src)
-+{
-+ *dst = *src;
-+ memcpy(dst->payload, src->payload, src->size - sizeof(*src));
-+}
-+
- /*
- *----------------------------------------------------------------------------
- */
-diff --git a/vmnet-only/vnetEvent.c b/vmnet-only/vnetEvent.c
-index 3fda7f5a..062398e0 100644
---- a/vmnet-only/vnetEvent.c
-+++ b/vmnet-only/vnetEvent.c
-@@ -402,7 +402,7 @@ VNetEvent_Send(VNetEvent_Sender *s, // IN: a sender
- p->nextEvent = s->firstEvent;
- s->firstEvent = p;
+--- a/vmnet/vnetEvent.c
++++ b/vmnet/vnetEvent.c
+@@ -60,10 +60,12 @@
+
+ struct VNetEvent_EventNode {
+ VNetEvent_EventNode *nextEvent;
+- VNet_EventHeader event;
++ union {
++ VNet_EventHeader header;
++ VNet_LinkStateEvent lse;
++ } event;
+ };
+
+-#define EVENT_NODE_HEADER_SIZE offsetof(struct VNetEvent_EventNode, event)
+
+ struct VNetEvent_Mechanism {
+ VNetKernel_SpinLock lock; /* mechanism lock */
+@@ -369,6 +371,10 @@
+ return VNetKernel_EINVAL;
}
-- memcpy(&p->event, e, e->size);
-+ VNet_Event_copy(&p->event, e);
-
- /* send event */
- classSet = e->classSet;
-diff --git a/vmnet-only/vnetUserListener.c b/vmnet-only/vnetUserListener.c
-index 114f3907..e9f51755 100644
---- a/vmnet-only/vnetUserListener.c
-+++ b/vmnet-only/vnetUserListener.c
-@@ -226,7 +226,7 @@ VNetUserListenerEventHandler(void *context, // IN: the user listener
- return;
+
++ if (e->size > sizeof(p->event)) {
++ return VNetKernel_EINVAL;
++ }
++
+ /* lock */
+ VNetKernel_SpinLockAcquire(&m->lock);
+ m->handlerTask = VNetKernel_ThreadCurrent();
+@@ -378,22 +384,15 @@
+ while (TRUE) {
+ p = *q;
+ if (p == NULL ||
+- (p->event.eventId == e->eventId && p->event.type == e->type)) {
++ (p->event.header.eventId == e->eventId && p->event.header.type == e->type)) {
+ break;
+ }
+ q = &p->nextEvent;
}
- t->nextEvent = NULL;
-- memcpy(&t->event, e, e->size);
-+ VNet_Event_copy(&t->event, e);
- /* append event to event list */
- userListener = (VNetUserListener*)context;
+- /* remove previously sent event */
+- if (p != NULL && p->event.size != e->size) {
+- *q = p->nextEvent;
+- VNetKernel_MemoryFree(p);
+- p = NULL;
+- }
+-
+ /* insert new event into event list*/
+ if (p == NULL) {
+- p = VNetKernel_MemoryAllocate(EVENT_NODE_HEADER_SIZE + e->size);
++ p = VNetKernel_MemoryAllocate(sizeof(*p));
+ if (p == NULL) {
+ m->handlerTask = NULL;
+ VNetKernel_SpinLockRelease(&m->lock);
+@@ -485,8 +484,8 @@
+ while (s != NULL) {
+ e = s->firstEvent;
+ while (e != NULL) {
+- if ((e->event.classSet & classMask) != 0) {
+- h(data, &e->event);
++ if ((e->event.header.classSet & classMask) != 0) {
++ h(data, &e->event.header);
+ }
+ e = e->nextEvent;
+ }
diff --git a/vmware-workstation.install b/vmware-workstation.install
index 84025a35fb42..22d527c8f00c 100644
--- a/vmware-workstation.install
+++ b/vmware-workstation.install
@@ -24,7 +24,7 @@ EOF
post_remove() {
cat << EOF
-==> To remove VMware settings, delete /etc/vmware and /etc/vmware-installer directories.
+==> To completely clean VMware installation, you may have to manually delete /etc/vmware, /etc/vmware-installer and /usr/lib/vmware-installer directories if they still exist.
EOF
}