]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
7 years agoHgfs Server Plugin: only handle the shared folders client in hosted products
Oliver Kurth [Tue, 19 Jun 2018 18:07:43 +0000 (11:07 -0700)] 
Hgfs Server Plugin: only handle the shared folders client in hosted products

Only initialize the Shared Folders client redirector in hosted product
environments.

Details: Check if the tools system service started in a non-hosted product
and if so do not start the shared folders client redirector.
Check if the tools user service started in a non-hosted product product and if
so then skip reconnecting any Shared Folders mapped drives.

7 years agoGo back to the old INVALID_PPN value
Oliver Kurth [Tue, 5 Jun 2018 22:47:41 +0000 (15:47 -0700)] 
Go back to the old INVALID_PPN value

7 years agoVarious small fixes to windows balloon driver; not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:41 +0000 (15:47 -0700)] 
Various small fixes to windows balloon driver; not applicable to open-vm-tools.

7 years agoChanges to common header files; not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:40 +0000 (15:47 -0700)] 
Changes to common header files; not applicable to open-vm-tools.

7 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:40 +0000 (15:47 -0700)] 
Changes to common header files not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:40 +0000 (15:47 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoUpdate APIC_INVALID_PPN and PHYSMEM_MAX_PPN
Oliver Kurth [Tue, 5 Jun 2018 22:47:39 +0000 (15:47 -0700)] 
Update APIC_INVALID_PPN and PHYSMEM_MAX_PPN

7 years agovm_basic_types.h: remove VM_I386
Oliver Kurth [Tue, 5 Jun 2018 22:47:39 +0000 (15:47 -0700)] 
vm_basic_types.h: remove VM_I386

The VM_I386 macro is described as "historical". But recent cleanups
reduced the number of usages to the point where "historical" can become
"removed".

Remove the declaration, comments describing the declaration, and
fix the last two places to use the modern macro alternatives.

7 years agoopen-vm-tools: build with tirpc
Oliver Kurth [Tue, 5 Jun 2018 22:47:39 +0000 (15:47 -0700)] 
open-vm-tools: build with tirpc

Newer distros (Fedora, OpenSuSE Tumblweed) no longer ship rpcgen with glibc,
so we need to build with libtirpc (see
https://bugzilla.redhat.com/show_bug.cgi?id=1531540 and
https://bugzilla.suse.com/show_bug.cgi?id=1089181). With this change,
configure will check for the presence of libtirpc and if found, sets
flags to build with it. configure will also exit with an error if
rpcgen is not found.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:38 +0000 (15:47 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoAdd Safe version of DynBuf_Enlarge
Oliver Kurth [Tue, 5 Jun 2018 22:47:38 +0000 (15:47 -0700)] 
Add Safe version of DynBuf_Enlarge

This change adds the "safe" variant of the enlarge interface. Similar to
DynBuf_SafeAppend, this panics when the buffer enlargement fails due to
memory allocation failures.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:38 +0000 (15:47 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoopen-vm-tools: build dndcp with thread libs
Oliver Kurth [Tue, 5 Jun 2018 22:47:38 +0000 (15:47 -0700)] 
open-vm-tools: build dndcp with thread libs

Recent changes in the dndcp plugin made it necessary to make sure that
it links against pthread libs.

7 years agoLog full version of Tools in vmware.log.
Oliver Kurth [Tue, 5 Jun 2018 22:47:38 +0000 (15:47 -0700)] 
Log full version of Tools in vmware.log.

Currently, only the Tools build number is logged in vmware.log.
It will be very handy to have the full version logged in
there and avoid the need to manually lookup the build.

7 years agoRemove CPUIDSummary
Oliver Kurth [Tue, 5 Jun 2018 22:47:37 +0000 (15:47 -0700)] 
Remove CPUIDSummary

CPUIDSummary is no longer used and, along with its corresponding header file
cpuid_info.h, can be removed.

7 years agoChange the balloon driver internals to 64-bits.
Oliver Kurth [Tue, 5 Jun 2018 22:47:37 +0000 (15:47 -0700)] 
Change the balloon driver internals to 64-bits.

As a first step towards making the driver being able to balloon 16TB+,
let's change all the internals to use 64-bits values for the counters.
Initially, I wanted to only touch the windows driver, as this is the one
that we really care about, but since some code and datastructure are
shared, I had to modify pretty much all drivers.

The next step will be to change the drivers capabilities by adding
BALLOON_64_BIT_TARGET.

7 years agoBump invalid PPN to 2^52 - 1
Oliver Kurth [Tue, 5 Jun 2018 22:47:37 +0000 (15:47 -0700)] 
Bump invalid PPN to 2^52 - 1

We are ready to bump INVALID_PPN value. Let us set it
to 2^52 - 1. This is more than enough to get over 4PB vRAM,
that requires 40-bit PPNs.

Another option was to set it to (uint64)-1, like the current value
of INVALID_PPN64, but it seems like there is no good reason
to do it. There are a few instances where INVALID_PPN is
treated as a regular PPN, e.g. we may convert it to PA and back.
2^52 - 1 will allow us to preserve that natural relationship
between invalid PPN and invalid PA.

All INVALID_PPN64 will have to be converted to INVALID_PPN
in follow up changes.

7 years agoDrop suffix 64 in public except vm_basic_types
Oliver Kurth [Tue, 5 Jun 2018 22:47:37 +0000 (15:47 -0700)] 
Drop suffix 64 in public except vm_basic_types

This change renames PPN64, TPPN64, PgNum64 and PgCnt64 as PPN, TPPN,
PageNum and PageCnt respectively in the public directory.

7 years agoFix locale issues for vgauth on Linux
Oliver Kurth [Tue, 5 Jun 2018 22:47:36 +0000 (15:47 -0700)] 
Fix locale issues for vgauth on Linux

setlocale() returns nothing unless we earlier force it
to be empty.

Change the default msgCatalog location on Linux so
the catalogs can be found without config changes in the normal
install area.

When doing catalog lookup, first chop off the charset
suffix.  Otherwise we first look for 'zh_CN.UTF-8', then
fall back to just 'zh' if that fails.  We support zh_TW and zh_CN,
but not a 'zh'.

Also fix things for NeoKylin, which appears to use LANG
but not setlocale().

7 years agoChanges to build CAF with VS 2015; not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:36 +0000 (15:47 -0700)] 
Changes to build CAF with VS 2015; not applicable to open-vm-tools.

7 years agoTools 10.3,0 L10n drop2
Oliver Kurth [Tue, 5 Jun 2018 22:47:36 +0000 (15:47 -0700)] 
Tools 10.3,0 L10n drop2

This is to integrate the final L10n drop for VMware Tools 10.3.

7 years agoCommon header files change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:35 +0000 (15:47 -0700)] 
Common header files change not applicable to open-vm-tools.

7 years ago[Wayland DnD] Part3: Update the Drag Detection Window and Use UInput in DnDUIX11
Oliver Kurth [Tue, 5 Jun 2018 22:47:35 +0000 (15:47 -0700)] 
[Wayland DnD] Part3: Update the Drag Detection Window and Use UInput in DnDUIX11

Two changes in this patch:
1. Changes the class DragDetWnd to template class.

   Currently the DragDetWnd inherits from Gtk::Invisible, but Gtk::Invisible
   doesn't work for Wayland, it seems this is a bug for Wayland and maybe it
   will be fixed sometime.

   So, changes the DragDetWnd to template class, and it will inherit from
   Gtk::Invisible for X11 and inherit from Gtk::Window for Wayland.

2. Uses UInput to simulate mouse motion in class DuDUIX11.

This patch is part of the new feature 'Wayland support in Linux guest'.

7 years agovm_basic_types.h: use system headers for uint64_t, uintptr_t, size_t
Oliver Kurth [Tue, 5 Jun 2018 22:47:35 +0000 (15:47 -0700)] 
vm_basic_types.h: use system headers for uint64_t, uintptr_t, size_t

Extensive rewrite. Basically standardizes on using stdint.h (C99)
and sys/types.h (POSIX) to define interesting types, with several
non-trivial caveats:
- stdint.h is not available on older Windows compilers. For now,
emulate with crtdefs.h + manual definitions.
- Linux kernel does not provide stdint.h (gcc-4.5+ does and it's
incompatible), and sys/types.h won't work at all.
However, linux/types.h gives everything we need.
- Linux kernel defines uint64_t as 'long long' (and uintptr_t as
'long' - yes, really), in contrast to Linux userlevel which defines
uint64_t as 'long'. Send Linux kernel down a different FMT64 path
so we don't get "%llx" / "%lx" mismatches.
- VMM and VMKernel don't provide sys/types.h (except VMK's FreeBSD
modules). Directly provide definitions here.

Net effect of this change is removal of two blocks of code that
provide our own definitions of uintptr_t/intptr_t/size_t/ssize_t.
Also pruned a few now-unneeded stdint.h and sys/types.h includes as well.

Curious observers will inquire why not get size_t from C99 standard
header stddef.h. Turns out that header is EXCEPTIONALLY hard to include,
which is why I'm using sys/types.h in most places. Actually using
stddef.h is left for a later change.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:35 +0000 (15:47 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years ago[OVT] Update copyright year to 2018 for files modified since 10.2.5 GA
Oliver Kurth [Tue, 5 Jun 2018 22:47:34 +0000 (15:47 -0700)] 
[OVT] Update copyright year to 2018 for files modified since 10.2.5 GA

7 years ago[tools] Not checking symbols when building open-vm-tools
Oliver Kurth [Tue, 5 Jun 2018 22:47:33 +0000 (15:47 -0700)] 
[tools] Not checking symbols when building open-vm-tools

Using a hard-coded mangled name is not a good idea because C++ does not
have any standard for name mangling.  Remove these mangled names introduced
in an earlier fix.

7 years agoHgfs Win Client: fix bad illegal character escaping; not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:47:32 +0000 (15:47 -0700)] 
Hgfs Win Client: fix bad illegal character escaping; not applicable to open-vm-tools.

7 years agoBump the tools version on the devel branch to 10.4.0
Oliver Kurth [Tue, 5 Jun 2018 22:47:32 +0000 (15:47 -0700)] 
Bump the tools version on the devel branch to 10.4.0

7 years agoHeader file change for tools logging improvements for VMware Managed Cloud.
Oliver Kurth [Tue, 5 Jun 2018 22:47:32 +0000 (15:47 -0700)] 
Header file change for tools logging improvements for VMware Managed Cloud.

7 years agoMXUser lock: Remove ASLR defeating stats reporting
Oliver Kurth [Tue, 5 Jun 2018 22:45:07 +0000 (15:45 -0700)] 
MXUser lock: Remove ASLR defeating stats reporting

Way back when the tracking of the top users of an MXUser lock was added
to the stats. It was never used, it's not reported by kstats.prl and
the code make it possible to break ASLR. Remove the code.

7 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:07 +0000 (15:45 -0700)] 
Common header file change not directly applicable to open-vm-tools.

