Oliver Kurth [Thu, 3 Oct 2019 00:48:34 +0000 (17:48 -0700)]
Move /etc/vmware-tools/vm-support to /usr/bin/ in open-vm-tools.
Change scripts/Makefile.am to know about the new location.
This fix requires the following updates to the vendor scripts:
The rules files have "chmod /etc/vmware-tools/vm-support".
The spec files have "mv /etc/vmware-tools/vm-support /usr/bin".
Oliver Kurth [Mon, 30 Sep 2019 23:24:27 +0000 (16:24 -0700)]
Add a Coverity annotation to lib/vmGuestLib/vmGuestLib.c
A previous change adding Coverity annotations to vmGuestLib.c
omitted one. Adding for completeness although it does not actually
affect Coverity results.
Oliver Kurth [Mon, 30 Sep 2019 23:24:27 +0000 (16:24 -0700)]
Fix potential overflow in timeSync reported by Coverity
Issue: Potentially overflowing expression: data->timeSyncPeriod * 1000000U
is evaluated using 32-bit arithmetic, and then used in a context
that expects an expression of type uint64.
Fix: explict type conversion.
Oliver Kurth [Mon, 9 Sep 2019 18:23:49 +0000 (11:23 -0700)]
Fix Misc. issues in vmtoolsLog.c
* g_malloc0 aborts the application if the specificed amount of memory
cannot be allocated. Hence, no need to have a NULL check for the
return value of g_malloc0.
* Removed one if block in VMToolsLogInt since the if check will never
be TRUE.
* g_strdup returns NULL if the input argument is NULL. Removed
the unnecessary NULL checks for the input argument to g_strdup at few
places.
Oliver Kurth [Mon, 9 Sep 2019 18:23:49 +0000 (11:23 -0700)]
[AppInfo] OVT Coverity fixes.
The return value of Str_Snprintf is not being checked for negative
values and is directly passed to DynBuf_Append which accepts only
positive values. This may cause issues if Str_Snprintf fails. Added
a trivial check.
Oliver Kurth [Mon, 9 Sep 2019 18:23:49 +0000 (11:23 -0700)]
[AppInfo] OVT Coverity fixes.
The return value of Str_Snprintf is not being checked for negative
values and is directly passed to DynBuf_Append which accepts only
positive values. This may cause issues if Str_Snprintf fails. Added
a trivial check.
Oliver Kurth [Mon, 9 Sep 2019 18:23:49 +0000 (11:23 -0700)]
Fix the deployPkg status files when privateTmp is enabled
Currently, deployPkg status file path is hardcoded to /tmp. When
privateTmp is enabled in the guest VM, /tmp is hidden from the rest
of the system and is wiped on reboot. So need use different path to
save the status file.
This change is changing deployPkg status file path from /tmp to /var/log
Oliver Kurth [Mon, 9 Sep 2019 18:23:48 +0000 (11:23 -0700)]
More Coverity annotations for open-vm-tools issues.
Add annotations for additional Coverity-reported issues so that
Coverity scans of ovt will automatically classify these issues
as "intentional." Such annotations are useful both for internal
use as well as for partners who run Coverity scans of open-vm-tools.
Oliver Kurth [Tue, 27 Aug 2019 19:55:38 +0000 (12:55 -0700)]
More Coverity annotations for open-vm-tools.
Add Coverity annotations for four additional issues so that Coverity
scans of open-vm-tools will automatically classify these issues as
"intentional." Such annotations are useful both for internal use as
well as for partners who run Coverity scans of open-vm-tools.
Oliver Kurth [Tue, 27 Aug 2019 19:55:37 +0000 (12:55 -0700)]
Add more Coverity annotations to open-vm-tools source.
Add Coverity annotations for three issues so that Coverity scans of
open-vm-tools will automatically classify these issues as
"Intentional." These annotations are useful both for internal
use as well as for partners who run Coverity scans on open-vm-tools.
Oliver Kurth [Tue, 27 Aug 2019 19:55:37 +0000 (12:55 -0700)]
Get rid of PhysMem's thread registration calls for most threads.
A previous change eliminated the need to register threads before doing
a PPN to BPN conversion on them. This change removes some of the
remaining infrastructure.
Oliver Kurth [Tue, 27 Aug 2019 19:55:37 +0000 (12:55 -0700)]
Address Coverity issues reported in bora/lib/file/file.c.
Fix a minor memory leak in the function File_ExpandAndCheckDir.
Also add annotations for unchecked return values in functions
GetOldMachineID and File_MoveTree, so that Coverity scans of
open-vm-tools will automatically classify these issues as
"Intentional". These annotations are useful both for internal
use as well as for partners who run Coverity scans on open-vm-tools.
Oliver Kurth [Tue, 27 Aug 2019 19:55:36 +0000 (12:55 -0700)]
Bool type may not be a char (1 bytes).
Change structures exposed to the guest to not use Bool -
- while currently Bool is defined as char, we might use C's
_Bool or C++'s bool for booleans - and neither standard
mandates _Bool/bool to be 1 byte.
Oliver Kurth [Tue, 27 Aug 2019 19:55:35 +0000 (12:55 -0700)]
Add Coverity annotations.
Add source code annotations so that Coverity scans will automatically
classify certain issues as "intentional." These annotations serve to
memorialize these classifications in open-vm-tools source, both for
internal reference as well as for partners like Red Hat who run their
own Coverity scans on open-vm-tools.
Oliver Kurth [Mon, 5 Aug 2019 18:22:00 +0000 (11:22 -0700)]
Avoid freezing mount points for same device.
Loopback device setup could cause a cyclic dependency
between 2 mount points. In order to break the cycle,
avoid freezing the mount points to the same device.
This change also skips some system mount points for 'tmpfs'
and 'cgroup' etc as those share the same device/FS name.
This is fine because we can't quiese those mount points
anyway (system mount points don't support quiescing).
Oliver Kurth [Fri, 2 Aug 2019 18:07:21 +0000 (11:07 -0700)]
Bumping HGFS_LARGE_IO_MAX_PAGES to 127 and defining the legacy values
This change bumps up HGFS_LARGE_IO_MAX_PAGES to 127 and define the
legacy values of HGFS_LARGE_IO_MAX_PAGES, HGFS_LARGE_IO_MAX and
HGFS_LARGE_PACKET_MAX. A switch is also added to make sure we still
use the legacy value unless "hgfs.packetSize.large" is set to "TRUE" in vmx.
Oliver Kurth [Fri, 2 Aug 2019 18:07:21 +0000 (11:07 -0700)]
Avoid freezing mount points for same device.
Loopback device setup could cause a cyclic dependency
between 2 mount points. In order to break the cycle,
avoid freezing the mount points to the same device.
This change also skips some system mount points for 'tmpfs'
and 'cgroup' etc as those share the same device/FS name.
This is fine because we can't quiese those mount points
anyway (system mount points don't support quiescing).