John Wolfe [Thu, 17 Jun 2021 18:47:50 +0000 (11:47 -0700)]
Prepare to make the 11.3.0 OVT release announcement.
- ReleaseNotes.md - copy in the iinitial (final ?) 11.3.0 OVT release notes.
- configure.ac = set the tools version to 11.3.0.
- buildNumber.h - set the build and product number from the internal
release build.
John Wolfe [Mon, 7 Jun 2021 15:25:09 +0000 (08:25 -0700)]
Add check that the packet size received is >= expected packet header size.
DnD RpcV3: A corrupted packet received may result in an out of bounds (OOB)
memory access if the length of the message received is less than the size
of the expected packet header.
John Wolfe [Mon, 7 Jun 2021 15:25:08 +0000 (08:25 -0700)]
Customization: Retry the Linux reboot if telinit is a soft link to systemctl.
Issues have been reported on some newer versions of Linux where the VM
failed to reboot at the end of a traditional customization. The command
'/sbin/telinit 6' exited abnormally due to SIGTERM sent by systemd and
where telinit is a symlink to systemctl.
This fix checks if telinit is a soft link to systemctl and if yes, retries
a system reboot until the telinit command succeeds or the reboot literally
happens.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Remove unwanted "volatile" from static variable used with g_once_init_enter()
The glib api documentation for g_once_init_enter() specifically states
that "volatile" should NOT be used with the address passed as the
argument. Recent compilers (GCC-11 & clang 11) and recent versions of
glib-2 will result in a warning that the "volatile" qualifier has been
dropped if it has been used.
Remove the unneeded and unwanted "volatile" qualifier from the definition
of "inited" in pollGtk.c.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Add backdoor support for host time of day in Arm
The timeSync plugin makes backdoor calls to get host time of day.
Update the time of day backdoor calls to function with the Arm
backdoor implementation. Also fix a bug where an error returned
by the GETTIME backdoor handler is incorrectly treated as a time value.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Common source file change not directly applicable to open-vm-tools.
Introduce peek() to the asyncsocket API, only supported by TCP vtable.
Peeks are similar to recv(), except that they do not drain the socket
after reading. Subsequent peek/recv reads the same data back. However
since recv does SSL_Read, a recv() following a peek() may not get the same
data as peek() after SSL is initialized. This is not a problem when
peeks are done before SSL setup.
Implementation notes:
- peek is a one-shot operation. The poll callback is unregistered
once it fires (recv keeps the callback until recv is cancelled).
- non-partial peek is not supported, so the peek callback will be fired when
any amount of data less than or equal amount of the requested length is
available in the socket buffer.
- It is possible to invoke recv() or peek() recursively from within the peek()
callback. A peek is disallowed from within the recv() callback.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Fix an ASSERT in bora/lib/misc/timeutil.c.
Fix a problem with TimeUtil_NtTimeToUnixTime on Arm that was encountered
when running tools tests on Apple silicon. The problem was the routine
assumed that a variable was 32-bits if VM_X86_64 was not defined. This
may have been true in the past, but it is no longer true now that the code
is also built for 64-bit Arm.
John Wolfe [Tue, 4 May 2021 02:39:41 +0000 (19:39 -0700)]
VGAuth: Use GUESTRPCPKT_FIELD_FAST_CLOSE flag for log messages.
VGauth is a single action service. With the GUESTRPCPKT_FIELD_FAST_CLOSE
flag added, VMX closes the vsocket as soon as the RPC response is sent.
This cleans up the vsocket connections faster and minimizes the number
of connect() failures in the guest.
John Wolfe [Tue, 4 May 2021 02:39:40 +0000 (19:39 -0700)]
Asyncsocket: Add comments about AsyncSocket_SetErrorFn usage.
Document that AsyncSocket_SetErrorFn must be called before an internal
asyncsocket callback can fire and trigger a call to the error handler.
The error handler must be set immediately after the asyncsocket is created,
either from the poll thread, which requires no additional synchronization,
or while holding the asyncsocket lock, which is passed via pollParams.
John Wolfe [Mon, 19 Apr 2021 18:08:10 +0000 (11:08 -0700)]
Fix issues using GCC 11 with gtk >= 3.20 and glib >=2.66.3
With glib2.0 releases >= 2.66.3, glib header files inside an
extern "C" block will encounter compilation errors. This has
impacted several OSS packages. Consumers of newer versions of glib2.0
must not include glib headers in an extern "C" block.
GTK 3.20 has deprecated gdk_display_get_device_manager(); using the
newer gdk_display_get_default_seat() when the GTK version is >= 3.20.
The return value from read() must be used to avoid an unused result
warning from the compiler. This can be avoided by using dummy retyping
in the case where the return value is not used or in this case, using
the returned value in a debug log message.