7 years agoAdd two switches for max IPv4/6 routes to gather
Oliver Kurth [Tue, 5 Jun 2018 22:45:07 +0000 (15:45 -0700)] 
Add two switches for max IPv4/6 routes to gather

Gathering nic info in a Linux guest OS which is configured with large
number(60000+) of ipv6 routes could result in vmtoolsd process taking a
long time and rock solid 100% CPU of a core.  Though tools only exports
at most NICINFO_MAX_ROUTES(100) routes, it tries to read all the contents
of /proc/net/ipv6_route which costs too much time because:
1. IPv6 route table is not efficient natively compared to ipv4 due to
   its implementation.
2. The g_io library can aggravate the performance.

On the other hand, when gathering routes, IPv4 comes first, and IPv6 second.
And the routes reported to VMX has an overall limitation of serializing
(NICINFO_MAX_ROUTES).  If there's more than NICINFO_MAX_ROUTES IPv4 routes
in system, no IPv6 will get reported.

Added two switches "max-ipv4-routes" and "max-ipv6-routes"
(NICINFO_MAX_ROUTES by default) in tools.conf and let SlashProcNet_GetRoute*()
only read the first max ipv4/6 routes lines of /proc/net/[ipv6_]route to avoid
performance problem.  Users can disable ipv4/ipv6 routes gathering
separately if they want ipv6 or ipv4 only.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:06 +0000 (15:45 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoHostinfo_GetCpuid Cleanups
Oliver Kurth [Tue, 5 Jun 2018 22:45:06 +0000 (15:45 -0700)] 
Hostinfo_GetCpuid Cleanups

This change includes several cleanups in Hostinfo_GetCpuid. The CPUIDSummary
type is unnecessary, the function really only cares about levels 0 and 1.
Also removed a hardcoded mask and shift in favor of a CPUID_GET and fixed
some formatting issues.

7 years agolocks: Increase buffer size in MXUserHistoDump
Oliver Kurth [Tue, 5 Jun 2018 22:45:06 +0000 (15:45 -0700)] 
locks: Increase buffer size in MXUserHistoDump

It was noticed that the size of one of the char arrays in MXUserHistoDump
is not large enough given the format string. This change bumps the
size to accommodate (plus slack).

7 years ago[Wayland Copy & Paste] Part2: Uses VMBlock notification mechanism for Copy & Paste
Oliver Kurth [Tue, 5 Jun 2018 22:45:05 +0000 (15:45 -0700)] 
[Wayland Copy & Paste] Part2: Uses VMBlock notification mechanism for Copy & Paste

This patch is part of the new feature for Workstation 15: \[P0\] Wayland
support in Linux guest - Copy & Paste.

In the first patch, the notification mechanism is added to the VMBlock module.
In this patch, the notification mechanism is used,

7 years ago[Wayland Copy & Paste] Part1: Add notification mechanism to the VMBlock module
Oliver Kurth [Tue, 5 Jun 2018 22:45:05 +0000 (15:45 -0700)] 
[Wayland Copy & Paste] Part1: Add notification mechanism to the VMBlock module

This patch is part of the new feature for Workstation 15: [P0] Wayland support
in Linux guest - Copy & Paste.

In the implementation of current VMTools, there is a restriction, in the first
second after grab into the guest, the CopyPasteUIX11::LocalGetFileRequestCB,
which is a callback from a file paste request from another guest application
and begins copying the files from host to guest and return the file list,
will return none directly.

The Wayland file explorer will request the content in the clipboard after the
user clicks on the file explorer, and the request will get nothing since the
restriction in the VMTools, so the following â€˜Paste’ operation will fail.

Solution:
This solution is only used for the Linux guest with Wayland. The behavior
for Linux guest with X11 will not change.

The restriction, the CopyPasteUIX11::LocalGetFileRequestCB returns directly
in the first second after grab into the guest, will be removed.

And, the notification mechanism will be added into the VM block file system.
This mechanism is similar with the inotify module.

Take the VMBlock Fuse File System as an example, currently, the mount point contains below contents:

* /blockdir/

* /dev

/blockdir/ contains the symlinks to the contents of the target directory.

/dev is the control file for VMBlock Fuse File System.

In this new solution, a new folder /notifydir/ will be added, each file in this folder is a special file, read from this file will be blocked until any other process read from the corresponding file in target directory or the block on the target directory is removed.

This patch only focus on the notification mechanism.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:04 +0000 (15:45 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:04 +0000 (15:45 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoDefine 64-bit PPN, TPPN, PageNum and PageCnt
Oliver Kurth [Tue, 5 Jun 2018 22:45:04 +0000 (15:45 -0700)] 
Define 64-bit PPN, TPPN, PageNum and PageCnt

This change introduces 64-bit PPN, TPPN, PageNum and PageCnt
types so we can start dropping 64 suffix everywhere in the code base.

7 years ago[Lifecycle][ESX] Allow ALL 'admin' users to access Personality Manager APIs
Oliver Kurth [Tue, 5 Jun 2018 22:45:04 +0000 (15:45 -0700)] 
[Lifecycle][ESX] Allow ALL 'admin' users to access Personality Manager APIs

1. During the uninstall workflow, NSX-T does not have access to 'root'
   users and uses an admin user created by them to call Personality Manager APIs

2. Added a new PAM module for "settingsd" service and removed "root"
   hardcoding.

2.1 Kept it same as "sshd" module except I removed sending VOB during
    authentication.

3. For this, updated the auth lib to add a new method Auth_AuthenticateUserPAM,i
   which takes the PAM "service-name" to use while authenticating.

4. Modified the existing method Auth_AuthenticateUser to call this API
   when USE_PAM is true.

5. This would be available only on !_WIN32

7 years agoretire PPN, TPPN, PageNum, PageCnt types
Oliver Kurth [Tue, 5 Jun 2018 22:45:04 +0000 (15:45 -0700)] 
retire PPN, TPPN, PageNum, PageCnt types

This change retires 32-bit PPN, TPPN, PageNum, PageCnt types and
introduces temporary PPNTMP type for tools (graphics, pvscsi, balloon),
so that driver owners can work on PPN64 conversion at their own
pace and can easily identify places that require attention.

7 years agoCommon header files change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:04 +0000 (15:45 -0700)] 
Common header files change not directly applicable to open-vm-tools.

7 years agoCommon header files change not directly appliable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:03 +0000 (15:45 -0700)] 
Common header files change not directly appliable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:03 +0000 (15:45 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoHgfs Server Plugin: only handle the shared folders client in hosted products
Oliver Kurth [Tue, 5 Jun 2018 22:45:03 +0000 (15:45 -0700)] 
Hgfs Server Plugin: only handle the shared folders client in hosted products

Only initialize the Shared Folders client redirector in hosted product
environments.

Details: Check if the tools system service started in a non-hosted product
and if so do not start the shared folders client redirector.
Check if the tools user service started in a non-hosted product product and if
so then skip reconnecting any Shared Folders mapped drives.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:03 +0000 (15:45 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoRemove debug display of CPUID vendor string seen in VmCheck_IsVirtualWorld
Oliver Kurth [Tue, 5 Jun 2018 22:45:03 +0000 (15:45 -0700)] 
Remove debug display of CPUID vendor string seen in VmCheck_IsVirtualWorld

The "Debug" message containing vendor string returned by the CPUID
instruction will appear on STDERR for stand-alone programs such
as vmware-checkvm.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:03 +0000 (15:45 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoBackout previous header file change.
Oliver Kurth [Tue, 5 Jun 2018 22:45:02 +0000 (15:45 -0700)] 
Backout previous header file change.

7 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 5 Jun 2018 22:45:02 +0000 (15:45 -0700)] 
Common header file change not directly applicable to open-vm-tools.

7 years agoVMware Tools 10.3 L10n drop1
Oliver Kurth [Tue, 5 Jun 2018 22:45:02 +0000 (15:45 -0700)] 
VMware Tools 10.3 L10n drop1

This is to check in the 1st L10n drop for VMware Tools 10.3.

7 years agoupdate version number
Oliver Kurth [Thu, 10 May 2018 23:47:16 +0000 (16:47 -0700)] 
update version number

7 years agoRemove debug display of CPUID vendor string seen in VmCheck_IsVirtualWorld
Oliver Kurth [Thu, 10 May 2018 23:38:11 +0000 (16:38 -0700)] 
Remove debug display of CPUID vendor string seen in VmCheck_IsVirtualWorld

The "Debug" message containing vendor string returned by the CPUID
instruction will appear on STDERR for stand-alone programs such
as vmware-checkvm.  This unexpected output is at best noise and may
adversely affect existing scripts.

7 years agosync deploypkg files
Oliver Kurth [Mon, 30 Apr 2018 22:42:54 +0000 (15:42 -0700)] 
sync deploypkg files

7 years agoChanges to common header files:
Oliver Kurth [Mon, 30 Apr 2018 21:04:14 +0000 (14:04 -0700)] 
Changes to common header files:
- Add Amazon Linux 2 to the known guest OS list.
- Other change not application to open-vm-tools.

7 years ago[DeployPkg] Replace Log() references with g_log()
Oliver Kurth [Mon, 30 Apr 2018 21:04:13 +0000 (14:04 -0700)] 
[DeployPkg] Replace Log() references with g_log()

* Modified the code to replace a couple of Log() references with g_debug()
so that they are properly logged with 'deplogPkg' domain instead of the
generic 'vmsvc' domain in the tools log files.

7 years ago[oss] Upgrade GTK+ and its dependent libraries for VMtools
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
[oss] Upgrade GTK+ and its dependent libraries for VMtools

GTK+ and its dependent libraries are upgraded to:
gtk+       2.24.32
atk        2.28.1
gdk-pixbuf 2.36.11
pango      1.40.13
cairo      1.14.12
fontconfig 2.13.0
freetype   2.9

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoChanges to common header files not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
Changes to common header files not directly applicable to open-vm-tools.

7 years agoSet perms on Tools script logs.
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
Set perms on Tools script logs.

Make the network script logs secure; set log file perms to 0600.

7 years ago[Wayland DnD] Part2: Open the uinput device file with root permission.
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
[Wayland DnD] Part2: Open the uinput device file with root permission.

The device file /dev/uinput (or /dev/input/uinput) can only be accessed
by root account, so the dndcp plugin may failed to open this device file
if the current user is not root account.

A way to fix this issue is opening this device file with root account,
then pass the file descriptor to the sub task which is started with the
current account. An example for this solution is blockVM file system
device file.

This patch is part of the new feature 'Wayland support in Linux guest'.

7 years ago[Wayland DnD] Part1: Add 'fakeMouse' module which is used to simulate the
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
[Wayland DnD] Part1: Add 'fakeMouse' module which is used to simulate the
       mouse motion under Wayland

For Linux guest with X11, the VMTools uses the X system APIs to simulate
the mouse motion, but these X11 System APIs do not work in Wayland. Need
to pick up another method to simulate the mouse motion.

Another way to simulate the mouse motion is using uinput module.

uinput is a kernel module that makes it possible to emulate input devices
from userspace. By writing to /dev/uinput (or /dev/input/uinput) device,
 a process can create a virtual input device with specific capabilities.
Once this virtual device is created, the process can send events through
it, that will be delivered to userspace and in-kernel consumers.

Here is the link which contains more information about the uinput module:

https://www.kernel.org/doc/html/v4.12/input/uinput.html

This patch adds a new module named 'fakeMouse' which is used to simulate the mouse motion under Wayland.

This patch is part of the new feature 'Wayland support in Linux guest'.

7 years agoAdd new guest metrics to be consumed by vROps.
Oliver Kurth [Tue, 24 Apr 2018 00:08:18 +0000 (17:08 -0700)] 
Add new guest metrics to be consumed by vROps.

Windows:
* ProcessorQueueLength
* CurrentDiskQueueLength
* AvgDiskQueueLength

Linux:
* CPU run queue size
* Current disk queue size
* Average disk queue size

7 years agoHistorical: Recording version numbers assigned for 10.2.x patches.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Historical: Recording version numbers assigned for 10.2.x patches.

Define TOOLS_VERSION_CHAINSAW_PATCH1 as 10.2.1.
Define TOOLS_VERSION_CHAINSAW_PATCH2 as 10.2.6.

7 years agoBump up the version requirement for glib and friends to 2.34.0
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Bump up the version requirement for glib and friends to 2.34.0

For open-vm-tools, we are bumping up the minimum version requirement
to 2.34.0 for glib and its friends. Modified the configure.ac
with the proper new version checks. Also, updated the
error message with the proper version.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon source file changes that are not directly related to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Common source file changes that are not directly related to open-vm-tools.

Build vmtools and vgauth for Windows with xmlsec instead of
xml-security-c.  It will still be possible to build with xml-security-c
either by commenting out the definition of USE_XMLSEC_FOR_WINDOWS in
bora-vmsoft/vgauth/make/inc/defs.mk or adding a make command line
argument of USE_XMLSEC_FOR_WINDOWS=0.

7 years agoUpdate bora-vmsoft/install/Source/README
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Update bora-vmsoft/install/Source/README

The content is stale. Since the file is used internally and is
not published, rather than maintain it in two places, point to
the current README file and Release Notes on github.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Common header file changes not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:17 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agolib/hashMap/hashMap.c:
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
lib/hashMap/hashMap.c:
  Add new HashMap_Get() which uses a constant time memory comparison function.

lib/misc/utilMem.c:
  Constant time memory and string comparison functions.

7 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Changes to common header files not applicable to open-vm-tools.

7 years agoChange to common header file not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Change to common header file not applicable to open-vm-tools.

7 years agoChange to common header file not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Change to common header file not applicable to open-vm-tools.

7 years agoCommon header file change not applicale to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Common header file change not applicale to open-vm-tools.

7 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:16 +0000 (17:08 -0700)] 
Common header file changes not applicable to open-vm-tools.

7 years agoHeader file change in preparation for C++11 compilation. Also updating
Oliver Kurth [Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)] 
Header file change in preparation for C++11 compilation.  Also updating
copyright dates.

7 years agoFreeBSD vmmemctl: Fold in open-vm-tools pull requests #125 and #140
Oliver Kurth [Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)] 
FreeBSD vmmemctl: Fold in open-vm-tools pull requests #125 and #140

This change incorporates two open-vm-tools pull requests that provide
code changes that allows the existing vmmemctl.ko driver to be compiled
on FreeBSD 10, 11 or 12.

Pull request #125:
An optional argument has been added to the sysctl_add_oid() function
in FreeBSD 12.x. All releases have a SYSCTL_ADD_OID() macro that does
not require the additional argument.

Pull request #140:
Functions and macros to lock and unlock memory pages and objects have
changed between the FBSD 10 & 11.  The pull request provides a set C
preprocessor directives to select the appropriate code based on the
FreeBSD release being targeted.

The code change as been tidied up by using the release version checks
to define LOCK and UNLOCK macros for memory pages and objects at the
beginning of the source file.  The code logic is easier to follow
without the abundance of #if, #else and #endif statements scattered
about.

Ed Schouten: https://github.com/vmware/open-vm-tools/pull/125
Steve Wills: https://github.com/vmware/open-vm-tools/pull/140

7 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)] 
Common source file changes not directly applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoMerge branch 'stable-10.2.x'
Oliver Kurth [Fri, 30 Mar 2018 20:06:36 +0000 (13:06 -0700)] 
Merge branch 'stable-10.2.x'

7 years agoprepare for 10.2.5 release stable-10.2.x 10.2.5 stable-10.2.5
Oliver Kurth [Fri, 30 Mar 2018 18:44:35 +0000 (11:44 -0700)] 
prepare for 10.2.5 release

7 years agoCommon source file changes that are not applicable to open-vm-tools.
Oliver Kurth [Fri, 23 Mar 2018 22:05:36 +0000 (15:05 -0700)] 
Common source file changes that are not applicable to open-vm-tools.

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 23 Mar 2018 22:05:36 +0000 (15:05 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agoBackout previous change to lib/include/vm_basic_math.h.
Oliver Kurth [Fri, 23 Mar 2018 22:05:36 +0000 (15:05 -0700)] 
Backout previous change to lib/include/vm_basic_math.h.

7 years agoCommon header file change: lib/include/vm_basic_math.h
Oliver Kurth [Fri, 23 Mar 2018 22:05:36 +0000 (15:05 -0700)] 
Common header file change: lib/include/vm_basic_math.h

Define portability macros for Inf and Nan tests.

7 years agoAdd missing memory constraints for vm_atomic RMW (Read/Modify/Write) instructions
Oliver Kurth [Fri, 23 Mar 2018 22:05:35 +0000 (15:05 -0700)] 
Add missing memory constraints for vm_atomic RMW (Read/Modify/Write) instructions

There are two inseparable concepts involved when dealing with atomics:
1. Atomicity of the access itself
2. Ordering of the access with respect to other reads&writes (from the view of
other processors).

Our Read-Modify-Write functions are all meant to provide the highest level of
ordering guarantee: Sequential Consistency, which means no reordering of reads
or writes across the access. We properly implement that on ARM, and on
x86/x64 at the hardware layer. But, on x86/x64 we needed to tell the compiler
(it must flush out any pending reads/writes that are currently hiding in
registers)

Side Note: we do *not* change the pure Read and pure Write functions, only
the Read/Modify/Write ones. On both ARM and x86/x64, vm_atomic functions like
Atomic_WriteN provide no (re)ordering guarantees today (at the hardware layer
on ARM or at the compiler layer on x86/x64). This is because some callers
didn't need or want such guarantees - as such, Atomic_WriteN by itself is
*not* sufficient to, say, release a lock. Making these remaining atomic
weapons safe by default will require us to first
1. add new unordered atomic equivalents of Atomic_ReadN/TestBitN and
Atomic_WriteN (in C11 terminology, acquire/release and relaxed)
2. Scan the tree and switch appropriate callers to the new functions

*and only then*
3. Strengthen the defaults, affecting only callers who needed the stronger
defaults to be correct. ... but that would be a separate change in the
future.

Codegen differences (vmm.vmm64):
--------------------------------
The function that uncovered this was ST_HandleCrossCall, which invoked
Atomic_And64.

original w/o explicit compiler mem barrier in ST_HandleCrossCall:
...
lock and  QWORD PTR [rdx+0x0],rax
movsxd  rax,DWORD PTR [rip+offset]  <-- load reordered after Atomic_And64
lea     rax,[rax+rax*2]
lea     rdi,[rax*8+0x0]

with "memory" constraint, it's now identical to code w/an explicit
compiler mem barrier (which was the workaround):
...
mov     edx,DWORD PTR [rip+offset]  <-- load emitted prior to Atomic_And64
...
lock and  QWORD PTR [rsi+0x0],rax
movsxd  rax,edx                     <-- ... and used after Atomic_And64
lea     rax,[rax+rax*2]
lea     rdi,[rax*8+0x0]

vmm.vmm64's .text section shrank 28 bytes
vmware-vmx's .text section shrank 16 bytes

Given that these are tiny fractions of the .text section, this suggests the
problem was quite rare, which is why it escaped our attention until now.
(Testing of vmx's lib/lock, lib/sync, lib/vprobe, and lib/misc saw no
differences with GCC 4.4, 6.4, 7.1 or Clang)

While in there: nuke some tabs

Slated for a future change: vmkapi_atomic.h

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 23 Mar 2018 22:05:35 +0000 (15:05 -0700)] 
Common header file change not applicable to open-vm-tools.

7 years agovmcheck.c VmCheck_IsVirtualWorld(): Always check for a working backdoor.
Oliver Kurth [Fri, 23 Mar 2018 22:05:35 +0000 (15:05 -0700)] 
vmcheck.c VmCheck_IsVirtualWorld(): Always check for a working backdoor.

The specific checks for Xen and VirtualPC hypervisors currently happen
only if the VMware hypervisor is not detected.  The test for a working
VMware backdoor is then done to avoid all other hypervisors.

In the case where running on a VMware hypervisor and the backdoor
channel has been disabled such as with

   monitor_control.restrict_backdoor = "TRUE"

vmtoolsd, vmware-toolbox-cmd and vmware-checkvm will crash when
attempting to get the version number of the installed VMware Tools.

Added an additional test to detect Linux KVM with the existing tests
for the Xen hypervisor and Microsoft Virtual PC.  Avoid checking for
a working backdoor if a non VMware hypervisor is seen.

Microsoft Hv checking to be added later and is tracked in a separate PR.
Oracle VirtualBox provides no unique CPUID vendor signature string.

7 years agoFreeBSD open-vm-tools kernel modules compilations cannot locate <stdint.h>
Oliver Kurth [Fri, 23 Mar 2018 22:05:35 +0000 (15:05 -0700)] 
FreeBSD open-vm-tools kernel modules compilations cannot locate <stdint.h>

With the change for VMware headers to utilize the standard types
defined in C99 standard headers, the compilation of FreeBSD kernel
modules must specifically add /usr/include to the compilation
options.

CFLAGS += -isystem /usr/include

This change updates the Makefiles's for FreeBSD kernel modules and
drivers.

7 years agoFreeBSD: Improper use of sysconf() for getpwent buffer size leads to
Oliver Kurth [Fri, 23 Mar 2018 22:05:35 +0000 (15:05 -0700)] 
FreeBSD: Improper use of sysconf() for getpwent buffer size leads to
         vmtoolsd crash.

On FreeBSD, sysconf(_SC_GETPW_R_SIZE_MAX) can return -1 if it has
no hard limit ultimately resulting in an incorrect buffer size.

This change is adapting the sysconf() ifixes done elsewhere to
bora-vmsoft/services/plugins/vix/vixTools.c and updating the
open-vm-tools AUTHORS file to share credit for the pull request.

https://github.com/vmware/open-vm-tools/pull/238

7 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 23 Mar 2018 22:05:35 +0000 (15:05 -0700)] 
Common header file change not applicable to open-vm-tools.