[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1033107: marked as done (unblock: open-vm-tools/2:12.2.0-1)



Your message dated Sun, 26 Mar 2023 20:03:42 +0200
with message-id <CAM8zJQtjvCm1jptVtSC+-9jLcYnWp9H-9ySWqbRGZ91qPcFNQQ@mail.gmail.com>
and subject line unblock: open-vm-tools/2:12.2.0-1
has caused the Debian Bug report #1033107,
regarding unblock: open-vm-tools/2:12.2.0-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1033107: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033107
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: open-vm-tools@packages.debian.org
Control: affects -1 + src:open-vm-tools

Please unblock package open-vm-tools

[ Reason ]
Upstream released a new bugfix-only release.

[ Impact ]
No proper/buggy support for Debian as vmware guest.

[ Tests ]
no tests as we don't have a vmware infrastructure in Debian :(

[ Risks ]
Well tested by vmware - no known risks. regularly updated
anyway.


[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
if possible please remove the autotest requirement, more than a
trivial "it installs" test is not possible anyway, except you
provide some vmware infrastructure for me.


Thanks,

Bernd


unblock open-vm-tools/2:12.2.0-1


-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F
diff -Nru open-vm-tools-12.1.5/debian/changelog open-vm-tools-12.2.0/debian/changelog
--- open-vm-tools-12.1.5/debian/changelog	2023-01-03 12:19:05.000000000 +0100
+++ open-vm-tools-12.2.0/debian/changelog	2023-03-14 19:12:00.000000000 +0100
@@ -1,3 +1,13 @@
+open-vm-tools (2:12.2.0-1) unstable; urgency=medium
+
+  * [bebda7c] New upstream version 12.2.0
+    (Closes: #1032607)
+  * [d266aa7] Add libabsl-dev as explicit build-dependency.
+    Not needed in Debian, but let's support the Deepin package maintainer.
+    (Closes: #1032305)
+
+ -- Bernd Zeimetz <bzed@debian.org>  Tue, 14 Mar 2023 19:12:00 +0100
+
 open-vm-tools (2:12.1.5-3) unstable; urgency=medium
 
   * [1e4d8a9] Remove libprocps-dev build-dep. (Closes: #1027271)
diff -Nru open-vm-tools-12.1.5/debian/control open-vm-tools-12.2.0/debian/control
--- open-vm-tools-12.1.5/debian/control	2023-01-03 12:19:05.000000000 +0100
+++ open-vm-tools-12.2.0/debian/control	2023-03-14 19:12:00.000000000 +0100
@@ -19,7 +19,7 @@
  protobuf-compiler,
  libprotobuf-dev,
  protobuf-compiler-grpc,
- libgrpc++-dev,
+ libgrpc++-dev, libabsl-dev,
  golang-github-containerd-containerd-dev,
  golang-github-gogo-protobuf-dev,
 Standards-Version: 4.6.1
diff -Nru open-vm-tools-12.1.5/open-vm-tools/AUTHORS open-vm-tools-12.2.0/open-vm-tools/AUTHORS
--- open-vm-tools-12.1.5/open-vm-tools/AUTHORS	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/AUTHORS	2023-03-07 23:57:07.000000000 +0100
@@ -85,3 +85,6 @@
 
 Bernd Zeimetz   Fix building containerinfo plugin on i386
                 - https://github.com/vmware/open-vm-tools/pull/588
+
+Dirk Mueller    Detect the proto files for containerd grpc client on SUSE like systems
+                - https://github.com/vmware/open-vm-tools/pull/626
diff -Nru open-vm-tools-12.1.5/open-vm-tools/ChangeLog open-vm-tools-12.2.0/open-vm-tools/ChangeLog
--- open-vm-tools-12.1.5/open-vm-tools/ChangeLog	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/ChangeLog	2023-03-07 23:57:07.000000000 +0100
@@ -1,35 +1,501 @@
-commit 0c740b5ffaacd814f402aba924e55dc8ea033b62
+commit c589f06a759e902ffeb06845592c5fbc0cfaab2a
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Tue Nov 29 13:11:04 2022 -0800
+Date:   Tue Mar 7 10:51:39 2023 -0800
 
-    Update the ReleaseNotes.md for the 12.1.5 open-vm-tools release.
+    Update the ReleaseNotes.md for the 12.2.0 open-vm-tools release.
 
-commit 8958c3e0fa4b1f5ed4cb0ee98a967ddd73cd03ff
+commit 6b72d107c925d71e7dfe89fa9bc4dc9d848e285a
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Tue Nov 29 13:07:17 2022 -0800
+Date:   Tue Mar 7 08:33:18 2023 -0800
 
-    Prepare for the open-vm-tools 12.1.5 release.
+    Prepare for the open-vm-tools 12.2.0 release.
     - Update the tools version in the configure.ac.   Update the build numbers
-      buldNumber.h.
+     buldNumber.h.
 
-commit 864ffc76c53e0523b08dad1d1a82a36f75e6f06c
+commit 3bc128aa58770d400de28f899cd867804f8aefb3
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:32:04 2023 -0800
+
+    ChangeLog update of Jan. 17, 2023.
+
+commit 512af95b8788f5784126368462866eb0e4d76524
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:22:16 2023 -0800
+
+    ====================================================================
+    The "stable-12.2.x" branch was created from the "devel" branch here.
+    ====================================================================
+
+    Update ChangeLog with the granular push of Jan. 17, 2023.
+    - plus ChangeLog update of Dec 31, 2022.
+
+commit 891f1f654a6d2bffb270d6f3c7e69caec431d860
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:15:28 2023 -0800
+
+    Correct missed 2023 copyright update.
+
+commit 9d458c53a7a656d4d1ba3a28d090cce82ac4af0e
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    Track Linux filesystem id (FSID) for quiesced (frozen) filesystems
+    
+    Tracking the filesystem FSID along with each file descriptor (FD)
+    as the ioctl FIFREEZE is done.  An EBUSY could be seen because of
+    an attempt to freeze the same superblock more than once depending
+    on the OS configuration (e.g. usage of bind mounts).  An EBUSY could
+    also mean another process has locked or frozen that filesystem.
+    
+    When an EBUSY is received, the filesyste FSID is checked against the
+    list of filesystems that have already be quiesced.  If not previously
+    seen, a warning that the filesystem is controlled by another process
+    is logged and the quiesced snapshot request will be rejected.
+
+commit 193200d3ce31461f876f4779ced3ca5c85f32459
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    Salt-Minion 1.4 copyright and license updates.
+
+commit c3d2d7a23ad0deac57bf53667ebe5d14c24d53c2
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit ebd466b5a4f55e68486cc0e747ee6b76a4f171f1
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    backdoor_def.h: Update the Arm specific comment to be arm64 only.
+
+commit 998ff379939defc09834ae55fea450ee61f46ca9
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    FreeBSD: Support newer releases and code clean-up for earlier versions.
+    
+    Changes to allow open-vm-tools and drivers to be compiled for newer
+    FreeBSD releases and clean-up/remove code for earlier FreeBSD
+    releases that are no longer supported by the FreeBSD Foundation.
+    - remove old FreeBSD version support.
+    - trap SIGBUS while VmCheckSafe().
+    - fix build on recent versions.
+    - fix build after 1400043
+    - fix build after 1400051.
+    - replace deprecated NO_MAN by MK_MAN=no.
+    
+    Pull request: https://github.com/vmware/open-vm-tools/pull/584
+
+commit ab1728ebe46703624f151d09a65a100ccd514891
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit aad49df92c53aa561c4a23507ef4617c09a449ba
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 739cc1b828c1e23daca46a61b105391e8f271bb2
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Jan 17 19:08:33 2023 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 0ab6ba968e040f0b72e564338c6ea2b52bcb9e7c
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Sat Dec 31 22:42:11 2022 -0800
+
+    Update Changelog with the granular push of Dec 31, 2022.
+    - plus ChangeLog update of Dec 22, 2022.
+
+commit 301cea5522870a746112cd6d634a04c465dcf7cc
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Sat Dec 31 22:13:07 2022 -0800
+
+    open-vm-tools SUSE: Detect the proto files for the containerd grpc client
+    
+    On SUSE systems, the Go src'es are installed in a different location,
+    namely /usr/share/go/1.18/contrib/src.
+    Extend the config checks to detect that location.
+    
+    OVT pull request: https://github.com/vmware/open-vm-tools/pull/626
+
+commit f749bd5b0647c7bdf8aa46ca035e070b5def352e
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Sat Dec 31 22:13:07 2022 -0800
+
+    Add missing error codes for AsyncSocket_GetGenericError()
+    
+    AsyncSocket_GetGenericError() returns ETIMEDOUT or ECONNREFUSED
+    errors when they are encountered.  Added cross-platform #defines that
+    represent these codes.
+
+commit df63ef8559535bc57dfb5cecff7944074aca33e4
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Sat Dec 31 22:13:07 2022 -0800
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 11d107a07440c8cd97f4a3c34b8664a2089812ac
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Sat Dec 31 22:13:07 2022 -0800
+
+    Changes to common source files not directly applicable to open-vm-tools.
+
+commit 47a5bd3bd87f00e9e39cd3641028940eecbb315a
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:37:51 2022 -0800
+
+    Update Changelog with the granular push of Dec 22, 2022.
+    - plus ChangeLog update of Nov 29, 2022.
+
+commit 082f7f784b28452058ac6a6529f289144b5694d9
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:51 2022 -0800
+
+    Inclusive terminology - "sanity check"
+    
+    Partial "sanity check" clean-up:
+    - Change comments from "sanity check" to "confidence check"
+
+commit 63a35ed428b16baedc4cea0d666ac1b8d762de2e
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:51 2022 -0800
+
+    Powerops plugin:  Enhance logging and response message when a previous
+    powerops script is still running.
+
+commit 91e8725d65565b4b3452085a2e9db6e3f0bb1dcf
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:51 2022 -0800
+
+    lib/panic: Remove Panic_GetCoreFileName and Panic_SetCoreFileName.
+    
+    Panic_[GS]etCoreFileName have been dead code for a very long time.
+    
+    This change removes them, along with the underlying panicState.coreDumpFile
+    field.  Also, do some reformatting and tidy a few comments.
+
+commit f2d8ed1e924818d9611db104a5a259290e53f68f
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Common header file change not applicable to open-vm-tools.
+
+commit bd63d8029852af847383f19cd13d62adcabaabaf
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Source file changes not directly applicable to open-vm-tools.
+    
+    Minor cleanup in a couple of Makefile.am files.
+
+commit 4a2332747dc9e95e7b93d2b6d28b1d7fd474e3f2
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Linux guest identification: Make the code more robust
+    
+    Additional clean up.
+
+commit 049e37fef87a515c69471e7682ed5c3274942cf0
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 264c9c4cd4d8fbd06abaa3dc9266e4e16d2380d2
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Inclusive terminology - "disabled"
+    
+    Partial "disabled" clean-up:
+    - Change comments from "disable(d)" to "deactivate(d)"
+    - Change comments from "enable" to "activate" for grammar consistency
+
+commit 4f884c52df4d03246e40715d771a23a9af17436e
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Linux guest identification: Make the code more robust.
+    
+    The code to read and parse the os-release data isn't doing a good job
+    of protecting the tools daemon. Fixed this.
+     - do not depend on sscanf.
+     - bound the size of parameters;
+     - better checking for syntax errors.
+
+commit 1f1a34edda47b37d3bd7040b9f2080f8dcb23275
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Silence ComponentMgr logs for a missing support file.
+    
+    Components managed by the componentMgr plugin are often optional.
+    The missing component script file is a normal condition.
+    Silenced the logs by changing the message level from g_info to g_debug.
+
+commit 422205fcad59a9202a06b65fe28e9ced1d3b1a3b
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Limit the number of RPC vsocket connect() retries for ECONNRESET errors.
+    
+    If a guest VM has been configured with 'guest_rpc.rpci.usevsocket = "FALSE"'
+    to work around a problem in ESXi 6.0 ot 6.5 (KB 2149941), that guest VM
+    may experience high CPU usage on open-vm-tools 12.1.0 and 12.1.5.
+
+commit 4e278d12ea1ad9b541de94791065bf4658ed781d
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit a7da31373c5bb21d647a22c240a204645fa5f9ef
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    [TimeInfo] Handle notifications and get updates
+    
+    TimeInfo, which is part of TimeSync plugin, can be
+    used to query, set, subscribe, and receive updates for
+    time-related information from the host when guest is
+    using precisionclock to consume time from the host.
+    Previous changes laid foundation to subscribe and
+    unsubscribe for TimeInfo updates in open-vm-tools during
+    init/shutdown.
+    
+    When open-vm-tools subscribes for TimeInfo updates, VMX
+    will send a notification GuestRPC to tools if and
+    when the timing properties change. This change
+    adds support to handle such GuestRPCs from VMX.
+    The handler for the GuestRPC is pretty straightforward
+    for now: it queues an async task that simply gets
+    all updates and logs them.
+
+commit 4ab39d04ddde473a9698660a545c356aa5614dcb
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 0b2992f6718150d7c04ce4268e071033d4222e45
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Limit retry if the VMX RESETs a vsock connection
+    
+    If guest_rpc.rpci.usevsocket = "FALSE" is set, a vsock
+    connect() will always fail with RESET. This confused code that
+    thought it could only happen for secure sockets when they
+    were quickly re-used.
+    
+    Limit retry, and only for secure connections.
+
+commit 3cfb89bd45978bababef56404e33da7e645b0b5a
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    [TimeInfo] Subscribe/unsubscribe to notifications during init/shutdown
+    
+    This change adds support for subscribing to time info notifications
+    when this feature is enabled in the tools. As a result VMX will
+    send time info notifications to the tools when host timing
+    properties change. The change adds support to perform subscribe/
+    unsubscribe GuestRPCs from tools. Note that, handling of notification
+    (received from VMX) will be implemented in the next change.
+
+commit a23ac6dc590374f3b990f4d220ec59d1c3d82195
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 70c64efdedfc4b6772fe540f502113b8b58d6aad
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 11d8bddccab30dea8c33ab8fb895b599ea6b8419
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 4e5ff11a5927ebf711656d30166914725fd811f9
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    [TimeInfo] Introduce TimeInfo in TimeSync plugin
+    
+    This change lays a foundation for upcoming changes to
+    support TimeInfo feature in open-vm-tools. TimeInfo feature
+    is introduced as part of TimeSync plugin and can be
+    used to query, set, subscribe, and receive updates for
+    time-related information from the host when guest is
+    using precisionclock to consume time from the host.
+    
+    This change simply adds a new file and basic init/shutdown
+    routines which are called as part of TimeSync plugin
+    load/unload. The change also introduces a config option
+    to enable/disable this feature (default is off). The
+    feature is Linux-only for now.
+    
+    Upcoming changes will add support for subscribing and
+    receiving TimeInfo updates.
+
+commit 042b463ba64d527345c0a6048915d1b9a6a3402c
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 6c4e9964f58d94b31fda5bcc54c976959dd4f339
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:50 2022 -0800
+
+    Inclusive language - "disabled"
+    
+    Use “deactivated” instead of “disabled” in some files used by open-vm-tools.
+
+commit e85f51de2849566e8dd08f035474bfc626a17d8d
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Thu Dec 22 16:25:49 2022 -0800
+
+    Enhance the guest identification code for Linux
+    
+    The Linux guest identification code is enhanced to return two
+    additional fields (when a distro makes them available):
+    
+    1) The VERSION field
+    
+    This field sometimes contains additional information not
+    found in other fields. For instance, on SLES, this provides
+    the patch level information.
+    
+    2) The CPE_NAME field
+    
+    This is the NIST Common Platform Enumeration Specification
+    string. If present, this may provide information in a
+    standardized form.
+
+commit 569c595128322339d1435d6a745243d2d7aec860
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Nov 29 12:22:44 2022 -0800
+
+    Update Changelog with the granular push of Nov 29, 2022.
+     - plus ChangeLog update of Nov 4, 2022.
+
+commit e058df3ebf6aa0b4cd1b15f1f55ac4d56f09c5ed
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Nov 29 12:11:43 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 136de61dd7c2a473ca926e2df1800c6d76aa5da0
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Nov 29 12:11:43 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 6208fe0c286f45c70c621c15bdf90e935a5a56ee
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Nov 29 12:11:43 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 7a94ee4524da9c794a68d6b2e7106d719209d93e
+Author: Katy Feng <fkaty@vmware.com>
+Date:   Tue Nov 29 12:11:42 2022 -0800
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 5405d130aba6724ba671cf5d3ff8b250147d624c
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Nov 4 11:58:14 2022 -0700
+
+    Update Changelog with the granular push of Nov 4, 2022.
+     - plus ChangeLog update of Oct 21, 2022.
+
+commit bf074c36924f28b3f36f88aa4bed0337a0b695be
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Nov 4 11:45:05 2022 -0700
+
+    Add explanatory comments for Coverity false positives.
+    
+    Add comments for two memory leak false positives reported by a
+    Coverity scan of open-vm-tools.   Don't annotate since the
+    annotations can't be made specified to the leaked variable, so
+    that if an actual leak were introduced in the future an annotation
+    would cause it to be reported as a false positive.
+    
+    For the same reason, replace a leaked storage annotation added
+    previously with an explanatory comment.
+
+commit b85ab7a63a97d9b7258df73638c76f9b7c149a4f
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:10:55 2022 -0800
+Date:   Fri Nov 4 11:45:05 2022 -0700
 
-    Update the ChangeLog file with the changes in the 12.1.5 open-vm-tools release.
-     - plus the ChangeLog update of Aug. 23, 2022
+    Change to common header file not applicable to open-vm-tools.
 
-commit a205236af862e732c774a5c2b77b700ccfc73f25
+commit da618bbbdaa6341c478d548a7d951250c571ad8e
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:01:14 2022 -0800
+Date:   Fri Nov 4 11:45:05 2022 -0700
+
+    Changes to common source files not applicable to open-vm-tools.
+
+commit f5eb126149dccb3172a90e772f6d5471a6c2c435
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Nov 4 11:45:05 2022 -0700
+
+    Change to common source file not applicable to open-vm-tools.
+
+commit d88dcf561315a316c1e2efda6a96ec22e2183306
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 12:11:07 2022 -0700
+
+    Update ChangeLog with the granular push of Oct 21, 2022.
+     - plus ChangeLog update of Oct 12, 2022.
+
+commit 3e1154b1e260982a47f66a9c807b7613ced95f59
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 11:39:49 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 6d934775155d5b1ee000056319290780e4e79b80
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 11:39:49 2022 -0700
+
+    Fix a regression caused by the previous guestOps ListFiles() change.
+    
+    If maxResults is 0, return an empty file list plus
+    the remaining number of files.
+
+commit 3c7bcfc3a3ca1e8a4d80b2eded28cb36535717f0
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 11:39:49 2022 -0700
 
     Fix printf format type found by Coverity scan.
     
     printf format should be using %zu to print a size_t value.
 
-commit 0a5d9821a6a82ab773d41b7ae9afe9dc8cccff30
+commit f56f1573158d0d5c1962202fba4a4aa8d0bfa35e
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:01:14 2022 -0800
+Date:   Fri Oct 21 11:39:49 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 40c74575b37430a2e30dbdd149b5de8c45978949
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 11:39:49 2022 -0700
 
     Avoid a vmtoolsd service error message if not on a VMware hypervisor.
     
@@ -41,32 +507,184 @@
     
     This change removes the unwanted error message.
 
-commit bb64ec6aa24c123bb25d1c48a4c126efa4fda5bf
+commit c1ba736f18d35d5b1e149aa43a902cb2a69927f3
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 11:39:49 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 6224a7616e26fd816772a82e100674ffdd87cf9f
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Fri Oct 21 11:39:49 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 6ec06e4a6482872421a87367814849f340bfb1a8
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:01:14 2022 -0800
+Date:   Wed Oct 12 13:21:25 2022 -0700
+
+    Update ChangeLog with the granular push of Oct 12, 2022.
+     - plus ChangeLog update of Sep 21, 2022.
+
+commit 7909b89d2d847f416257932e3c6ef96085a69ad4
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 13:04:00 2022 -0700
+
+    Add missed 2022 copyright change.
+
+commit cb762155088e5f56535d1f8990718d8880d165ff
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:37 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 51a5cca0c77ea4f246e5a411727221fcf70f240e
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:37 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 70a10365ba86e871710551d54e565ba6b8b3f4eb
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:37 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 7645e6cd7e3e8f13a862ce3489ea04bad3a26bf2
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:37 2022 -0700
+
+    Update the guestOps to handle some edge cases.
+    
+    When File_GetSize() fails or returns a -1 indicating the user does not
+    have access permissions:
+     1) Skip the file in the output of the ListFiles() request.
+     2) Fail an InitiateFileTransferFromGuest operation.
+    
+    Properly handle the hostd request offset value returned in a ListFiles()
+    guest operation when the results are truncated.
+
+commit 2f759e610c5ceabe420df9f678d23474dd423df4
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:37 2022 -0700
+
+    Move deployPkgFormat.h to lib/include/deployPkg.
+
+commit 90445a78a9d34da3b651fcc9ca7e967d8c397fda
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:37 2022 -0700
+
+    Changes to common header files not applicable to open-vm-tools.
+
+commit 7ac0e26580dcc2e2e1311ab16fb937da2a2e4e72
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:36 2022 -0700
+
+    Inclusive terminology - "rule of thumb"
+    
+    Update bora/lib/public/fileIO.h to use "general rule" instead
+    of "rule of thumb".
+
+commit 521eecf6eb591c7ef6106f9f44eee728c14a5795
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:36 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 83e3f82592ae15cc2d213591693d5684a8c88b5f
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Oct 12 12:40:36 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 2a7556c850fae76f830a1805f4dfbdf9f49e3899
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 11:18:00 2022 -0700
+
+    Update ChangeLog with the granular push of Sep 21, 2022.
+     - plus ChangeLog update of Sep 13, 2022.
+
+commit ce6d6d1abd652c766de597120b5a19c65a9a2f3f
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit c0002b9761a0fc18e363d1e414f9330d1acab950
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
 
     Add an example of a new deployPkg/wait-cloudinit-timeout setting to tools.conf.
 
-commit cd995a58b07a91d7804d9fdec5545a5fe11e9db9
+commit e210b4f0b28f7411ea2e45d4304725d0679481d2
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:01:14 2022 -0800
+Date:   Wed Sep 21 10:53:28 2022 -0700
 
-    Make Linux perl based customization work with the cloud-init workflow.
+    Inclusive terminology - "suffer"
     
-    To resolve issues seen where users want to set a vm's networking
-    and apply cloud-init userdata together before the vm is booted, the
-    deployPkg plugin has been modified to wait for cloud-init
-    execution to finish.  This allows cloud-init to finish execution
-    completely before the customization process triggers a reboot
-    of the guest.
+    Update bora/public/backdoor_def.h to not use "suffer".
+
+commit 045cc568c053096ca2d5e142787ab039c03ba654
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 1d13616f84f10e836cb589a1bab62d8ae3331c7d
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 7d4360383274807b488fcdf16ca6844ad27891a8
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 7ec8864176d51356ea5bdb6713496d1770aff2ba
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit e49ffc8d24257a4c1568e3a36d1f001a16b9d4cc
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit e873df9b63d4b16239f15dd0a4abfc7c1375e936
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Wed Sep 21 10:53:28 2022 -0700
+
+    Change to common source file not applicable to open-vm-tools.
+
+commit b5329468f4c2115d57ccfff54d0b4e9c703df33e
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 11:04:06 2022 -0700
+
+    Update ChangeLog with the granular push of Sep 13, 2022.
+     - plus ChangeLog update of Sep 8, 2022.
+
+commit ab5b5fa4453fd1e1998d8571cab30b2b590053ba
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:54:06 2022 -0700
+
+    Add missed 2022 copyright.
+
+commit 7de3c1c208596a6dfaa967d9bb3b58d7f77c8671
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:15 2022 -0700
+
+    Record the usage of open-vm-tools version 12.1.5.
     
-    This change is solely in the deployPkg plugin side, so a user can get
-    this change by upgrading their open-vm-tools in the guest/template.
-    Crossport of change 10318445 and 10330918 from main to vmtools-prod-cpd.
+    Update bora/public/vm_tools_version.h with an entry that associates
+    version 12.1.5 with the tag TOOLS_VERSION_MITER_SAW_UPDATE1.
 
-commit f7009c53afdab9a9507257c77bfeb30d8baaac8c
+commit abd63f3785f8e4ec5384f55021b070be22c7cf8f
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:01:14 2022 -0800
+Date:   Tue Sep 13 10:31:15 2022 -0700
 
     Add a null undo function to the vmbackup null provider.
     
@@ -83,56 +701,261 @@
     has no other effect.  currentOpName is set to the calling
     function name, e.g. __FUNCTION__.
 
-commit db9cb277841ddd56e2665fd29e3ee8c6f37fe233
+commit 42437c1131ee990737986d3fd5248bd17ec3e5ff
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:15 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit f1e30c3cb3b698a91de4966206350df2e08be128
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Thu Nov 10 12:01:14 2022 -0800
+Date:   Tue Sep 13 10:31:15 2022 -0700
 
-    Prepare tools builds on vmtools-prod-cpd for the 12.1.5 update release.
+    Changes to common source files not applicable to open-vm-tools.
+
+commit 484ab8d8443ac6dd42f2ba7aabae4a7b44eda2e3
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:15 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 8b98bd41def988342c16a870a4e7e880885dc81d
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:15 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 6d0cf2442fb9ec26be9528952e871c35019a1854
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:15 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 064033a0ea74599d93f2a9988e0331efbe8f981f
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:14 2022 -0700
+
+    [deployPkg] Increase the maximum timeout for cloud-init execution to complete.
+
+commit f3979ace5779c481073004968d6d9787d24c1096
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:14 2022 -0700
+
+    Record the use of VMware Tools version 10.3.26 in vm_tools_version.h
     
-    - Bump the tools version to 12.1.5.
+    Tracking the use of 10.3.26 for TOOLS_VERSION_JACKHAMMER_PATCH13.
 
-commit 6f5e4b13647b40a45c196dad76b1cb39cc6690b9
+commit 22f7f76e19c906890f5cd35bde1a43ae90e77f79
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Tue Aug 23 14:59:44 2022 -0700
+Date:   Tue Sep 13 10:31:14 2022 -0700
 
-    Update of the ChangeLog with the "open-vm-tools 12.1.0" release point marker.
+    Make Linux perl based customization work with the cloud-init workflow.
+    
+    To resolve issues seen where users want to set a vm's networking
+    and apply cloud-init userdata together before the vm is booted, the
+    deployPkg plugin has been modified to wait for cloud-init
+    execution to finish.  This allows cloud-init to finish execution
+    completely before the customization process triggers a reboot
+    of the guest.
+    
+    This change is solely in the deployPkg plugin side, so a user can get
+    this change by upgrading their open-vm-tools in the guest/template.
+
+commit 15e8c9828bcef3eb41e7655b0f18c575dc495b25
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:14 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit a2cb7be60dbaa2b632872b37e187570a92fe6b2a
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:14 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 1dbbb6e91e5388a88fe063d61d0cbb9602fb75a1
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Tue Sep 13 10:31:14 2022 -0700
+
+    Address Coverity issues.
+    
+    base64.c
+    - buffer overrun (out); false positive
+    
+    hashTable.c
+    - expression always false; false positive
+
+commit 587be32ec29a3665e30f7509d3d3c8f8ada505e7
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:57:36 2022 -0700
+
+    Update ChangeLog with the granular push of Sep 8, 2022.
+      - plus ChangeLog update of Aug 21, 2022.
+
+commit 29b92ada5842c2b9d1cde7dbc9dafb69d6a18b96
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    Change to common source file not applicable to open-vm-tools.
+
+commit 775671dc79aa47d82df2ad43e63e18d215625510
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 95b78cf63ea7dc37b6d9bd5b0f37cd074359ed0f
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    Changes to common header files not applicable to open-vm-tools.
+
+commit 8fa7eef2d27971753d9d6d1dd4fd5bd1a7a3dd17
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    [dnd] Coverity Fixes
+    
+    dndCommon.c
+    - truncating time value; false positive
+
+commit 900e24d53bca579d8ad6b12687daf670fb7fe5a6
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    [asyncsocket] Coverity Fixes
+    
+    asyncsocket.c
+    - dereferencing null pointer (asock); false positive.
+
+commit 8aa0bc98bf2986b47800dd7eaf544e7e800a075e
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit d3a4f33d29db6050ca84f504c9d3a557484e4a7d
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    Common header file change not applicable to open-vm=tools.
 
-commit 196eee046dc54358275ee5130cd189cd686efb27
+commit bdca47456a592040474b21ad0db40f820dcc87f9
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Tue Aug 23 14:52:28 2022 -0700
+Date:   Thu Sep 8 14:51:40 2022 -0700
 
-      =================================================
-        open-vm-tools 12.1.0 released at this point.
-      =================================================
-    Update of the ChangeLog with the final changes in preparation for
-    the open-vm-tools 12.1.0 release.
+    Common header file change not applicable to open-vm-tools.
 
-commit 296bffe04df602705d223d78633877ddd2f2cb9c
+commit 2875dd33aa494879103b9bf6a635781a99c1292a
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Tue Aug 23 12:44:30 2022 -0700
+Date:   Thu Sep 8 14:51:40 2022 -0700
 
-    Open-vm-tools 12.1.0 Release Notes
+    lib/rpcin/rpcin.c: Address issues reported by Coverity.
 
-commit 6914f15d59bd917dfa0dad04a6cc26632c03f5ba
+commit bbf4831bcfdb90428dae3aeee2304e5e16f7c7a9
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Mon Aug 22 09:16:36 2022 -0700
+Date:   Thu Sep 8 14:51:40 2022 -0700
 
-    Preparing for the open-vm-tools 12.1.0 release.
+    Change to common source file not applicable to open-vm-tools.
+
+commit d379cf84e479c11f4c3b470130a27f22005ab56d
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:40 2022 -0700
+
+    Change to common header file not applicable to open-vm-tools.
+
+commit 8a8bcb4ad1773fd62ad5a8bee352bf6ed34946a6
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Move HostinfoProcessQuery() from hostinfo.c into hostinfoPosix.c.
+
+commit c6de70b61177943130040563243ba6f671a0556e
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    L10n drop for open-vm-tools 12.1.0.
+
+commit b6c4eca1f575a6f116a3ce9e1bbb6e99dd134d33
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 53f331ccbbbc57eeaf4dfc51c94ec6f3e9a31a65
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 662eb2af666ca75532777ac28a11e29df1a6b413
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    lib/file: Speed up FileSimpleRandom.
+    
+    Also remove potential lock rank violations.
+
+commit db405bfe35567f1cafaff49c623d1f5568baea58
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Bump the open-vm-tools version to 12.2.0 in the "devel" branch.
+    
+    Setting the development open-vm-tools version to 12.2.0.
+    Adding the tag name "MITER_SAW_RELEASE" to tools version 12.1.0
+
+commit 366096f02bbaa95e057ed89a5de5c05a1168d23c
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Record the use of VMware Tools version 12.0.6 for an express patch.
     
-    Syncing the tools version, build number and product build number with
-    the internal official build of VMware Tools / open-vm-tools 12.1.0.
+    Adding the use of version 12.0.6 to lib/include/vm_tools_version.h.
+
+commit 948eb98761b2662bceda35791a3be420391ebec3
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 7066a131959f212a71e678f7538159b5f421ffc1
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit a2299e2022718f7fd833714a2252252c07249745
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    lib/file: Clarify why File_GetSize opens and closes the file.
+    
+    Spell out what's going on.
+
+commit d1f0cb0906d3a479fd3a3320ea202d96134fb16d
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
+
+commit 3f426fb27d85e71e10bb3264f622fdca0d1f8cd7
+Author: John Wolfe <jwolfe@vmware.com>
+Date:   Thu Sep 8 14:51:39 2022 -0700
+
+    Common header file change not applicable to open-vm-tools.
 
-commit 8825496ceca35e28cc74721b9e25f094f1ae5f2b
+commit 7991ed9acfe0917bc8642a48e7db82db5c779277
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Sun Aug 21 13:16:01 2022 -0700
+Date:   Thu Sep 8 14:51:39 2022 -0700
 
-    Update of the ChangeLog with granular push from the 12.1.0 tools product branch.
+    Changes to common header files not applicable to open-vm-tools.
 
-commit 4a41aee3900ddec7d84b919e26e85e9a9b623cd5
+commit 365db99d442774c49234ae157fc4373d0bb6c4f8
 Author: John Wolfe <jwolfe@vmware.com>
-Date:   Sun Aug 21 13:00:18 2022 -0700
+Date:   Thu Sep 8 14:51:39 2022 -0700
 
-    VMTools 12.1.0 L10n drop.
+    Common source file changes not applicable to open-vm-tools.
 
 commit 732bb7a3287ebdb2be079f364da4b0ea6a4c08bd
 Author: John Wolfe <jwolfe@vmware.com>
diff -Nru open-vm-tools-12.1.5/open-vm-tools/configure.ac open-vm-tools-12.2.0/open-vm-tools/configure.ac
--- open-vm-tools-12.1.5/open-vm-tools/configure.ac	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/configure.ac	2023-03-07 23:57:07.000000000 +0100
@@ -35,10 +35,10 @@
 ### Initialization
 ###
 
-TOOLS_VERSION="12.1.5"
+TOOLS_VERSION="12.2.0"
 AC_INIT(
    [open-vm-tools],
-   [12.1.5],
+   [12.2.0],
    [open-vm-tools-devel@lists.sourceforge.net])
 
 # In order to make this configure script auto-detect situations where
@@ -726,10 +726,20 @@
 #
 # proto files needed by containerd grpc client.
 #
-   shared_prefix=/usr/share/gocode/src/github.com
+# Installation location varies between Linux vendors.
+#   Canonical, Ubuntu and Debian: in /usr/share/gocode/src
+#   openSUSE/SUSE: in /usr/share/go/<version>/contrib/src
+#
+   for d in /usr/share/gocode/src /usr/share/go/1.*/contrib/src; do
+       if test -d "$d"/github.com; then
+           src_prefix="$d"
+           break
+       fi
+   done
+   shared_prefix=$src_prefix/github.com
    AC_SUBST(TYPES_DIR, github.com/containerd/containerd/api/types)
    AC_SUBST(TASKS_PROTOPATH, $shared_prefix/containerd/containerd/api/services/tasks/v1)
-   AC_SUBST(DEP_PROTOPATH, /usr/share/gocode/src)
+   AC_SUBST(DEP_PROTOPATH, $src_prefix)
    AC_SUBST(CONTAINERD_PROTOPATH, $shared_prefix/containerd/containerd/api/services/containers/v1)
    AC_SUBST(GOGO_PROTOPATH, $shared_prefix/gogo/protobuf)
    AC_CHECK_FILE([${CONTAINERD_PROTOPATH}/containers.proto],
@@ -1939,6 +1949,10 @@
    libappmonitor/appmonitor.pc         \
 ])
 
+
+
+
+
 ###
 ### Output
 ###
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncSocketBase.c open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncSocketBase.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncSocketBase.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncSocketBase.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2016-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2016-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -627,7 +627,8 @@
       return ASOCKERR_INVAL;
    }
 
-   if (AsyncSocketGetState(asock) != AsyncSocketConnected) {
+   if (AsyncSocketGetState(asock) != AsyncSocketConnected &&
+       AsyncSocketGetState(asock) != AsyncSocketConnectedRdOnly) {
       ASOCKWARN(asock, "recv called but state is not connected!\n");
       return ASOCKERR_NOTCONNECTED;
    }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncsocket.c open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncsocket.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncsocket.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncsocket.c	2023-03-07 23:57:07.000000000 +0100
@@ -336,6 +336,7 @@
                                         void *clientData);
 static int AsyncTCPSocketFlush(AsyncSocket *asock, int timeoutMS);
 static void AsyncTCPSocketCancelRecvCb(AsyncTCPSocket *asock);
+static void AsyncTCPSocketCancelSendCb(AsyncTCPSocket *asock);
 
 static int AsyncTCPSocketRecv(AsyncSocket *asock,
              void *buf, int len, Bool partial, void *cb, void *cbData);
@@ -351,6 +352,7 @@
                                     void *clientData);
 static int AsyncTCPSocketIsSendBufferFull(AsyncSocket *asock);
 static int AsyncTCPSocketClose(AsyncSocket *asock);
+static int AsyncTCPSocketCloseWrite(AsyncSocket *asock);
 static int AsyncTCPSocketCancelRecv(AsyncSocket *asock, int *partialRecvd,
                                     void **recvBuf, void **recvFn,
                                     Bool cancelOnSend);
@@ -412,6 +414,7 @@
    AsyncTCPSocketIsSendBufferFull,
    NULL,                        /* getNetworkStats */
    AsyncTCPSocketClose,
+   AsyncTCPSocketCloseWrite,
    AsyncTCPSocketCancelRecv,
    AsyncTCPSocketCancelCbForClose,
    AsyncTCPSocketGetLocalVMCIAddress,
@@ -736,7 +739,8 @@
    ASSERT(ipRetStr != NULL);
 
    if (ipRetStr == NULL || asock == NULL ||
-       AsyncTCPSocketGetState(asock) != AsyncSocketConnected ||
+       (AsyncTCPSocketGetState(asock) != AsyncSocketConnected &&
+        AsyncTCPSocketGetState(asock) != AsyncSocketConnectedRdOnly) ||
        (asock->remoteAddrLen != sizeof (struct sockaddr_in) &&
         asock->remoteAddrLen != sizeof (struct sockaddr_in6))) {
       ret = ASOCKERR_GENERIC;
@@ -784,7 +788,8 @@
    ASSERT(asock);
 
    if (asock == NULL ||
-      AsyncTCPSocketGetState(asock) != AsyncSocketConnected ||
+     (AsyncTCPSocketGetState(asock) != AsyncSocketConnected &&
+      AsyncTCPSocketGetState(asock) != AsyncSocketConnectedRdOnly) ||
       (asock->remoteAddrLen != sizeof(struct sockaddr_in) &&
        asock->remoteAddrLen != sizeof(struct sockaddr_in6))) {
       ret = ASOCKERR_GENERIC;
@@ -2625,7 +2630,8 @@
 
    ASSERT(AsyncTCPSocketIsLocked(asock));
 
-   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected &&
+       AsyncTCPSocketGetState(asock) != AsyncSocketConnectedRdOnly) {
       TCPSOCKWARN(asock, "recv called but state is not connected!\n");
       return ASOCKERR_NOTCONNECTED;
    }
@@ -2761,7 +2767,8 @@
       return ASOCKERR_INVAL;
    }
 
-   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected &&
+       AsyncTCPSocketGetState(asock) != AsyncSocketConnectedRdOnly) {
       TCPSOCKWARN(asock, "peek called but state is not connected!\n");
       return ASOCKERR_NOTCONNECTED;
    }
@@ -3206,7 +3213,9 @@
       return ASOCKERR_INVAL;
    }
 
-   if (AsyncTCPSocketGetState(s) != AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(s) != AsyncSocketConnected &&
+      /* Allow AsyncSocketConnectedRdOnly iff we are reading */
+      (AsyncTCPSocketGetState(s) != AsyncSocketConnectedRdOnly || !read)) {
       TCPSOCKWARN(s, "recv called but state is not connected!\n");
       return ASOCKERR_NOTCONNECTED;
    }
@@ -3447,6 +3456,12 @@
          AsyncTCPSocketAddRef(asock);
          asock->inLowLatencySendCb++;
          asock->internalSendFn((void *)asock);
+         /*
+          * Coverity warns that asock->internalSendFn may free asock. This is a
+          * false positive because this is a reference counted object and we've
+          * added a reference a few lines above.
+          */
+         /* coverity[deref_after_free:FALSE] */
          asock->inLowLatencySendCb--;
          AsyncTCPSocketRelease(asock);
       } else {
@@ -3654,7 +3669,8 @@
    int pending = 0;
 
    ASSERT(AsyncTCPSocketIsLocked(s));
-   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected);
+   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+          AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly);
 
    /*
     * When a socket has received all its desired content and FillRecvBuffer is
@@ -3715,10 +3731,10 @@
             goto exit;
          }
       } else if (recvd == 0) {
-         TCPSOCKLG0(s, "recv detected client closed connection\n");
+         TCPSOCKLG0(s, "recv detected remote shutdown\n");
          /*
-          * We treat this as an error so that the owner can detect closing
-          * of connection by peer (via the error handler callback).
+          * We treat this as an error so that the owner can detect orderly
+          * shutdown (or half-close) by peer (via the error handler callback).
           */
          result = ASOCKERR_REMOTE_DISCONNECT;
          goto exit;
@@ -3819,7 +3835,8 @@
 #define MAX_NESTED_PEEKS 8
 
    ASSERT(AsyncTCPSocketIsLocked(s));
-   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected);
+   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+          AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly);
    ASSERT(s->flags & ASOCK_FLAG_PEEK);
 
    needed = s->base.recvLen - s->base.recvPos;
@@ -3854,10 +3871,10 @@
          }
          ASSERT(s->base.recvPos == 0);
       } else if (recvd == 0) {
-         TCPSOCKLG0(s, "peek detected client closed connection\n");
+         TCPSOCKLG0(s, "peek detected remote shutdown\n");
          /*
-          * We treat this as an error so that the owner can detect closing
-          * of connection by peer (via the error handler callback).
+          * We treat this as an error so that the owner can detect orderly
+          * shutdown (or half-close) by peer (via the error handler callback).
           */
          result = ASOCKERR_REMOTE_DISCONNECT;
          goto exit;
@@ -4044,7 +4061,7 @@
    }
 
    if (AsyncTCPSocketGetState(s) != AsyncSocketConnected) {
-      TCPSOCKWARN(s, "write buffers on a disconnected socket!\n");
+      TCPSOCKWARN(s, "write buffers on a disconnected or rdonly socket!\n");
       return ASOCKERR_GENERIC;
    }
 
@@ -4360,7 +4377,8 @@
 
    ASSERT(AsyncTCPSocketIsLocked(s));
 
-   if (AsyncTCPSocketGetState(s) == AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+       AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly) {
       return ASOCKERR_SUCCESS;
    }
 
@@ -4499,7 +4517,8 @@
    int retVal;
 
    ASSERT(AsyncTCPSocketIsLocked(s));
-   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected);
+   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+         (AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly && read));
 
    if (read) {
       if (s->inRecvLoop) {
@@ -4546,7 +4565,8 @@
 
       if (AsyncTCPSocketGetState(s) != AsyncSocketClosed && s->recvCb) {
          ASSERT(s->base.refCount > 1); /* We shouldn't be last user of socket. */
-         ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected);
+         ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+                AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly);
          /*
           * If AsyncTCPSocketPoll or AsyncTCPSocketFillRecvBuffer fails, do not
           * add the recv callback as it may never fire.
@@ -4620,7 +4640,8 @@
    VmTimeType startMS = Hostinfo_SystemTimerMS();
    VmTimeType nowMS;
 
-   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected);
+   ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+          AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly);
    ASSERT(s->recvCb); /* We are supposed to call someone... */
 
    if (!AsyncTCPSocketIsLocked(s) || !Poll_LockingEnabled()) {
@@ -4664,7 +4685,8 @@
             TCPSOCKWARN(s, "%s: failed to poll on the socket during read.\n",
                         __FUNCTION__);
          }
-      } else if (AsyncTCPSocketGetState(s) == AsyncSocketConnected) {
+      } else if (AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+                 AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly) {
          ASSERT(asock == s);
          retVal = AsyncTCPSocketFillRecvBuffer(s);
       }
@@ -4689,7 +4711,8 @@
       }
       timeoutMS -= nowMS - startMS;
       startMS = nowMS;
-      ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected && s->recvCb);
+      ASSERT((AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly ||
+              AsyncTCPSocketGetState(s) == AsyncSocketConnected) && s->recvCb);
    }
 
    if (cbRemoved) {
@@ -4699,7 +4722,8 @@
        * add the recv callback as it may never fire.
        */
       if (retVal == ASOCKERR_TIMEOUT) {
-         ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected);
+         ASSERT(AsyncTCPSocketGetState(s) == AsyncSocketConnected ||
+                AsyncTCPSocketGetState(s) == AsyncSocketConnectedRdOnly);
          ASSERT(s->base.refCount > 1); /* We better not be the last user */
          retVal = AsyncTCPSocketRegisterRecvCb(s);
          Log("SOCKET reregister recvCb after DrainRecv (ref %d)\n",
@@ -4754,7 +4778,7 @@
    AsyncTCPSocketAddRef(s);
 
    if (AsyncTCPSocketGetState(s) != AsyncSocketConnected) {
-      TCPSOCKWARN(s, "flush called but state is not connected!\n");
+      TCPSOCKWARN(s, "flush called but state is rdonly or disconnected!\n");
       retVal = ASOCKERR_INVAL;
       goto outHaveLock;
    }
@@ -4886,6 +4910,12 @@
 {
    ASSERT(AsyncTCPSocketIsLocked(asock));
 
+   /*
+    * We could fire the current recv completion callback here, but in
+    * practice clients won't want to know about partial reads since it just
+    * complicates the common case (i.e. every read callback would need to
+    * check the len parameter).
+    */
    if (asock->recvCbTimer) {
       AsyncTCPSocketPollRemove(asock, FALSE, 0, asock->internalRecvFn);
       asock->recvCbTimer = FALSE;
@@ -4914,6 +4944,91 @@
 /*
  *----------------------------------------------------------------------------
  *
+ * AsyncTCPSocketCancelSendCb --
+ *
+ *      Socket specific code for canceling callbacks when a send
+ *      request is being canceled.
+ *
+ *      This function assumes the caller has done AsyncTCPSocketAddRef,
+ *      since the sendFn callback registered might close the socket.
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static void
+AsyncTCPSocketCancelSendCb(AsyncTCPSocket *asock)  // IN:
+{
+   if (asock->sendCb) {
+      Bool removed;
+
+      TCPSOCKLOG(1, asock,
+                 "sendBufList is non-NULL, removing send callback\n");
+
+      /*
+       * The send callback could be either a device or RTime callback, so
+       * we check the latter if it wasn't the former.
+       */
+
+      if (asock->sendCbTimer) {
+         removed = AsyncTCPSocketPollRemove(asock, FALSE, 0,
+                                            asock->internalSendFn);
+      } else {
+         removed = AsyncTCPSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE,
+                                            asock->internalSendFn);
+      }
+      ASSERT(removed || AsyncTCPSocketPollParams(asock)->iPoll);
+      asock->sendCb = FALSE;
+      asock->sendCbTimer = FALSE;
+   }
+
+   /*
+    * Go through any send buffers on the list and fire their
+    * callbacks, reflecting back how much of each buffer has been
+    * submitted to the kernel.  For the first buffer in the list that
+    * may be non-zero, for subsequent buffers it will be zero.
+    *
+    * Unlike AsyncTCPSocketCancelRecvCb, the argument of firing callbacks
+    * here is that the common case for writes is "fire and forget", e.g.
+    * send this buffer and free it. Firing the triggers at close time
+    * simplifies client code, since the clients aren't forced to keep track
+    * of send buffers themselves. Clients can figure out how much data was
+    * actually transmitted (if they care) by checking the len parameter
+    * passed to the send callback.
+    *
+    * A modification suggested by Jeremy is to pass a list of unsent
+    * buffers and their completion callbacks to the error handler if one is
+    * registered, and only fire the callbacks here if there was no error
+    * handler invoked.
+    */
+
+   while (asock->sendBufList) {
+      /*
+       * Pop each remaining buffer and fire its completion callback.
+       */
+
+      SendBufList *cur = asock->sendBufList;
+      int pos = asock->sendPos;
+
+      asock->sendBufList = asock->sendBufList->next;
+      asock->sendPos = 0;
+
+      if (cur->sendFn) {
+         cur->sendFn(cur->buf, pos, BaseSocket(asock), cur->clientData);
+      }
+      free(cur);
+   }
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
  * AsyncTCPSocketCancelCbForClose --
  *
  *      Cancel future asynchronous send and recv by unregistering
@@ -4945,32 +5060,12 @@
    Bool removed;
 
    ASSERT(AsyncTCPSocketIsLocked(asock));
-
-   if (AsyncTCPSocketGetState(asock) == AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(asock) == AsyncSocketConnected ||
+       AsyncTCPSocketGetState(asock) == AsyncSocketConnectedRdOnly) {
       AsyncTCPSocketSetState(asock, AsyncSocketCBCancelled);
    }
 
-   /*
-    * Remove the read and write poll callbacks.
-    *
-    * We could fire the current recv completion callback here, but in
-    * practice clients won't want to know about partial reads since it just
-    * complicates the common case (i.e. every read callback would need to
-    * check the len parameter).
-    *
-    * For writes, however, we *do* fire all of the callbacks. The argument
-    * here is that the common case for writes is "fire and forget", e.g.
-    * send this buffer and free it. Firing the triggers at close time
-    * simplifies client code, since the clients aren't forced to keep track
-    * of send buffers themselves. Clients can figure out how much data was
-    * actually transmitted (if they care) by checking the len parameter
-    * passed to the send callback.
-    *
-    * A modification suggested by Jeremy is to pass a list of unsent
-    * buffers and their completion callbacks to the error handler if one is
-    * registered, and only fire the callbacks here if there was no error
-    * handler invoked.
-    */
+   /* Remove the read callback. Similar to AsyncTCPSocketCancelRecvCb */
 
    ASSERT(!asock->base.recvBuf || asock->base.recvFn);
 
@@ -4992,50 +5087,10 @@
       asock->base.recvBuf = NULL;
    }
 
-   if (asock->sendCb) {
-      TCPSOCKLOG(1, asock,
-                 "sendBufList is non-NULL, removing send callback\n");
-
-      /*
-       * The send callback could be either a device or RTime callback, so
-       * we check the latter if it wasn't the former.
-       */
-
-      if (asock->sendCbTimer) {
-         removed = AsyncTCPSocketPollRemove(asock, FALSE, 0,
-                                         asock->internalSendFn);
-      } else {
-         removed = AsyncTCPSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE,
-                                         asock->internalSendFn);
-      }
-      ASSERT(removed || AsyncTCPSocketPollParams(asock)->iPoll);
-      asock->sendCb = FALSE;
-      asock->sendCbTimer = FALSE;
-   }
+   /* Remove the write callback. */
 
-   /*
-    * Go through any send buffers on the list and fire their
-    * callbacks, reflecting back how much of each buffer has been
-    * submitted to the kernel.  For the first buffer in the list that
-    * may be non-zero, for subsequent buffers it will be zero.
-    */
    AsyncTCPSocketAddRef(asock);
-   while (asock->sendBufList) {
-      /*
-       * Pop each remaining buffer and fire its completion callback.
-       */
-
-      SendBufList *cur = asock->sendBufList;
-      int pos = asock->sendPos;
-
-      asock->sendBufList = asock->sendBufList->next;
-      asock->sendPos = 0;
-
-      if (cur->sendFn) {
-         cur->sendFn(cur->buf, pos, BaseSocket(asock), cur->clientData);
-      }
-      free(cur);
-   }
+   AsyncTCPSocketCancelSendCb(asock);
    AsyncTCPSocketRelease(asock);
    return ASOCKERR_SUCCESS;
 }
@@ -5108,6 +5163,74 @@
 /*
  *----------------------------------------------------------------------------
  *
+ * AsyncTCPSocketCloseWrite --
+ *
+ *      Close the write side of AsyncTCPSocket.
+ *
+ * Results:
+ *      ASOCKERR_*.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static int
+AsyncTCPSocketCloseWrite(AsyncSocket *base)  // IN:
+{
+#ifdef VMX86_TOOLS
+   /* For tools, don't support closeWrite for now */
+   return ASOCKERR_INVAL;
+#else
+   AsyncTCPSocket *asock = TCPSocket(base);
+   int ret;
+
+   ASSERT(AsyncTCPSocketIsLocked(asock));
+
+   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
+      return ASOCKERR_INVAL;
+   }
+   if (SSL_IsEncrypted(asock->sslSock)) {
+      /* SSL doesn't support half-close */
+      return ASOCKERR_INVAL;
+   }
+   ASSERT(asock->listenAsock4 == NULL);
+   ASSERT(asock->listenAsock6 == NULL);
+
+   if (asock->flushEnabledMaxWaitMsec && !asock->base.errorSeen) {
+      int ret = AsyncTCPSocketFlush(BaseSocket(asock),
+                                    asock->flushEnabledMaxWaitMsec);
+      if (ret != ASOCKERR_SUCCESS) {
+         TCPSOCKWARN(asock,
+                     "AsyncTCPSocket_Flush failed: %s. (ignored).\n",
+                     AsyncSocket_Err2String(ret));
+      }
+   }
+   AsyncTCPSocketSetState(asock, AsyncSocketConnectedRdOnly);
+   AsyncTCPSocketAddRef(asock);
+   AsyncTCPSocketCancelSendCb(asock);
+
+   ret = SSLGeneric_shutdown(SSL_GetFd(asock->sslSock));
+   if (ret < 0) {
+      asock->genericErrno = ASOCK_LASTERROR();
+      TCPSOCKWARN(asock, "shutdown error %d: %s\n", asock->genericErrno,
+                 Err_Errno2String(asock->genericErrno));
+      ret = ASOCKERR_GENERIC;
+      goto out;
+   }
+   ret = ASOCKERR_SUCCESS;
+
+out:
+   AsyncTCPSocketRelease(asock);
+   return ret;
+#endif
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
  * AsyncTCPSocketClose --
  *
  *      AsyncTCPSocket destructor. The destructor should be safe to call at any
@@ -5153,8 +5276,7 @@
       if (asock->flushEnabledMaxWaitMsec &&
           AsyncTCPSocketGetState(asock) == AsyncSocketConnected &&
           !asock->base.errorSeen) {
-         int ret = AsyncTCPSocketFlush(BaseSocket(asock),
-                                       asock->flushEnabledMaxWaitMsec);
+         int ret = AsyncTCPSocketFlush(base, asock->flushEnabledMaxWaitMsec);
          if (ret != ASOCKERR_SUCCESS) {
             TCPSOCKWARN(asock,
                         "AsyncTCPSocket_Flush failed: %s. Closing now.\n",
@@ -5189,7 +5311,8 @@
          break;
 
       case AsyncSocketConnected:
-         TCPSOCKLOG(1, asock, "old state was connected\n");
+      case AsyncSocketConnectedRdOnly:
+         TCPSOCKLOG(1, asock, "old state was connected/rdonly\n");
          AsyncTCPSocketCancelCbForClose(BaseSocket(asock));
          break;
 
@@ -5940,7 +6063,8 @@
 
    ASSERT(AsyncTCPSocketIsLocked(asock));
 
-   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected &&
+       AsyncTCPSocketGetState(asock) != AsyncSocketConnectedRdOnly) {
       Warning(ASOCKPREFIX "Failed to cancel request on disconnected socket!\n");
       return ASOCKERR_INVAL;
    }
@@ -5994,7 +6118,8 @@
 
    ASSERT(AsyncTCPSocketIsLocked(asock));
 
-   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
+   if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected &&
+       AsyncTCPSocketGetState(asock) != AsyncSocketConnectedRdOnly) {
       Warning(ASOCKPREFIX "Failed to receive fd on disconnected socket!\n");
       return -1;
    }
@@ -6389,13 +6514,20 @@
     * Handle non-native options first.
     */
 
-   if ((layer == ASYNC_SOCKET_OPTS_LAYER_BASE) &&
-       (optID == ASYNC_SOCKET_OPT_SEND_LOW_LATENCY_MODE)) {
-      ASSERT(inBufLen == sizeof(Bool));
-      tcpSocket->sendLowLatency = *((const Bool *)valuePtr);
-      TCPSOCKLG0(tcpSocket, "%s: sendLowLatencyMode set to [%d].\n",
-                 __FUNCTION__, (int)tcpSocket->sendLowLatency);
-      return ASOCKERR_SUCCESS;
+   if (layer == ASYNC_SOCKET_OPTS_LAYER_BASE) {
+      switch (optID) {
+         case ASYNC_SOCKET_OPT_SEND_LOW_LATENCY_MODE:
+            ASSERT(inBufLen == sizeof(Bool));
+            tcpSocket->sendLowLatency = *((const Bool *)valuePtr);
+            TCPSOCKLG0(tcpSocket, "%s: sendLowLatencyMode set to [%d].\n",
+                       __FUNCTION__, (int)tcpSocket->sendLowLatency);
+            return ASOCKERR_SUCCESS;
+         default:
+            TCPSOCKLG0(tcpSocket, "%s: could not set non-native option [%d]"
+                       " for TCP socket -- option not supported.\n",
+                       __FUNCTION__, (int)optID);
+            return ASOCKERR_INVAL;
+      }
    }
 
    /*
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2016-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2016-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -1254,6 +1254,48 @@
       AsyncSocketUnlock(asock);
    } else {
       ret = ASOCKERR_INVAL;
+   }
+   return ret;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * AsyncSocket_CloseWrite --
+ *
+ *      Close the write side of AsyncSocket, and leave the read side open. This
+ *      can be used to implement a shutdown(SHUT_WR...) equivalent.
+ *
+ *      This function is meant to be called after the socket has been connected
+ *      If no error, pending send is flushed the same way as AsyncSocket_Close,
+ *      and then the socket enters half-closed state, disallowing further send.
+ *
+ *      Like AsyncSocket_Close, it's safe to call at any time, but it could err
+ *      when the socket is not connected. Unlike Close, read side of the socket
+ *      is left intact, and the the socket is not released.
+ *
+ *      If the socket is already closed, it returns success.
+ *
+ * Results:
+ *      ASOCKERR_*.
+ *
+ * Side effects:
+ *      Send is not permitted after this call.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+int
+AsyncSocket_CloseWrite(AsyncSocket *asock)         // IN
+{
+   int ret;
+   if (VALID(asock, closeWrite)) {
+      AsyncSocketLock(asock);
+      ret = VT(asock)->closeWrite(asock);
+      AsyncSocketUnlock(asock);
+   } else {
+      ret = ASOCKERR_INVAL;
    }
    return ret;
 }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncSocketVTable.h open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncSocketVTable.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/asyncsocket/asyncSocketVTable.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/asyncsocket/asyncSocketVTable.h	2023-03-07 23:57:07.000000000 +0100
@@ -109,6 +109,7 @@
    int (*getNetworkStats)(AsyncSocket *asock,
                           AsyncSocketNetworkStats *stats);
    int (*close)(AsyncSocket *asock);
+   int (*closeWrite)(AsyncSocket *asock);
    int (*cancelRecv)(AsyncSocket *asock, int *partialRecvd, void **recvBuf,
                      void **recvFn, Bool cancelOnSend);
    int (*cancelCbForClose)(AsyncSocket *asock);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/dynxdr/dynxdr.c open-vm-tools-12.2.0/open-vm-tools/lib/dynxdr/dynxdr.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/dynxdr/dynxdr.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/dynxdr/dynxdr.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2018, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -43,9 +43,9 @@
 } DynXdrData;
 
 /*
- * FreeBSD < 5.0 and Solaris do not declare some parameters as "const".
+ * Solaris does not declare some parameters as "const".
  */
-#if defined(sun) || (defined(__FreeBSD__) && __FreeBSD_version < 500000)
+#if defined(sun)
 #  define DYNXDR_CONST
 #else
 #  define DYNXDR_CONST const
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/file/file.c open-vm-tools-12.2.0/open-vm-tools/lib/file/file.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/file/file.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/file/file.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -66,6 +66,7 @@
 #include "hostinfo.h"
 #include "hostType.h"
 #include "vm_atomic.h"
+#include "vm_basic_asm.h"
 #include "fileLock.h"
 #include "userlock.h"
 #include "strutil.h"
@@ -1499,6 +1500,14 @@
  *
  *      Get size of file. Try File_GetSizeEx to get size of directory/symlink.
  *
+ *      For performance reasons, whenever a file grows, many file systems elect
+ *      to not update the on-storage inode information until close or when
+ *      forced to write a dirty page. This is done to avoid wasting I/O
+ *      throughput.
+ *
+ *      The only way to determine the exact, up-to-date size of a file is to
+ *      open it and query the file size.
+ *
  * Results:
  *      Size of file or -1.
  *
@@ -2235,14 +2244,24 @@
 uint32
 FileSimpleRandom(void)
 {
-   static Atomic_Ptr lckStorage;
-   static rqContext *context = NULL;
    uint32 result;
-   MXUserExclLock *lck = MXUser_CreateSingletonExclLock(&lckStorage,
-                                                        "fileSimpleRandomLock",
-                                                        RANK_LEAF);
+   static rqContext *context = NULL;
+   static Atomic_uint32 spinLock = { 0 };
 
-   MXUser_AcquireExclLock(lck);
+   /*
+    * Use a spin lock here since:
+    *
+    *   The chance we'll spin in tiny.
+    *   The time spent under the spin lock is miniscule.
+    *   The time spent under the spin lock is not highly variable.
+    *   We can't get stuck under the spin lock.
+    *   The overhead of a mutex is larger than the time spent under the spin lock.
+    *   It uses much less memory than a mutex.
+    */
+
+   while (Atomic_ReadWrite(&spinLock, 1)) {
+      PAUSE();
+   }
 
    if (UNLIKELY(context == NULL)) {
       uint32 value;
@@ -2259,7 +2278,7 @@
 
    result = Random_Quick(context);
 
-   MXUser_ReleaseExclLock(lck);
+   Atomic_Write(&spinLock, 0);
 
    return result;
 }
@@ -2271,9 +2290,9 @@
  * FileSleeper
  *
  *      Sleep for a random amount of time, no less than the specified minimum
- *      and no more than the specified maximum sleep time values. This often
- *      proves useful to "jitter" retries such that multiple threads don't
- *      easily get into resonance performing necessary actions.
+ *      and no more than the specified maximum. This often proves useful to
+ *      "jitter" retries such that multiple threads don't easily get into
+ *      resonance performing necessary actions (e.g. retries).
  *
  * Results:
  *      Somnambulistic behavior; the amount of time slept is returned.
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/file/filePosix.c open-vm-tools-12.2.0/open-vm-tools/lib/file/filePosix.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/file/filePosix.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/file/filePosix.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2021, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -749,11 +749,9 @@
 #if defined(__FreeBSD__)
    /*
     * FreeBSD: All supported versions have timestamps with nanosecond
-    * resolution. FreeBSD 5+ has also file creation time.
+    * resolution.
     */
-#   if defined(__FreeBSD_version) && __FreeBSD_version >= 500043
    *createTime     = TimeUtil_UnixTimeToNtTime(statBuf.st_birthtimespec);
-#   endif
    *accessTime     = TimeUtil_UnixTimeToNtTime(statBuf.st_atimespec);
    *writeTime      = TimeUtil_UnixTimeToNtTime(statBuf.st_mtimespec);
    *attrChangeTime = TimeUtil_UnixTimeToNtTime(statBuf.st_ctimespec);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/hgfsServer/hgfsServer.c open-vm-tools-12.2.0/open-vm-tools/lib/hgfsServer/hgfsServer.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/hgfsServer/hgfsServer.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/hgfsServer/hgfsServer.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -3427,11 +3427,18 @@
    }
 
    /*
-    * Storage pointed at by the variable input was freed either by
-    * HgfsServerProcessRequest at the end of request processing
-    * or by HgfsServerCompleteRequest if there was a protocol error.
+    * Contrary to Coverity analysis, storage pointed to by the variable
+    * "input" is not leaked; it is freed either by HgfsServerProcessRequest
+    * at the end of request processing or by HgfsServerCompleteRequest if
+    * there is a protocol error.  However, no Coverity annotation for
+    * leaked_storage is added here because such an annotation cannot be
+    * made specific to input; as a result, if any actual memory leaks were
+    * to be introduced by a future change, the leaked_storage annotation
+    * would cause such new leaks to be flagged as false positives.
+    *
+    * XXX - can something be done with Coverity function models so that
+    * Coverity stops reporting this?
     */
-   /* coverity[leaked_storage] */
 }
 
 
@@ -5973,6 +5980,18 @@
 
    *bufOut = myBufOut;
 
+   /*
+    * Contrary to Coverity analysis, storage pointed to by the variable
+    * "entry" is not leaked; HgfsCache_Put stores a pointer to it in the
+    * symlink cache.  However, no Coverity annotation for leaked_storage
+    * is added here because such an annotation cannot be made specific to
+    * entry; as a result, if any actual memory leaks were to be introduced
+    * by a future change, the leaked_storage annotation would cause such
+    * new leaks to be flagged as false positives.
+    *
+    * XXX - can something be done with Coverity function models so that
+    * Coverity stops reporting this?
+    */
    return HGFS_NAME_STATUS_COMPLETE;
 
 error:
@@ -8555,6 +8574,19 @@
    free(localName);
 
    HgfsServerCompleteRequest(status, replyPayloadSize, input);
+
+   /*
+    * Contrary to Coverity analysis, storage pointed to by the variable
+    * "entry" is not leaked; HgfsCache_Put stores a pointer to it in the
+    * symlink cache.  However, no Coverity annotation for leaked_storage
+    * is added here because such an annotation cannot be made specific to
+    * entry; as a result, if any actual memory leaks were to be introduced
+    * by a future change, the leaked_storage annotation would cause such
+    * new leaks to be flagged as false positives.
+    *
+    * XXX - can something be done with Coverity function models so that
+    * Coverity stops reporting this?
+    */
 }
 
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c open-vm-tools-12.2.0/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -232,14 +232,11 @@
 #endif
 
 
-#if defined(sun) || defined(__linux__) || \
-    (defined(__FreeBSD_version) && __FreeBSD_version < 490000)
+#if defined(sun) || defined(__linux__)
 /*
- * Implements futimes(), which was introduced in glibc 2.3.3. FreeBSD 3.2
- * doesn't have it, but 4.9 does. Unfortunately, these early FreeBSD versions
- * don't have /proc/self, so futimes() will simply fail. For now the only
- * caller to futimes() is HgfsServerSetattr which doesn't get invoked at all
- * in the HGFS server which runs in the Tools, so it's OK.
+ * Implements futimes(), which was introduced in glibc 2.3.3.
+ * For now the only caller to futimes() is HgfsServerSetattr which doesn't get
+ * invoked at all in the HGFS server which runs in the Tools.
  */
 #define PROC_SELF_FD "/proc/self/fd/"
 #define STRLEN_OF_MAXINT_AS_STRING 10
@@ -1907,23 +1904,19 @@
 {
    uint64 creationTime;
    /*
-    * Linux and FreeBSD before v5 doesn't know about creation time; we just use the time
+    * Linux doesn't know about creation time; we just use the time
     * of last data modification for the creation time.
-    * FreeBSD 5+ supprots file creation time.
+    * FreeBSD 5+ supports file creation time.
     *
     * Using mtime when creation time is unavailable to be consistent with SAMBA.
     */
 
 #ifdef __FreeBSD__
    /*
-    * FreeBSD: All supported versions have timestamps with nanosecond resolution.
-    *          FreeBSD 5+ has also file creation time.
+    * FreeBSD: All supported versions have timestamps with nanosecond resolution
+    *          and have file creation time.
     */
-#   if __IS_FREEBSD_VER__(500043)
    creationTime   = HgfsConvertTimeSpecToNtTime(&stats->st_birthtimespec);
-#   else
-   creationTime   = HgfsConvertTimeSpecToNtTime(&stats->st_mtimespec);
-#   endif
 #elif defined(__linux__)
    /*
     * Linux: Glibc 2.3+ has st_Xtim.  Glibc 2.1/2.2 has st_Xtime/__unusedX on
@@ -2522,8 +2515,8 @@
 
 #ifdef __FreeBSD__
    /*
-    * FreeBSD: All supported versions have timestamps with nanosecond resolution.
-    *          FreeBSD 5+ has also file creation time.
+    * FreeBSD: All supported versions have timestamps with nanosecond resolution
+    *          and have file creation time.
     */
    attr->accessTime     = HgfsConvertTimeSpecToNtTime(&stats->st_atimespec);
    attr->writeTime      = HgfsConvertTimeSpecToNtTime(&stats->st_mtimespec);
@@ -2565,7 +2558,7 @@
        attr->specialPerms, attr->ownerPerms, attr->groupPerms,
        attr->otherPerms, attr->size);
 #ifdef __FreeBSD__
-#   if !defined(VM_X86_64) && !defined(VM_ARM_64) && __FreeBSD_version >= 500043
+#   if !defined(VM_X86_64) && !defined(VM_ARM_64)
 #      define FMTTIMET ""
 #   else
 #      define FMTTIMET "l"
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/asyncsocket.h open-vm-tools-12.2.0/open-vm-tools/lib/include/asyncsocket.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/asyncsocket.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/asyncsocket.h	2023-03-07 23:57:07.000000000 +0100
@@ -101,6 +101,8 @@
 #define ASOCK_ECONNABORTED      WSAECONNABORTED
 #define ASOCK_EPIPE             ERROR_NO_DATA
 #define ASOCK_EHOSTUNREACH      WSAEHOSTUNREACH
+#define ASOCK_ETIMEDOUT         WSAETIMEDOUT
+#define ASOCK_ECONNREFUSED      WSAECONNREFUSED
 #else
 #define ASOCK_ENOTCONN          ENOTCONN
 #define ASOCK_ENOTSOCK          ENOTSOCK
@@ -109,6 +111,8 @@
 #define ASOCK_EWOULDBLOCK       EWOULDBLOCK
 #define ASOCK_ENETUNREACH       ENETUNREACH
 #define ASOCK_ECONNRESET        ECONNRESET
+#define ASOCK_ETIMEDOUT         ETIMEDOUT
+#define ASOCK_ECONNREFUSED      ECONNREFUSED
 #define ASOCK_ECONNABORTED      ECONNABORTED
 #define ASOCK_EPIPE             EPIPE
 #define ASOCK_EHOSTUNREACH      EHOSTUNREACH
@@ -194,6 +198,7 @@
    AsyncSocketConnected,
    AsyncSocketCBCancelled,
    AsyncSocketClosed,
+   AsyncSocketConnectedRdOnly,
 } AsyncSocketState;
 
 
@@ -748,6 +753,11 @@
                                 AsyncSocketCloseFn closeCb);
 
 /*
+ * Close the write side of the connection.
+ */
+int AsyncSocket_CloseWrite(AsyncSocket *asock);
+
+/*
  * Close the connection and destroy the asock.
  */
 int AsyncSocket_Close(AsyncSocket *asock);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/backdoor_def.h open-vm-tools-12.2.0/open-vm-tools/lib/include/backdoor_def.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/backdoor_def.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/backdoor_def.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
+ * Copyright (c) 1998-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -171,6 +171,7 @@
 //#define BDOOR_CMD_FAS_GET_NVDIMM_FMT_CODE  11 /* Not in use. Never shipped. */
 #  define BDOOR_CMD_FAS_SRP_ENABLED          12
 #  define BDOOR_CMD_FAS_EXIT_BOOT_SERVICES   13
+#  define BDOOR_CMD_FAS_GET_API_ENABLES      14
 #define   BDOOR_CMD_SENDPSHAREHINTS          66 /* Not in use. Deprecated. */
 #define   BDOOR_CMD_ENABLE_USB_MOUSE         67
 #define   BDOOR_CMD_GET_VCPU_INFO            68
@@ -283,7 +284,7 @@
  * IMPORTANT NOTE: When modifying the behavior of an existing backdoor command,
  * you must adhere to the semantics expected by the oldest Tools who use that
  * command. Specifically, do not alter the way in which the command modifies
- * the registers. Otherwise backwards compatibility will suffer.
+ * the registers. Otherwise backwards compatibility will be impacted.
  */
 
 /* Nesting control operations */
@@ -308,6 +309,8 @@
 #define BDOOR_SECUREBOOT_STATUS_APPROVED  1
 #define BDOOR_SECUREBOOT_STATUS_DENIED    2
 
+#define BDOOR_FAS_API_ENABLE_FDT          0x00000001UL
+
 /* High-bandwidth backdoor port. */
 
 #define BDOORHB_PORT 0x5659
@@ -441,24 +444,23 @@
  * Several mechanisms are available:
  *
  * o From EL1
- * The vCPU executes the HVC (64-bit code) instruction with the immediate
- * X86_IO_MAGIC. This is the mechanism to favor from EL1 because it is
- * architectural.
+ *   The vCPU executes the HVC instruction with the immediate X86_IO_MAGIC.
+ *
+ *   This is the mechanism to favor from EL1 because it is architectural.
  *
  * o From EL1 and EL0
- * 64-bit code: The vCPU sets X7<63:32> to X86_IO_MAGIC and executes the
- *              MRS XZR, MDCCSR_EL0 instruction.
- * 32-bit code: To be defined...
- * This is the mechanism to favor from EL0 because it has a negligible impact
- * on vCPU performance.
+ *   The vCPU sets X7<63:32> to X86_IO_MAGIC and executes the
+ *   MRS XZR, MDCCSR_EL0 instruction.
+ *
+ *   This is the mechanism to favor from EL0 because it has a negligible impact
+ *   on vCPU performance.
  *
  * o From EL1 and EL0, only when monitor_control.hv_hypercall = "TRUE"
- * The vCPU executes the BRK (64-bit code) or BKPT (32-bit code) instruction
- * with the immediate X86_IO_MAGIC. Note that T32 code requires an 8-bit
- * immediate.
- * Pro: This mechanism cannot be intercepted by EL3 code.
- * Con: This mechanism has a significant impact on vCPU performance when
- *      running a debugger in the guest.
+ *   The vCPU executes the BRK instruction with the immediate X86_IO_MAGIC.
+ *
+ *   Pro: This mechanism cannot be intercepted by EL3 code.
+ *   Con: This mechanism has a significant impact on vCPU performance when
+ *        running a debugger in the guest.
  *
  * 4) Read from general-purpose registers specific to the x86 I/O space
  *    instruction.
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/buildNumber.h open-vm-tools-12.2.0/open-vm-tools/lib/include/buildNumber.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/buildNumber.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/buildNumber.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,12 +1,12 @@
 #define BUILD_NUMBER \
-	"build-20735119"
+	"build-21223074"
 #define BUILD_NUMBER_NUMERIC \
-	20735119
+	21223074
 #define BUILD_NUMBER_NUMERIC_STRING \
-	"20735119"
+	"21223074"
 #define PRODUCT_BUILD_NUMBER \
-	"product-build-39265"
+	"product-build-41219"
 #define PRODUCT_BUILD_NUMBER_NUMERIC \
-	39265
+	41219
 #define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \
-	"39265"
+	"41219"
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/conf.h open-vm-tools-12.2.0/open-vm-tools/lib/include/conf.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/conf.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/conf.h	2023-03-07 23:57:07.000000000 +0100
@@ -276,16 +276,6 @@
 #define CONFNAME_GSUPGRADE_POLLINTERVAL "poll-interval"
 
 /**
- * Define a custom GuestStore periodic Upgrade interval (in seconds).
- *
- * @note Illegal values result in a @c g_warning and fallback to the default
- * upgrade interval.
- *
- * @param int   User-defined upgrade interval.  Set to 0 to disable polling.
- */
-#define CONFNAME_GSUPGRADE_UPGRADEINTERVAL "upgrade-interval"
-
-/**
  * Define a custom GuestStore content path prefix.
  *
  * @note Illegal values result in a @c g_warning and fallback to the default
@@ -761,4 +751,24 @@
  ******************************************************************************
  */
 
+/*
+ ******************************************************************************
+ * BEGIN timeSync plugin goodies.
+ */
+
+/**
+ * Defines the string used for the timeSync config file group.
+ */
+#define CONFGROUPNAME_TIMESYNC "timeSync"
+
+/**
+ * Enable (or disable) the TimeInfo API.
+ */
+#define CONFNAME_TIMESYNC_TIMEINFO_ENABLED "timeInfo.enabled"
+
+/*
+ * END timeSync goodies.
+ ******************************************************************************
+ */
+
 #endif /* __CONF_H__ */
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/config.h open-vm-tools-12.2.0/open-vm-tools/lib/include/config.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/config.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/config.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2018,2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2018,2021-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -117,8 +117,6 @@
 
 Bool Config_FileIsWritable(void);
 
-Bool Config_IsIntegrityProtected(void);
-
 uint32 Config_GetMask(uint32 defaultMask, const char *optionName);
 uint64 Config_GetMask64(uint64 defaultMask, const char *optionName);
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/deployPkg/deployPkgFormat.h open-vm-tools-12.2.0/open-vm-tools/lib/include/deployPkg/deployPkgFormat.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/deployPkg/deployPkgFormat.h	1970-01-01 01:00:00.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/deployPkg/deployPkgFormat.h	2023-03-07 23:57:07.000000000 +0100
@@ -0,0 +1,152 @@
+/*********************************************************
+ * Copyright (C) 2006-2021 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * deployPkgFormat.h --
+ *
+ *      A deployment package format used primarily to
+ *      upload and install software in a guest OS.
+ *
+ *      The package can be a file, or a section embedded inside
+ *      of another file or raw block device.
+ */
+
+#ifndef _DEPLOY_PKG_FORMAT_H_
+#define _DEPLOY_PKG_FORMAT_H_
+
+#define VMWAREDEPLOYPKG_SIGNATURE_LENGTH 16
+#define VMWAREDEPLOYPKG_SIGNATURE "VMWAREDEPLOYPKG_"
+
+#define VMWAREDEPLOYPKG_CMD_LENGTH 456
+#define VMWAREDEPLOYPKG_SEED_LENGTH 8
+
+#define VMWAREDEPLOYPKG_PAYLOAD_TYPE_CAB 0         // cabinet file
+#define VMWAREDEPLOYPKG_PAYLOAD_TYPE_ZIP 1         // zip
+#define VMWAREDEPLOYPKG_PAYLOAD_TYPE_GZIPPED_TAR 2 // tar.gz
+
+// XXX Delete this - it's redundant
+typedef enum {
+   Cabinet,                // cabinet file
+   Zip,
+   GzippedTar              // tar.gz
+} VMwareDeployPkgPayloadType;
+
+#define VMWAREDEPLOYPKG_CURRENT_MAJOR_VERSION 1
+#define VMWAREDEPLOYPKG_CURRENT_MINOR_VERSION 0
+
+#include "vm_basic_types.h"
+
+#define VMWAREDEPLOYPKG_HEADER_FLAGS_NONE 0
+#define VMWAREDEPLOYPKG_HEADER_FLAGS_SKIP_REBOOT 1
+#define VMWAREDEPLOYPKG_HEADER_FLAGS_IGNORE_CLOUD_INIT 2
+#define VMWAREDEPLOYPKG_HEADER_FLAGS_RAW_CLOUD_INIT 4
+
+#ifdef _WIN32
+#include "pshpack4.h" // 4 byte alignment assumed.
+#endif
+
+/*
+ * VMware deployment package header. 4 byte alignment assumed.
+ * The header size is exactly 512 bytes to make it easier to
+ * embed in a disk device, such as a partition.
+ *
+ * The payload is extracted and expanded into a temporary folder.
+ * During expansion, original relative path names are preserved.
+ * The specified command is then executed on the host.
+ * Its working directory is the extraction folder.
+ * The command string may contain OS-specific environment
+ * variables.
+ * In addition, the variable VMWAREPKGDIR is defined to be
+ * the location of the extraction folder.
+ *
+ * (Request for comment: is VMWAREPKGDIR really necessary?
+ *  Remove from spec if not.)
+ *
+ * The field seed is used by the password obfuscation library to hide details
+ * that are required for obfuscating password in the config file.
+ *
+ * Command string example:
+ * deploy.bat -opt1 myfile.exe foo.xml "%WINDIR%\system32"
+ *
+ * Seed is a piece of information used by the obfuscation code to compute
+ * cryptography keys.
+ *
+ * The extraction folder is deleted after the command returns.
+ * A return value of zero indicates successful deployment.
+ *
+ * Here is the approximate layout. Do not make assumptions about the 
+ * exact location and relative position of the individual sections.
+ * Use the offset and length fields from the header instead.
+ *
+ * <pre>
+ *
+ *         +-------------------------+
+ *         |         header          |
+ *         +-------------------------+
+ *         |         padding         |
+ *         +-------------------------+
+ *         |        payload          |
+ *         +-------------------------+
+ *         |      (seed+command)     |
+ *         |         padding         |
+ *         +-------------------------+
+ * </pre>
+ */
+
+#pragma pack(push, 1)
+typedef struct {
+   char signature[VMWAREDEPLOYPKG_SIGNATURE_LENGTH]; // Not null terminated.
+   uint8 majorVersion;
+   uint8 minorVersion;
+   uint8 payloadType;
+   uint8 reserved;
+
+   uint16 pkgProcessTimeout; // timeout value for process execution in deployPkg
+
+   /*
+    * Structs are aligned to word length. For 32 bit architecture it is 4 bytes
+    * aligned and for 64 bit it is 8 bytes aligned. Need to make sure package
+    * created in 32 bit architecture can be read correctly in 64 bit architecture
+    * and vice-versa. So when adding or removing fields, a padding field maybe
+    * needed to enable the payload section to start at the same place in both 32
+    * and 64 bit architecture.
+    */
+   uint16 archPadding;   // offset 22
+
+   uint64 pkgLength;     // Total length of package including header, offset 24.
+   uint64 payloadOffset; // Relative to beginning of header, offset 32.
+   uint64 payloadLength; // Length of payload, offset 40.
+
+   /*
+    * Command string and padding, null terminated.
+    * This padding makes the header sector-aligned, making it easier
+    * to embed in disks and disk partitions.
+    * This string may contain OS-specific env variables, e.g. %SYSTEMDRIVE%.
+    */
+
+   char seed[VMWAREDEPLOYPKG_SEED_LENGTH];   // offset 48
+   char command[VMWAREDEPLOYPKG_CMD_LENGTH]; // offset 56
+
+} VMwareDeployPkgHdr;
+#pragma pack(pop)
+
+#ifdef _WIN32
+#include "poppack.h"
+#endif
+
+#endif // _DEPLOY_PKG_FORMAT_H_
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/fileIO.h open-vm-tools-12.2.0/open-vm-tools/lib/include/fileIO.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/fileIO.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/fileIO.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2018,2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2018, 2021-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -208,7 +208,7 @@
 /*
  * OPTIMISTIC is an alternative to EXCLUSIVE and MANDATORY. It applies
  * only on ESX, and gives VMkernel permission to use a type of lock
- * called "optimistic" to speed up opens. Rule-of-thumb is to use it
+ * called "optimistic" to speed up opens.  A general guideline is to use it
  * only for read-only opens of small files (< 1KB).
  */
 #define FILEIO_OPEN_OPTIMISTIC_LOCK      (1 << 22)  // 0x00400000
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/hostinfo.h open-vm-tools-12.2.0/open-vm-tools/lib/include/hostinfo.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/hostinfo.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/hostinfo.h	2023-03-07 23:57:07.000000000 +0100
@@ -163,7 +163,6 @@
 
 Bool Hostinfo_NestingSupported(void);
 Bool Hostinfo_VCPUInfoBackdoor(unsigned bit);
-Bool Hostinfo_SynchronizedVTSCs(void);
 Bool Hostinfo_TouchBackDoor(void);
 Bool Hostinfo_TouchVirtualPC(void);
 Bool Hostinfo_TouchXen(void);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/log.h open-vm-tools-12.2.0/open-vm-tools/lib/include/log.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/log.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/log.h	2023-03-07 23:57:07.000000000 +0100
@@ -443,14 +443,20 @@
                    int32 level);
 
 /*
- * Structure contains all the pointers to where value can be updated
+ * Structure contains all the pointers to where value can be updated.
  * Making VmxStats as a struct has its own advantage, such as updating
  * 'droppedChars' from the struct instead within LogFile.
  */
+
+struct VmxStatMinMax64;
+
 typedef struct {
-   uint64 *numTimesDrop; // total time char dropped
-   uint64 *droppedChars; // Number of drop char
-   uint64 *bytesLogged;  // Total logged
+   uint64          *logMsgsDropped;    // Number of dropped messages
+   uint64          *logBytesDropped;   // Number of drop bytes
+   uint64          *logBytesLogged;    // Bytes logged
+
+   struct VmxStatMinMax64 *logWriteMinMaxTime; // Min/max write time in US
+   uint64          *logWriteAvgTime;   // Average time to write in US
 } VmxStatsInfo;
 
 Bool
@@ -600,9 +606,6 @@
 void
 Log_DisableThrottling(void);
 
-void
-Log_DisableVmxStats(void);
-
 uint32
 Log_MaxLineLength(void);
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/loglevel_userVars.h open-vm-tools-12.2.0/open-vm-tools/lib/include/loglevel_userVars.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/loglevel_userVars.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/loglevel_userVars.h	2023-03-07 23:57:07.000000000 +0100
@@ -27,6 +27,7 @@
 /* KEEP IN SORTED ORDER! */
 
 #define LOGLEVEL_USER(LOGLEVEL_VAR) \
+   LOGLEVEL_VAR(9pfs), \
    LOGLEVEL_VAR(acpi), \
    LOGLEVEL_VAR(acpiGPE), \
    LOGLEVEL_VAR(ahci), \
@@ -286,6 +287,7 @@
    LOGLEVEL_VAR(vdpPlugin), \
    LOGLEVEL_VAR(vdtiPciCfgSpc), \
    LOGLEVEL_VAR(vflash), \
+   LOGLEVEL_VAR(vg), \
    LOGLEVEL_VAR(vga), \
    LOGLEVEL_VAR(vide), \
    LOGLEVEL_VAR(viewClient), \
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/panic.h open-vm-tools-12.2.0/open-vm-tools/lib/include/panic.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/panic.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/panic.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2003-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2003-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -108,7 +108,6 @@
 
 void Panic_SetCoreDumpOnPanic(Bool dumpCore);
 Bool Panic_GetCoreDumpOnPanic(void);
-void Panic_SetCoreDumpFileName(const char *fileName);
 int  Panic_GetCoreDumpFlags(void);
 void Panic_SetCoreDumpFlags(int flags);
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/sha1.h open-vm-tools-12.2.0/open-vm-tools/lib/include/sha1.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/sha1.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/sha1.h	2023-03-07 23:57:07.000000000 +0100
@@ -41,7 +41,6 @@
 
 #define INCLUDE_ALLOW_MODULE
 #define INCLUDE_ALLOW_USERLEVEL
-#define INCLUDE_ALLOW_VMKERNEL
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
@@ -70,8 +69,6 @@
 
 #else
 
-#ifndef VMKERNEL
-
 /*
  * Prevent linkage conflicts with the SHA1 APIs brought in from
  * OpenSSL. (Pro tip: If you're doing anything security-related, you
@@ -83,8 +80,6 @@
 #define SHA1Update           VMW_SHA1Update
 #define SHA1Final            VMW_SHA1Final
 
-#endif /* !VMKERNEL */
-
 /*
 SHA-1 in C
 By Steve Reid <steve@edmweb.com>
@@ -112,25 +107,14 @@
     unsigned char buffer[64];
 } SHA1_CTX;
 
-#if defined VMKBOOT || defined VMKERNEL
-/* New SHA1 uses are not allowed. Old uses are going away. SHA1 isn't secure. */
-void SHA1Init_Legacy(SHA1_CTX* context);
-void SHA1Update_Legacy(SHA1_CTX* context,
-                       const unsigned char *data,
-                       size_t len);
-void SHA1Final_Legacy(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context);
-#else
 void SHA1Init(SHA1_CTX* context);
 void SHA1Update(SHA1_CTX* context,
                 const unsigned char *data,
                 size_t len);
 void SHA1Final(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context);
-#endif
 
 #endif // defined __APPLE__ && defined USERLEVEL
 
-#if !defined VMKBOOT && !defined VMKERNEL
-
 /* Opaque handle */
 typedef union {
 #if defined __APPLE__
@@ -150,7 +134,6 @@
                           unsigned char digest[SHA1_HASH_LEN]);
 void CryptoHash_ComputeSHA1(const void *data, size_t len,
                             unsigned char digest[SHA1_HASH_LEN]);
-#endif
 
 #if defined(__cplusplus)
 }  // extern "C"
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/str.h open-vm-tools-12.2.0/open-vm-tools/lib/include/str.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/str.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/str.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2020,2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -218,6 +218,7 @@
 
 #define Str_Strcmp(s1, s2) strcmp(s1, s2)
 #define Str_Strncmp(s1, s2, n) strncmp(s1, s2, n)
+#define Str_Strequal(s1,s2) (0 == (Str_Strcmp(s1, s2)))
 
 #define Str_Strchr(s, c) strchr(s, c)
 #define Str_Strrchr(s, c) strrchr(s, c)
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_atomic_arm64_begin.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_atomic_arm64_begin.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_atomic_arm64_begin.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_atomic_arm64_begin.h	2023-03-07 23:57:07.000000000 +0100
@@ -31,10 +31,7 @@
 #include "vm_basic_asm_arm64.h"
 
 /*
- * Today these are defines, but long-term these will be patchable globals
- * for ESXi kernel-mode code (and something similar for ESXi userspace code).
- *
- * Atomic_HaveLSE should be set to 1 for CPUs that have the LSE extenstion
+ * Atomic_LsePresent should be set to 1 for CPUs that have the LSE extenstion
  * and where the atomic instructions are known to have a performance benefit.
  * Seemingly, on some low-end chips (CA55) there may not be a benefit.
  *
@@ -47,12 +44,73 @@
  * though, remains the safest option. Atomic_PreferCasForOps controls this.
  */
 
-#ifdef VMK_ARM_LSE
-#define Atomic_HaveLSE               1
+/*
+ * The silliness with _VMATOM_HAVE_LSE_DEFINED is necessary because this
+ * could be included multiple times (via vm_atomic and vm_atomic_relaxed).
+ */
+#ifndef _VMATOM_HAVE_LSE_DEFINED
+typedef struct  {
+   Bool LsePresent;
+#ifndef VMKERNEL
+   Bool ProbedForLse;
+#endif
+   Bool PreferCasForOps;
+} Atomic_ConfigParams;
+
+#if defined(VMX86_SERVER) || defined(VMKBOOT)
+/*
+ * When building UW code for ESXi, Atomic_Config a weak symbol.
+ * When building for kernel mode, Atomic_Config is exported by
+ * bora/vmkernel/lib/arm64/atomic.c
+ */
+#ifndef VMKERNEL
+#pragma weak Atomic_Config
+Atomic_ConfigParams Atomic_Config;
 #else
-#define Atomic_HaveLSE               0
+extern Atomic_ConfigParams Atomic_Config;
+#endif
+
+static INLINE Bool
+Atomic_HaveLse(void)
+{
+#ifndef VMKERNEL
+   /*
+    * Can't just include sys/auxv.h, unfortunately.
+    */
+   extern uint64 getauxval(uint64 type);
+#define _VMATOM_AT_ESXI_HWCAP                    2000
+#define _VMATOM_AT_ESXI_HWCAP_HAVE_LSE           (1 << 0)
+#define _VMATOM_AT_ESXI_HWCAP_PREFER_CAS_FOR_OPS (1 << 1)
+
+   if (!Atomic_Config.ProbedForLse) {
+      uint64 cap = getauxval(_VMATOM_AT_ESXI_HWCAP);
+      Atomic_Config.LsePresent = (cap &_VMATOM_AT_ESXI_HWCAP_HAVE_LSE) != 0;
+      Atomic_Config.PreferCasForOps = Atomic_Config.LsePresent &&
+         (cap & _VMATOM_AT_ESXI_HWCAP_PREFER_CAS_FOR_OPS) != 0;
+      SMP_W_BARRIER_W();
+      Atomic_Config.ProbedForLse = TRUE;
+   }
+#undef _VMATOM_AT_ESXI_HWCAP
+#undef _VMATOM_AT_ESXI_HWCAP_HAVE_LSE
+#undef _VMATOM_AT_ESXI_HWCAP_PREFER_CAS_FOR_OPS
+#endif
+
+   return Atomic_Config.LsePresent;
+}
+
+static INLINE Bool
+Atomic_PreferCasForOps(void) {
+   return Atomic_Config.PreferCasForOps;
+}
+#else /* !VMX86_SERVER && !VMKBOOT */
+/*
+ * Not building for ESXi? Assume no LSE.
+ */
+#define Atomic_PreferCasForOps() FALSE
+#define Atomic_HaveLse()         FALSE
 #endif
-#define Atomic_PreferCasForOps       1
+#define _VMATOM_HAVE_LSE_DEFINED
+#endif /* _VMATOM_HAVE_LSE_DEFINED */
 
 #define _VMATOM_LSE_HAVE(x)  _VMATOM_LSE_HAVE_##x
 #define _VMATOM_LSE_HAVE_add 1
@@ -61,8 +119,7 @@
 #define _VMATOM_LSE_HAVE_orr 0
 #define _VMATOM_LSE_HAVE_and 0
 
-#define Atomic_PreferLSE(op) (Atomic_HaveLSE && \
-   (_VMATOM_LSE_HAVE(op) || Atomic_PreferCasForOps))
+#define _VMATOM_PREFER_LSE(op) ((_VMATOM_LSE_HAVE(op) && Atomic_HaveLse()) || Atomic_PreferCasForOps())
 
 /*                      bit size, instruction suffix, register prefix, extend suffix */
 #define _VMATOM_SIZE_8         8,                  b,               w,             b
@@ -158,7 +215,7 @@
    uint##bs _newval;                                                          \
                                                                               \
    _VMATOM_FENCE(fenced);                                                     \
-   if (Atomic_PreferLSE(op)) {                                                \
+   if (_VMATOM_PREFER_LSE(op)) {                                              \
       if (_VMATOM_LSE_HAVE(op)) {                                             \
          __asm__ __volatile__(                                                \
             ".arch armv8.2-a                                             \n\t"\
@@ -207,7 +264,7 @@
    uint##bs _oldval;                                                          \
                                                                               \
    _VMATOM_FENCE(fenced);                                                     \
-   if (Atomic_PreferLSE(op)) {                                                \
+   if (_VMATOM_PREFER_LSE(op)) {                                              \
       if (_VMATOM_LSE_HAVE(op)) {                                             \
          __asm__ __volatile__(                                                \
             ".arch armv8.2-a                                             \n\t"\
@@ -258,7 +315,7 @@
    uint##bs _oldval;                                                          \
                                                                               \
    _VMATOM_FENCE(fenced);                                                     \
-   if (Atomic_HaveLSE) {                                                      \
+   if (Atomic_HaveLse()) {                                                    \
       __asm__ __volatile__(                                                   \
          ".arch armv8.2-a                                                \n\t"\
          "swp"#is" %"#rp"2, %"#rp"0, %1                                  \n\t"\
@@ -288,7 +345,7 @@
    uint##bs _oldval;                                                          \
                                                                               \
    _VMATOM_FENCE(fenced);                                                     \
-   if (Atomic_HaveLSE) {                                                      \
+   if (Atomic_HaveLse()) {                                                    \
       __asm__ __volatile__(                                                   \
          ".arch armv8.2-a                                                \n\t"\
          "cas"#is" %"#rp"0, %"#rp"2, %1                                  \n\t"\
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_atomic_arm64_end.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_atomic_arm64_end.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_atomic_arm64_end.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_atomic_arm64_end.h	2023-03-07 23:57:07.000000000 +0100
@@ -50,3 +50,6 @@
 #undef _VMATOM_SNIPPET_ROP
 #undef _VMATOM_SNIPPET_RW
 #undef _VMATOM_SNIPPET_RIFEQW
+#undef _VMATOM_PREFER_LSE
+#undef _VMATOM_AT_HWCAP_LSE
+#undef _VMATOM_AT_HWCAP
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_atomic.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_atomic.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_atomic.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_atomic.h	2023-03-07 23:57:07.000000000 +0100
@@ -142,8 +142,7 @@
    volatile uint64 value;
 } Atomic_uint64;
 
-#if defined __GNUC__ && defined VM_64BIT && \
-     (defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 || defined VM_ARM_64)
+#ifdef VM_HAS_INT128
 typedef ALIGNED(16) struct Atomic_uint128 {
    volatile uint128 value;
 } Atomic_uint128;
@@ -201,10 +200,8 @@
  * registers.
  */
 
-#if defined __GNUC__ && defined VM_ARM_32
 /* Force the link step to fail for unimplemented functions. */
 extern int AtomicUndefined(void const *);
-#endif
 
 
 /*
@@ -212,30 +209,31 @@
  *
  * Atomic_ReadIfEqualWrite128 --
  *
- *      Compare and exchange a 16 byte tuple.
+ *      Compare exchange: Read variable, if equal to oldVal, write newVal
  *
  * Results:
- *      old value
+ *      The value that was compared against oldVal.
  *
  * Side effects:
- *      None
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
-#if defined __GNUC__ && defined VM_64BIT && \
-     (defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 || defined VM_ARM_64)
+
+#ifdef VM_HAS_INT128
 static INLINE uint128
 Atomic_ReadIfEqualWrite128(Atomic_uint128 *ptr,   // IN/OUT
                            uint128        oldVal, // IN
                            uint128        newVal) // IN
 {
-#if defined VM_ARM_64
+#if defined __GNUC__ && defined VM_ARM_64
+#define VM_HAS_ATOMIC_READIFEQUALWRITE128 // This function can be used.
    /*
     * Don't use __sync_val_compare_and_swap, as this cannot magically
     * use the right (LL/SC vs LSE) atomics without -moutline-atomics.
     */
 #if __GNUC__ >= 9
-   if (Atomic_HaveLSE) {
+   if (Atomic_HaveLse()) {
       SMP_RW_BARRIER_RW();
       __asm__ __volatile__(
          ".arch armv8.2-a            \n\t"
@@ -280,8 +278,11 @@
       SMP_RW_BARRIER_RW();
       return res.raw;
    }
-#elif __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+#elif defined __GNUC__ && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+#define VM_HAS_ATOMIC_READIFEQUALWRITE128 // This function can be used.
    return __sync_val_compare_and_swap(&ptr->value, oldVal, newVal);
+#else
+   return AtomicUndefined(ptr + oldVal + newVal);
 #endif
 }
 #endif
@@ -321,7 +322,7 @@
 #elif defined _MSC_VER
    val = var->value;
 #else
-#error No compiler defined for Atomic_Read8
+#error Atomic_Read8 not implemented
 #endif
 
    return val;
@@ -362,9 +363,10 @@
    );
    return val;
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (volatile char) == sizeof var->value);
    return _InterlockedExchange8((volatile char *)&var->value, val);
 #else
-#error No compiler defined for Atomic_ReadWrite8
+#error Atomic_ReadWrite8 not implemented
 #endif
 }
 
@@ -402,7 +404,7 @@
 #elif defined _MSC_VER
    var->value = val;
 #else
-#error No compiler defined for Atomic_Write8
+#error Atomic_Write8 not implemented
 #endif
 }
 
@@ -415,10 +417,10 @@
  *      Compare exchange: Read variable, if equal to oldVal, write newVal.
  *
  * Results:
- *      The value of the atomic variable before the write.
+ *      The value that was compared against oldVal.
  *
  * Side effects:
- *      The variable may be modified.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -446,10 +448,11 @@
 
    return val;
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (volatile char) == sizeof var->value);
    return _InterlockedCompareExchange8((volatile char *)&var->value,
                                        newVal, oldVal);
 #else
-#error No compiler defined for Atomic_ReadIfEqualWrite8
+#error Atomic_ReadIfEqualWrite8 not implemented
 #endif
 }
 
@@ -878,7 +881,7 @@
 
    value = var->value;
 #else
-#error No compiler defined for Atomic_Read
+#error Atomic_Read32 not implemented
 #endif
 
    return value;
@@ -940,9 +943,10 @@
    return val;
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    return _InterlockedExchange((long *)&var->value, (long)val);
 #else
-#error No compiler defined for Atomic_ReadWrite
+#error Atomic_ReadWrite32 not implemented
 #endif // __GNUC__
 }
 #define Atomic_ReadWrite Atomic_ReadWrite32
@@ -1024,7 +1028,7 @@
 
    var->value = val;
 #else
-#error No compiler defined for Atomic_Write
+#error Atomic_Write32 not implemented
 #endif
 }
 #define Atomic_Write Atomic_Write32
@@ -1038,10 +1042,10 @@
  *      Compare exchange: Read variable, if equal to oldVal, write newVal
  *
  * Results:
- *      The value of the atomic variable before the write.
+ *      The value that was compared against oldVal.
  *
  * Side effects:
- *      The variable may be modified.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -1090,11 +1094,12 @@
    return val;
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    return _InterlockedCompareExchange((long *)&var->value,
                                       (long)newVal,
                                       (long)oldVal);
 #else
-#error No compiler defined for Atomic_ReadIfEqualWrite
+#error Atomic_ReadIfEqualWrite32 not implemented
 #endif
 }
 #define Atomic_ReadIfEqualWrite Atomic_ReadIfEqualWrite32
@@ -1109,10 +1114,10 @@
  *      Compare exchange: Read variable, if equal to oldVal, write newVal
  *
  * Results:
- *      The value of the atomic variable before the write.
+ *      The value that was compared against oldVal.
  *
  * Side effects:
- *      The variable may be modified.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -1182,11 +1187,12 @@
    return val;
 #endif //VM_ARM_V7
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    return _InterlockedCompareExchange64((__int64 *)&var->value,
                                         (__int64)newVal,
                                         (__int64)oldVal);
 #else
-#error No compiler defined for Atomic_ReadIfEqualWrite64
+#error Atomic_ReadIfEqualWrite64 not implemented
 #endif
 }
 #endif
@@ -1243,9 +1249,10 @@
    );
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedAnd((long *)&var->value, (long)val);
 #else
-#error No compiler defined for Atomic_And
+#error Atomic_And32 not implemented
 #endif
 }
 #define Atomic_And Atomic_And32
@@ -1302,9 +1309,10 @@
    );
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedOr((long *)&var->value, (long)val);
 #else
-#error No compiler defined for Atomic_Or
+#error Atomic_Or32 not implemented
 #endif
 }
 #define Atomic_Or Atomic_Or32
@@ -1361,9 +1369,10 @@
    );
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedXor((long *)&var->value, (long)val);
 #else
-#error No compiler defined for Atomic_Xor
+#error Atomic_Xor32 not implemented
 #endif
 }
 #define Atomic_Xor Atomic_Xor32
@@ -1403,9 +1412,10 @@
    );
 #endif
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedXor64((__int64 *)&var->value, (__int64)val);
 #else
-#error No compiler defined for Atomic_Xor64
+#error Atomic_Xor64 not implemented
 #endif
 }
 #endif
@@ -1462,9 +1472,10 @@
    );
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedExchangeAdd((long *)&var->value, (long)val);
 #else
-#error No compiler defined for Atomic_Add
+#error Atomic_Add32 not implemented
 #endif
 }
 #define Atomic_Add Atomic_Add32
@@ -1534,10 +1545,11 @@
     */
 #   pragma warning(push)
 #   pragma warning(disable: 4146)
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedExchangeAdd((long *)&var->value, (long)-val);
 #   pragma warning(pop)
 #else
-#error No compiler defined for Atomic_Sub
+#error Atomic_Sub32 not implemented
 #endif
 }
 #define Atomic_Sub Atomic_Sub32
@@ -1575,9 +1587,10 @@
    );
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedIncrement((long *)&var->value);
 #else
-#error No compiler defined for Atomic_Inc
+#error Atomic_Inc32 not implemented
 #endif
 }
 #define Atomic_Inc Atomic_Inc32
@@ -1615,9 +1628,10 @@
    );
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    _InterlockedDecrement((long *)&var->value);
 #else
-#error No compiler defined for Atomic_Dec
+#error Atomic_Dec32 not implemented
 #endif
 }
 #define Atomic_Dec Atomic_Dec32
@@ -1827,9 +1841,10 @@
    return val;
 #endif /* VM_X86_ANY */
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (long) == sizeof var->value);
    return _InterlockedExchangeAdd((long *)&var->value, (long)val);
 #else
-#error No compiler defined for Atomic_ReadAdd32
+#error Atomic_ReadAdd32 not implemented
 #endif
 }
 
@@ -1995,11 +2010,12 @@
    return equal;
 #endif //VM_ARM_V7
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    return (__int64)oldVal == _InterlockedCompareExchange64((__int64 *)&var->value,
                                                            (__int64)newVal,
                                                            (__int64)oldVal);
 #else
-#error No compiler defined for Atomic_CMPXCHG64
+#error Atomic_CMPXCHG64 not implemented
 #endif // !GNUC
 }
 
@@ -2115,9 +2131,11 @@
    return var->value;
 #elif defined _MSC_VER && defined VM_ARM_32
    /* MSVC + 32-bit ARM has add64 but no cmpxchg64 */
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    return _InterlockedAdd64((__int64 *)&var->value, 0);
 #elif defined _MSC_VER && defined __i386__
    /* MSVC + 32-bit x86 has cmpxchg64 but no add64 */
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    return _InterlockedCompareExchange64((__int64 *)&var->value,
                                         (__int64)255,  // Unlikely value to
                                         (__int64)255); // not dirty cache
@@ -2201,9 +2219,10 @@
    );
    return val;
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    return _InterlockedExchangeAdd64((__int64 *)&var->value, (__int64)val);
 #else
-#error No compiler defined for Atomic_ReadAdd64
+#error Atomic_ReadAdd64 not implemented
 #endif
 
 #else
@@ -2347,9 +2366,10 @@
    );
 #endif
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedExchangeAdd64((__int64 *)&var->value, (__int64)val);
 #else
-#error No compiler defined for Atomic_Add64
+#error Atomic_Add64 not implemented
 #endif
 }
 
@@ -2389,9 +2409,10 @@
    );
 #endif
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedExchangeAdd64((__int64 *)&var->value, (__int64)-val);
 #else
-#error No compiler defined for Atomic_Sub64
+#error Atomic_Sub64 not implemented
 #endif
 }
 
@@ -2428,9 +2449,10 @@
       : "cc", "memory"
    );
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedIncrement64((__int64 *)&var->value);
 #else
-#error No compiler defined for Atomic_Inc64
+#error Atomic_Inc64 not implemented
 #endif
 }
 
@@ -2467,9 +2489,10 @@
       : "cc", "memory"
    );
 #elif defined _MSC_VER
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedDecrement64((__int64 *)&var->value);
 #else
-#error No compiler defined for Atomic_Dec64
+#error Atomic_Dec64 not implemented
 #endif
 }
 
@@ -2507,6 +2530,7 @@
 #elif defined __GNUC__ && defined VM_ARM_64
    return _VMATOM_X(RW, 64, TRUE, &var->value, val);
 #elif defined _MSC_VER && defined VM_64BIT
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    return _InterlockedExchange64((__int64 *)&var->value, (__int64)val);
 #else
    uint64 oldVal;
@@ -2606,6 +2630,7 @@
 #elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 64, TRUE, &var->value, orr, val);
 #elif defined _MSC_VER && defined VM_64BIT
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedOr64((__int64 *)&var->value, (__int64)val);
 #else
    uint64 oldVal;
@@ -2649,6 +2674,7 @@
 #elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 64, TRUE, &var->value, and, val);
 #elif defined _MSC_VER && defined VM_64BIT
+   ASSERT_ON_COMPILE(sizeof (__int64) == sizeof var->value);
    _InterlockedAnd64((__int64 *)&var->value, (__int64)val);
 #else
    uint64 oldVal;
@@ -2822,7 +2848,6 @@
 }
 
 
-#if defined __GNUC__
 /*
  *-----------------------------------------------------------------------------
  *
@@ -2844,19 +2869,18 @@
 {
    uint16 value;
 
-#if defined VMM || defined VM_ARM_64 || defined VMKERNEL || defined VMKERNEL_MODULE
+#if defined VMM || defined VM_ARM_64 || defined VMKERNEL || \
+    defined VMKERNEL_MODULE
    ASSERT((uintptr_t)var % 2 == 0);
 #endif
 
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
-
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "movw %1, %0"
       : "=r" (value)
       : "m" (var->value)
    );
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    NOT_TESTED();
 
    __asm__ __volatile__(
@@ -2864,11 +2888,10 @@
       : "=r" (value)
       : "r" (&var->value)
    );
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    value = _VMATOM_X(R, 16, &var->value);
 #else
-#error No 16-bits atomics.
-#endif
+   value = (uint16)AtomicUndefined(var);
 #endif
 
    return value;
@@ -2895,8 +2918,7 @@
 Atomic_ReadWrite16(Atomic_uint16 *var,  // IN/OUT:
                    uint16 val)          // IN:
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "xchgw %0, %1"
       : "=r" (val),
@@ -2905,7 +2927,7 @@
       : "memory"
    );
    return val;
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 retVal;
    uint16 res;
 
@@ -2926,11 +2948,10 @@
    dmb();
 
    return retVal;
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    return _VMATOM_X(RW, 16, TRUE, &var->value, val);
 #else
-#error No 16-bits atomics.
-#endif
+   return (uint16)AtomicUndefined(var + val);
 #endif
 }
 
@@ -2955,18 +2976,18 @@
 Atomic_Write16(Atomic_uint16 *var,  // OUT:
                uint16 val)          // IN:
 {
-#if defined VMM || defined VM_ARM_64 || defined VMKERNEL || defined VMKERNEL_MODULE
+#if defined VMM || defined VM_ARM_64 || defined VMKERNEL || \
+    defined VMKERNEL_MODULE
    ASSERT((uintptr_t)var % 2 == 0);
 #endif
 
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "movw %1, %0"
       : "=m" (var->value)
       : "r" (val)
    );
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(W, 16, &var->value, val);
 #elif defined VM_ARM_32
    /*
@@ -2975,8 +2996,7 @@
     */
    Atomic_ReadWrite16(var, val);
 #else
-#error No 16-bits atomics.
-#endif
+   AtomicUndefined(var + val);
 #endif
 }
 
@@ -2989,10 +3009,10 @@
  *      Compare exchange: Read variable, if equal to oldVal, write newVal
  *
  * Results:
- *      The value of the atomic variable before the write.
+ *      The value that was compared against oldVal.
  *
  * Side effects:
- *      The variable may be modified.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -3002,8 +3022,7 @@
                           uint16 oldVal,        // IN
                           uint16 newVal)        // IN
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    uint16 val;
 
    __asm__ __volatile__(
@@ -3015,7 +3034,7 @@
       : "cc", "memory"
    );
    return val;
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 retVal;
    uint16 res;
 
@@ -3038,12 +3057,45 @@
    dmb();
 
    return retVal;
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    return _VMATOM_X(RIFEQW, 16, TRUE, &var->value, oldVal, newVal);
 #else
-#error No 16-bits atomics.
+   return (uint16)AtomicUndefined(var + oldVal + newVal);
 #endif
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Atomic_ReadAnd16 --
+ *
+ *      Atomic read (returned), bitwise AND with a value, write.
+ *
+ * Results:
+ *      The value of the variable before the operation.
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE uint16
+Atomic_ReadAnd16(Atomic_uint16 *var, // IN/OUT
+                 uint16 val)         // IN
+{
+   uint16 res;
+
+#if defined __GNUC__ && defined VM_ARM_64
+   res = _VMATOM_X(ROP, 16, TRUE, &var->value, and, val);
+#else
+   do {
+      res = Atomic_Read16(var);
+   } while (res != Atomic_ReadIfEqualWrite16(var, res, res & val));
 #endif
+
+   return res;
 }
 
 
@@ -3067,15 +3119,14 @@
 Atomic_And16(Atomic_uint16 *var, // IN/OUT
              uint16 val)         // IN
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; andw %1, %0"
       : "+m" (var->value)
       : "re" (val)
       : "cc", "memory"
    );
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 res;
    uint16 tmp;
 
@@ -3095,11 +3146,10 @@
    );
 
    dmb();
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 16, TRUE, &var->value, and, val);
 #else
-#error No 16-bits atomics.
-#endif
+   AtomicUndefined(var + val);
 #endif
 }
 
@@ -3124,15 +3174,14 @@
 Atomic_Or16(Atomic_uint16 *var, // IN/OUT
             uint16 val)         // IN
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; orw %1, %0"
       : "+m" (var->value)
       : "re" (val)
       : "cc", "memory"
    );
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 res;
    uint16 tmp;
 
@@ -3152,11 +3201,10 @@
    );
 
    dmb();
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 16, TRUE, &var->value, orr, val);
 #else
-#error No 16-bits atomics.
-#endif
+   AtomicUndefined(var + val);
 #endif
 }
 
@@ -3181,15 +3229,14 @@
 Atomic_Xor16(Atomic_uint16 *var, // IN/OUT
              uint16 val)         // IN
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; xorw %1, %0"
       : "+m" (var->value)
       : "re" (val)
       : "cc", "memory"
    );
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 res;
    uint16 tmp;
 
@@ -3209,11 +3256,10 @@
    );
 
    dmb();
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 16, TRUE, &var->value, eor, val);
 #else
-#error No 16-bits atomics.
-#endif
+   AtomicUndefined(var + val);
 #endif
 }
 
@@ -3238,15 +3284,14 @@
 Atomic_Add16(Atomic_uint16 *var, // IN/OUT
              uint16 val)         // IN
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; addw %1, %0"
       : "+m" (var->value)
       : "re" (val)
       : "cc", "memory"
    );
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 res;
    uint16 tmp;
 
@@ -3266,11 +3311,10 @@
    );
 
    dmb();
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 16, TRUE, &var->value, add, val);
 #else
-#error No 16-bits atomics.
-#endif
+   AtomicUndefined(var + val);
 #endif
 }
 
@@ -3295,15 +3339,14 @@
 Atomic_Sub16(Atomic_uint16 *var, // IN/OUT
              uint16 val)         // IN
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; subw %1, %0"
       : "+m" (var->value)
       : "re" (val)
       : "cc", "memory"
    );
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 res;
    uint16 tmp;
 
@@ -3323,11 +3366,10 @@
    );
 
    dmb();
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    _VMATOM_X(OP, 16, TRUE, &var->value, sub, val);
 #else
-#error No 16-bits atomics.
-#endif
+   AtomicUndefined(var + val);
 #endif
 }
 
@@ -3351,19 +3393,15 @@
 static INLINE void
 Atomic_Inc16(Atomic_uint16 *var) // IN/OUT
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; incw %0"
       : "+m" (var->value)
       :
       : "cc", "memory"
    );
-#elif defined VM_ARM_ANY
-   Atomic_Add16(var, 1);
 #else
-#error No 16-bits atomics.
-#endif
+   Atomic_Add16(var, 1);
 #endif
 }
 
@@ -3387,19 +3425,15 @@
 static INLINE void
 Atomic_Dec16(Atomic_uint16 *var) // IN/OUT
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; decw %0"
       : "+m" (var->value)
       :
       : "cc", "memory"
    );
-#elif defined VM_ARM_ANY
-   Atomic_Sub16(var, 1);
 #else
-#error No 16-bits atomics.
-#endif
+   Atomic_Sub16(var, 1);
 #endif
 }
 
@@ -3426,7 +3460,7 @@
 {
    uint16 res;
 
-#if defined VM_ARM_64
+#if defined __GNUC__ && defined VM_ARM_64
    res = _VMATOM_X(ROP, 16, TRUE, &var->value, orr, val);
 #else
    do {
@@ -3458,8 +3492,7 @@
 Atomic_ReadAdd16(Atomic_uint16 *var,  // IN/OUT
                  uint16 val)          // IN:
 {
-#if defined __GNUC__
-#if defined __x86_64__ || defined __i386__
+#if defined __GNUC__ && (defined __x86_64__ || defined __i386__)
    __asm__ __volatile__(
       "lock; xaddw %0, %1"
       : "=r" (val),
@@ -3468,7 +3501,7 @@
       : "cc", "memory"
    );
    return val;
-#elif defined VM_ARM_V7
+#elif defined __GNUC__ && defined VM_ARM_V7
    uint16 res;
    uint16 retVal;
    uint16 tmp;
@@ -3491,11 +3524,10 @@
    dmb();
 
    return retVal;
-#elif defined VM_ARM_64
+#elif defined __GNUC__ && defined VM_ARM_64
    return _VMATOM_X(ROP, 16, TRUE, &var->value, add, val);
 #else
-#error No 16-bits atomics.
-#endif
+   return (uint16)AtomicUndefined(var + val);
 #endif
 }
 
@@ -3544,7 +3576,7 @@
 {
    return Atomic_ReadAdd16(var, (uint16)-1);
 }
-#endif
+
 
 /*
  * Template code for the Atomic_<name> type and its operators.
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_basic_asm.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_basic_asm.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_basic_asm.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_basic_asm.h	2023-03-07 23:57:07.000000000 +0100
@@ -787,7 +787,7 @@
     * bora/lib/vprobe/arm64/vp_emit_tc.c::VpEmit_BuiltinRDTSCWork()
     * bora/modules/vmkernel/tests/core/xmapTest/xmapTest_arm64.c::XMapTest_SetupLoopCode()
     */
-#if (defined(VMKERNEL) || defined(VMM)) && !defined(VMK_ARM_EL1_OR_VHE)
+#if defined(VMKERNEL) && !defined(VMK_ARM_EL1_OR_VHE)
    return MRS(CNTPCT_EL0);
 #else
    return MRS(CNTVCT_EL0);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_basic_defs.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_basic_defs.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_basic_defs.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_basic_defs.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2003-2022 VMware, Inc. All rights reserved.
+ * Copyright (C) 2003-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -58,7 +58,7 @@
 /*
  * vm_basic_defs.h --
  *
- *	Standard macros for VMware source code.
+ *      Standard macros for VMware source code.
  */
 
 #ifndef _VM_BASIC_DEFS_H_
@@ -75,14 +75,6 @@
 #include "includeCheck.h"
 #include "vm_basic_types.h" // For INLINE.
 
-/* Checks for FreeBSD, filtering out VMKERNEL. */
-#if !defined(VMKERNEL) && defined(__FreeBSD__)
-#define __IS_FREEBSD__ 1
-#else
-#define __IS_FREEBSD__ 0
-#endif
-#define __IS_FREEBSD_VER__(ver) (__IS_FREEBSD__ && __FreeBSD_version >= (ver))
-
 /*
  * <stddef.h> provides definitions for:
  *   NULL, offsetof
@@ -167,11 +159,11 @@
 #define VMW_CLAMP(x, min, max) \
    ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)))
 
-#define ROUNDUP(x,y)		(((x) + (y) - 1) / (y) * (y))
-#define ROUNDDOWN(x,y)		((x) / (y) * (y))
-#define ROUNDUPBITS(x, bits)	(((uintptr_t) (x) + MASK(bits)) & ~MASK(bits))
-#define ROUNDDOWNBITS(x, bits)	((uintptr_t) (x) & ~MASK(bits))
-#define CEILING(x, y)		(((x) + (y) - 1) / (y))
+#define ROUNDUP(x,y)           (((x) + (y) - 1) / (y) * (y))
+#define ROUNDDOWN(x,y)         ((x) / (y) * (y))
+#define ROUNDUPBITS(x, bits)   (((uintptr_t)(x) + MASK(bits)) & ~MASK(bits))
+#define ROUNDDOWNBITS(x, bits) ((uintptr_t)(x) & ~MASK(bits))
+#define CEILING(x, y)          (((x) + (y) - 1) / (y))
 
 #if defined VMKERNEL || defined VMKBOOT
 # define CEIL(_a, _b)        CEILING(_a, _b)
@@ -196,8 +188,9 @@
  * argument. The range 0..31 is safe.
  */
 
-#define MASK(n)		((1 << (n)) - 1)	    /* make an n-bit mask */
-#define MASK64(n)	((CONST64U(1) << (n)) - 1)  /* make an n-bit mask */
+#define MASK(n)      ((1 << (n)) - 1)            /* make an n-bit mask */
+#define MASK64(n)    ((CONST64U(1) << (n)) - 1)  /* make an n-bit mask */
+#define MASK128(n)   (((uint128)1 << (n)) - 1)   /* make an n-bit mask */
 /*
  * MASKRANGE64 makes a bit vector starting at bit lo and ending at bit hi.  No
  * checking for lo < hi is done.
@@ -226,7 +219,9 @@
 #define XCONC(x, y)             CONC(x, y)
 #define XXCONC(x, y)            XCONC(x, y)
 #define MAKESTR(x)              #x
+#ifndef XSTR
 #define XSTR(x)                 MAKESTR(x)
+#endif
 
 
 /*
@@ -299,15 +294,6 @@
 #define PAGE_NUMBER(_addr)  ((uintptr_t)(_addr) / PAGE_SIZE)
 #endif
 
-#ifndef VM_PAGE_BASE
-#define VM_PAGE_BASE(_addr)  ((_addr) & ~(PAGE_SIZE - 1))
-#endif
-
-#ifndef VM_PAGES_SPANNED
-#define VM_PAGES_SPANNED(_addr, _size) \
-   ((((_addr) & (PAGE_SIZE - 1)) + (_size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT)
-#endif
-
 #ifndef BYTES_2_PAGES
 #define BYTES_2_PAGES(_nbytes)  ((_nbytes) >> PAGE_SHIFT)
 #endif
@@ -320,6 +306,16 @@
 #define PAGES_2_BYTES(_npages)  (((uint64)(_npages)) << PAGE_SHIFT)
 #endif
 
+#ifndef VM_PAGE_BASE
+#define VM_PAGE_BASE(_addr)  ((_addr) & ~(PAGE_SIZE - 1))
+#endif
+
+#ifndef VM_PAGES_SPANNED
+#define VM_PAGES_SPANNED(_addr, _size) \
+   (BYTES_2_PAGES(PAGE_OFFSET(_addr) + PAGE_OFFSET(_size) + (PAGE_SIZE - 1)) + \
+    BYTES_2_PAGES(_size))
+#endif
+
 #ifndef KBYTES_SHIFT
 #define KBYTES_SHIFT 10
 #endif
@@ -467,9 +463,9 @@
  */
 
 #define DEPOSIT_BITS(_src,_pos,_len,_target) { \
-	unsigned mask = ((1 << _len) - 1); \
-	unsigned shiftedmask = ((1 << _len) - 1) << _pos; \
-	_target = (_target & ~shiftedmask) | ((_src & mask) << _pos); \
+   unsigned mask = ((1 << _len) - 1); \
+   unsigned shiftedmask = ((1 << _len) - 1) << _pos; \
+   _target = (_target & ~shiftedmask) | ((_src & mask) << _pos); \
 }
 
 
@@ -739,6 +735,18 @@
 #define VMM_ONLY(x)
 #endif
 
+#ifdef VMX86_VMX
+#define vmx86_vmx 1
+#else
+#define vmx86_vmx 0
+#endif
+
+#ifdef VMM_BOOTSTRAP
+#define vmm_bootstrap 1
+#else
+#define vmm_bootstrap 0
+#endif
+
 #ifdef ULM
 #define vmx86_ulm 1
 #define ULM_ONLY(x) x
@@ -815,6 +823,7 @@
                                                      lfMessageFont)
 
 /* This is not intended to be thread-safe. */
+#ifndef KBUILD_MODNAME
 #define DO_ONCE(code)                                                   \
    do {                                                                 \
       static MONITOR_ONLY(PERVCPU) Bool _doOnceDone = FALSE;            \
@@ -823,6 +832,7 @@
          code;                                                          \
       }                                                                 \
    } while (0)
+#endif
 
 /*
  * Bug 827422 and 838523.
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_basic_types.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_basic_types.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_basic_types.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_basic_types.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -56,13 +56,11 @@
  *********************************************************/
 
 /*
- *
  * vm_basic_types.h --
  *
- *    basic data types.
+ *      Basic data types.
  */
 
-
 #ifndef _VM_BASIC_TYPES_H_
 #define _VM_BASIC_TYPES_H_
 
@@ -331,11 +329,11 @@
 #if !defined(USING_AUTOCONF)
 #   if defined(__FreeBSD__) || defined(sun)
 #      ifndef KLD_MODULE
-#         if __FreeBSD_version >= 500043
+#         if defined(__FreeBSD__)
 #            if !defined(VMKERNEL)
 #               include <inttypes.h>
 #            endif
-#         else
+#         else /* sun */
 #            include <sys/inttypes.h>
 #         endif
 #      endif
@@ -351,7 +349,8 @@
 #endif
 
 
-#if defined(__GNUC__) && defined(__SIZEOF_INT128__)
+#if defined __GNUC__ && defined __SIZEOF_INT128__
+#define VM_HAS_INT128 // 128-bit integers can be used.
 
 typedef unsigned __int128 uint128;
 typedef          __int128  int128;
@@ -360,7 +359,6 @@
 #define MAX_INT128   (~MIN_INT128)
 #define MIN_UINT128  ((uint128)0)
 #define MAX_UINT128  (~MIN_UINT128)
-
 #endif
 
 
@@ -549,7 +547,7 @@
 typedef uint32  UReg32;
 typedef uint64  UReg64;
 
-#if defined(__GNUC__) && defined(__SIZEOF_INT128__)
+#ifdef VM_HAS_INT128
 typedef  int128  Reg128;
 typedef uint128 UReg128;
 #endif
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_device_version.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_device_version.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_device_version.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_device_version.h	2023-03-07 23:57:07.000000000 +0100
@@ -56,6 +56,7 @@
  */
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 #define PCI_DEVICE_ID_VMWARE_SBX                0x0420
+#define PCI_DEVICE_ID_VMWARE_SVGA4              0x0408
 #define PCI_DEVICE_ID_VMWARE_SVGA_EFI           0x0407
 #define PCI_DEVICE_ID_VMWARE_SVGA3              0x0406
 #define PCI_DEVICE_ID_VMWARE_SVGA2              0x0405
@@ -259,15 +260,15 @@
 #define NVME_MAX_NAMESPACES    64 /* We support 64 namespaces same
                                    * as PVSCSI controller.
                                    */
-#define NVME_HW19_MAX_NAMESPACES 15 // HWv19 and before supports 15 namespaces
+#define NVME_HW20_MAX_NAMESPACES 15 // HWv20 and before supports 15 namespaces
 #define NVME_FUTURE_MAX_NAMESPACES 256 /* To support NVME to the possible 256
                                         * disks per controller in future.
                                         */
 /************* SCSI implementation limits ********************************/
 #define SCSI_MAX_CONTROLLERS	 4	  // Need more than 1 for MSCS clustering
 #define	SCSI_MAX_DEVICES         16	  // BT-958 emulates only 16
-#define PVSCSI_HWV14_MAX_DEVICES 65	  /* HWv14 And Later Supports 64 
-					   * + controller at ID 7 
+#define PVSCSI_HWV14_MAX_DEVICES 65	  /* HWv14 And Later Supports 64
+					   * + controller at ID 7
 					   */
 #define PVSCSI_MAX_DEVICES       255	  // 255 (including the controller)
 #define PVSCSI_MAX_NUM_DISKS     (PVSCSI_HWV14_MAX_DEVICES - 1)
@@ -354,6 +355,10 @@
 /************* DeviceGroup implementation limits ********************/
 #define MAX_DEVICE_GROUP_DEVICES 4
 
+/************* Serial/Parallel Ports limits ********************/
+#define NUM_SERIAL_PORTS     32
+#define NUM_PARALLEL_PORTS   3
+
 /************* Strings for Host USB Driver *******************************/
 
 #ifdef _WIN32
@@ -362,13 +367,13 @@
  * Globally unique ID for the VMware device interface. Define INITGUID before including
  * this header file to instantiate the variable.
  */
-DEFINE_GUID(GUID_DEVICE_INTERFACE_VMWARE_USB_DEVICES, 
+DEFINE_GUID(GUID_DEVICE_INTERFACE_VMWARE_USB_DEVICES,
 0x2da1fe75, 0xaab3, 0x4d2c, 0xac, 0xdf, 0x39, 0x8, 0x8c, 0xad, 0xa6, 0x65);
 
 /*
  * Globally unique ID for the VMware device setup class.
  */
-DEFINE_GUID(GUID_CLASS_VMWARE_USB_DEVICES, 
+DEFINE_GUID(GUID_CLASS_VMWARE_USB_DEVICES,
 0x3b3e62a5, 0x3556, 0x4d7e, 0xad, 0xad, 0xf5, 0xfa, 0x3a, 0x71, 0x2b, 0x56);
 
 /*
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_legal.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_legal.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_legal.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_legal.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2022 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -37,7 +37,7 @@
  * Updating them therefore may require updating translations and vmsg
  * auditing files in bora/messages/ to avoid breaking the build.
  */
-#define COPYRIGHT_YEARS  "1998-2022" /* See the note above when changing. */
+#define COPYRIGHT_YEARS  "1998-2023" /* See the note above when changing. */
 #define COPYRIGHT_STRING "Copyright (C) " COPYRIGHT_YEARS " " COMPANY_NAME
 #define RIGHT_RESERVED   "All rights reserved."
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_product_versions.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_product_versions.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_product_versions.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_product_versions.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -81,13 +81,13 @@
    #define PRODUCT_VERSION    1,1,5,PRODUCT_BUILD_NUMBER_NUMERIC
 #elif defined(VMX86_VPX)
    /* this should be kept in sync with the corresponding vpx branch. */
-   #define PRODUCT_VERSION    8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
+   #define PRODUCT_VERSION    8,0,1,PRODUCT_BUILD_NUMBER_NUMERIC
 #elif defined(VMX86_HORIZON_VIEW)
-   #define PRODUCT_VERSION    8,7,0,PRODUCT_BUILD_NUMBER_NUMERIC
+   #define PRODUCT_VERSION    8,9,0,PRODUCT_BUILD_NUMBER_NUMERIC
 // VMX86_DESKTOP must be last because it is the default and is always defined.
 #elif defined(VMX86_DESKTOP)
    // WORKSTATION_VERSION_NUMBER below has to match this
-   #define PRODUCT_VERSION    16,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
+   #define PRODUCT_VERSION    17,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
 #elif defined(VMX86_SYSIMAGE)
    #define PRODUCT_VERSION    TOOLS_VERSION_EXT_CURRENT_CSV
    #define SYSIMAGE_VERSION TOOLS_VERSION_CURRENT_STR
@@ -184,7 +184,7 @@
  */
 #define ESX_VERSION_MAJOR "8"
 #define ESX_VERSION_MINOR "0"
-#define ESX_VERSION_MAINT "0" // 0 = Pre-release/GA, 1 = Update 1
+#define ESX_VERSION_MAINT "1" // 0 = Pre-release/GA, 1 = Update 1
 #define ESX_VERSION_UPDATE ESX_VERSION_MAINT // ESX's own update level
 
 #define ESX_VERSION ESX_VERSION_MAJOR "." ESX_VERSION_MINOR "." \
@@ -192,7 +192,7 @@
 #define ESX_VERSION_THIRD_PARTY ESX_VERSION_MAJOR ESX_VERSION_MINOR \
                                 ESX_VERSION_UPDATE
 
-#define ESX_RELEASE_UPDATE "1" // Quarterly release
+#define ESX_RELEASE_UPDATE "0" // Quarterly release
 #define ESX_RELEASE_PATCH "0"  // 0 = experimental
 #define ESX_RELEASE_QUARTERLY ESX_RELEASE_UPDATE // ESX's own quarterly release
 #define ESX_RELEASE ESX_RELEASE_QUARTERLY "." ESX_RELEASE_PATCH
@@ -219,9 +219,9 @@
  * ALSO, leave FOO_VERSION at e.x.p on all EXCEPT release branches.
  * lmclient.h has a FLEX_VERSION struct so the versionPrefix can't be FLEX
  */
-#define WORKSTATION_VERSION_NUMBER "16.0.0" /* this version number should always match real WS version number */
+#define WORKSTATION_VERSION_NUMBER "17.0.0" /* this version number should always match real WS version number */
 #define WORKSTATION_VERSION "e.x.p"
-#define PLAYER_VERSION_NUMBER "16.0.0" /* this version number should always match real Player version number */
+#define PLAYER_VERSION_NUMBER "17.0.0" /* this version number should always match real Player version number */
 #define PLAYER_VERSION "e.x.p"
 #define VMRC_VERSION_NUMBER "12.1.0" /* this version number should always match real VMRC version number */
 #define VMRC_VERSION "12.1.0"
@@ -239,7 +239,7 @@
  */
 #define FUSION_VERSION "e.x.p"
 
-#define VIM_VERSION "8.0.0"
+#define VIM_VERSION "8.0.1"
 /*
  *For smooth version bump up for quaterly releases, we need to have a fallback
  *mechanism to previous version in all those components which perform version
@@ -269,15 +269,15 @@
 6.0.0,\
 6.5.0"
 // Put VPX_VERSION first, because vpx/make/defs.mk doesn't check for suffix.
-#define VPX_VERSION "8.0.0"
+#define VPX_VERSION "8.0.1"
 #define VPX_VERSION_MAJOR "8"
 #define VPX_VERSION_MINOR "0"
-#define VPX_VERSION_MAINT "0"
-#define VPX_VERSION_PATCH "10000"
+#define VPX_VERSION_MAINT "1"
+#define VPX_VERSION_PATCH "00000"
 #define VPX_VERSION_THIRD_PARTY VPX_VERSION_MAJOR VPX_VERSION_MINOR \
                                 VPX_VERSION_MAINT
 //MARKER_FAST_REMOVE_START
-#define VPX_VERSION_NUMERIC 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
+#define VPX_VERSION_NUMERIC 8,0,1,PRODUCT_BUILD_NUMBER_NUMERIC
 //MARKER_FAST_REMOVE_END
 //MARKER_FAST_UNCOMMENT_START
 //#define VPX_VERSION_NUMERIC gVpxVersionNumeric
@@ -287,14 +287,14 @@
 #define VPX_MIN_HOST_VERSION "6.7.0"
 
 #define MAX_SUPPORTED_VI_VERSION "6.6" //from ovfTool/src/supportedVersions.h
-#define VCDB_CURRENT_SCHEMA_VERSION           800 // from PitCADatabase.h
+#define VCDB_CURRENT_SCHEMA_VERSION           801 // from PitCADatabase.h
 
 #define VPX_RELEASE_UPDATE "0" /* 0 = Pre-release/GA, 1 = Update 1 */
 #define VPX_RELEASE_PATCH "0"  /* 0 = experimental */
 #define VPX_RELEASE VPX_RELEASE_UPDATE "." VPX_RELEASE_PATCH
 
 /* expected database version for current release */
-#define VPXD_VDB_DB_VERSION_ID            800
+#define VPXD_VDB_DB_VERSION_ID            801
 #define VPXD_VDB_DB_VERSION_VALUE         "VirtualCenter Database 8.0"
 
 /*
@@ -309,10 +309,10 @@
 // Changing the version is required when CPD releases an update.
 #define VA_PATCH_VERSION  "5100"
 
-#define HORIZONOSOT_VERSION "1.1.2204"
+#define HORIZONOSOT_VERSION "1.2.2210"
 #define HORIZONVMDS_VERSION "1.0.0"
 
-#define INTEGRITY_VERSION "8.0.0" /* Should use VPX_VERSION? */
+#define INTEGRITY_VERSION "8.0.1" /* Should use VPX_VERSION? */
 #define SVA_VERSION "1.0.0"
 #define SSO_VERSION "1.0.0"
 #define SDK_VERSION "4.1.0"
@@ -339,10 +339,10 @@
 //#define NETDUMP_FILE_VERSION  gNetdumpFileVersion
 //MARKER_FAST_UNCOMMENT_END
 
-#define VDDK_VERSION          "8.0.0"
+#define VDDK_VERSION          "8.0.1"
 #define VDDK_VERSION_MAJOR    8
 #define VDDK_VERSION_MINOR    0
-#define VDDK_VERSION_MAINT    0
+#define VDDK_VERSION_MAINT    1
 
 //MARKER_FAST_REMOVE_START
 #define VDDK_FILE_VERSION     VDDK_VERSION_MAJOR,VDDK_VERSION_MINOR,\
@@ -352,11 +352,11 @@
 //#define VDDK_FILE_VERSION gVddkFileVersion
 //MARKER_FAST_UNCOMMENT_END
 
-#define OVFTOOL_VERSION "4.5.0"
+#define OVFTOOL_VERSION "4.6.0"
 #define VCSA_INSTALLER_VERSION "1.0.0"
 
 //MARKER_FAST_REMOVE_START
-#define OVFTOOL_FILE_VERSION 4,5,0,PRODUCT_BUILD_NUMBER_NUMERIC
+#define OVFTOOL_FILE_VERSION 4,6,0,PRODUCT_BUILD_NUMBER_NUMERIC
 //MARKER_FAST_REMOVE_END
 //MARKER_FAST_UNCOMMENT_START
 //#define OVFTOOL_FILE_VERSION gOvftoolFileVersion
@@ -372,7 +372,7 @@
 #define PRECHECK_VERSION "e.x.p"
 #define VHSESDK_VERSION "1.0.0"
 #define VIEWVC_VERSION "14.0.2"
-#define WCP_VERSION "0.0.17"
+#define WCP_VERSION "0.1.2"
 #define VSTATS_VERSION "0.0.1"
 #define XVP_VERSION "1.0.0"
 /*
@@ -381,27 +381,27 @@
  * SCons parsing code requires that each line have a version string, so we
  * can't just do something like #define RDESDK_VERSION VIEW_VERSION"
  */
-#define VIEW_CLIENT_VERSION "8.7.0"
+#define VIEW_CLIENT_VERSION "8.9.0"
 #define VIEW_CLIENT_VERSION_NUMBER VIEW_CLIENT_VERSION
-#define VIEW_VERSION "8.7.0"
-#define RDE_RFT_ALL_VERSION "8.7.0"
-#define RDE_RFT_REL_VERSION "8.7.0"
-#define RDESDKREL_VERSION "8.7.0"
-#define MKSVCHANDEV_VERSION "15.7.0"
-#define TSMMRDEV_VERSION "8.7.0"
-#define RDF_VERSION "8.7.0"
-#define HORIZON_DAAS_AGENT_VERSION "22.3.0"
-#define HORIZON_USB_AGENT_VERSION "11.7.0"
+#define VIEW_VERSION "8.9.0"
+#define RDE_RFT_ALL_VERSION "8.9.0"
+#define RDE_RFT_REL_VERSION "8.9.0"
+#define RDESDKREL_VERSION "8.9.0"
+#define MKSVCHANDEV_VERSION "15.9.0"
+#define TSMMRDEV_VERSION "8.9.0"
+#define RDF_VERSION "8.9.0"
+#define HORIZON_DAAS_AGENT_VERSION "22.5.0"
+#define HORIZON_USB_AGENT_VERSION "11.9.0"
 #define HORIZON_UPDATETOOL_VERSION "2.0.7"
-#define MFW_VERSION "16.7.0"
-#define INPUTDEVTAP_VERSION "16.7.0"
+#define MFW_VERSION "16.9.0"
+#define HORIZONTOOL_VERSION "16.9.0"
 
 /*
  * This is the Horizon Marketing version which is shared between
  * Horizon Client, Agent and Server. It is set in the format of
  * YYMM of the targeted release date.
  */
-#define HORIZON_YYMM_VERSION "2209"
+#define HORIZON_YYMM_VERSION "2303"
 
 #ifndef MAKESTR
 #define MAKESTR(x) #x
@@ -510,8 +510,8 @@
  * a parameter that no longer match the content of the dormant license
  * file.
  */
-#define PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE "12.0"
-#define PRODUCT_PLAYER_VERSION_STRING_FOR_LICENSE "16.0"
+#define PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE "13.0"
+#define PRODUCT_PLAYER_VERSION_STRING_FOR_LICENSE "17.0"
 #define PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE "10.0"
 #define PRODUCT_FLEX_VERSION_STRING_FOR_LICENSE "8.0"
 
@@ -528,7 +528,7 @@
 #    define PRODUCT_LICENSE_VERSION PRODUCT_FLEX_VERSION_STRING_FOR_LICENSE
 #  elif defined(VMX86_VPX)
 #    define PRODUCT_LICENSE_VERSION "8.0"
-#    define PRODUCT_LICENSE_FILE_VERSION "8.0.1.1"
+#    define PRODUCT_LICENSE_FILE_VERSION "8.0.2.0"
 #  elif defined(VMX86_SDK)
 #    define PRODUCT_LICENSE_VERSION "1.0"
 #  elif defined(VMX86_P2V)
@@ -538,7 +538,7 @@
 #    if defined(__APPLE__)
 #      define PRODUCT_LICENSE_VERSION PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE
 #    else
-#      define PRODUCT_LICENSE_VERSION "16.0"
+#      define PRODUCT_LICENSE_VERSION "17.0"
 #    endif
 #  else
 #    define PRODUCT_LICENSE_VERSION "0.0"
@@ -546,7 +546,7 @@
 #  define PRODUCT_VERSION_STRING_FOR_LICENSE PRODUCT_LICENSE_VERSION
 #endif
 #define PRODUCT_ESX_LICENSE_VERSION "8.0"
-#define PRODUCT_ESX_LICENSE_FILE_VERSION "8.0.1.1"
+#define PRODUCT_ESX_LICENSE_FILE_VERSION "8.0.2.0"
 
 /*
  * The configuration file version string should be changed
@@ -602,6 +602,8 @@
 #define PRODUCT_VERSION_SCALABLE_SERVER_65 PRODUCT_ESXI_BRIEF_NAME " 6.5"
 #define PRODUCT_VERSION_SCALABLE_SERVER_67 PRODUCT_ESXI_BRIEF_NAME " 6.7"
 #define PRODUCT_VERSION_SCALABLE_SERVER_70 PRODUCT_ESXI_BRIEF_NAME " 7.0"
+#define PRODUCT_VERSION_SCALABLE_SERVER_701 PRODUCT_ESXI_BRIEF_NAME " 7.0 U1"
+#define PRODUCT_VERSION_SCALABLE_SERVER_702 PRODUCT_ESXI_BRIEF_NAME " 7.0 U2"
 #define PRODUCT_VERSION_WGS_1 "Server 1.x"
 #define PRODUCT_VERSION_WGS_2 "Server 2.x"
 #define PRODUCT_VERSION_GSX_3 "GSX Server 3.x"
@@ -620,6 +622,7 @@
 #define PRODUCT_VERSION_WORKSTATION_150 PRODUCT_WORKSTATION_BRIEF_NAME " 15.x"
 #define PRODUCT_VERSION_WORKSTATION_160 PRODUCT_WORKSTATION_BRIEF_NAME " 16.x"
 #define PRODUCT_VERSION_WORKSTATION_162 PRODUCT_WORKSTATION_BRIEF_NAME " 16.2.x"
+#define PRODUCT_VERSION_WORKSTATION_170 PRODUCT_WORKSTATION_BRIEF_NAME " 17.x"
 #define PRODUCT_VERSION_PLAYER_1 PRODUCT_PLAYER_BRIEF_NAME " 1.x"
 #define PRODUCT_VERSION_MAC_DESKTOP_1 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 1.1"
 #define PRODUCT_VERSION_MAC_DESKTOP_2 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 2.x"
@@ -634,6 +637,7 @@
 #define PRODUCT_VERSION_MAC_DESKTOP_110 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 11.x"
 #define PRODUCT_VERSION_MAC_DESKTOP_120 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 12.x"
 #define PRODUCT_VERSION_MAC_DESKTOP_122 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 12.2.x"
+#define PRODUCT_VERSION_MAC_DESKTOP_130 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 13.x"
 
 /*
  * VDFS Versions
@@ -659,4 +663,16 @@
 #define ZDOM_RELEASE_PATCH "0"  /* 0 = experimental */
 #define ZDOM_RELEASE ZDOM_RELEASE_UPDATE "." ZDOM_RELEASE_PATCH
 
+/*
+ * vsansky Versions
+ */
+#define VSANSKY_VERSION_MAJOR "0"
+#define VSANSKY_VERSION_MINOR "1"
+#define VSANSKY_VERSION_MAINT "0"
+#define VSANSKY_VERSION VSANSKY_VERSION_MAJOR "." VSANSKY_VERSION_MINOR "." \
+                       VSANSKY_VERSION_MAINT
+#define VSANSKY_RELEASE_UPDATE "0" /* 0 = Pre-release/GA, 1 = Update 1 */
+#define VSANSKY_RELEASE_PATCH "0"  /* 0 = experimental */
+#define VSANSKY_RELEASE VSANSKY_RELEASE_UPDATE "." VSANSKY_RELEASE_PATCH
+
 #endif
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_tools_version.h open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_tools_version.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/vm_tools_version.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/vm_tools_version.h	2023-03-07 23:57:07.000000000 +0100
@@ -1597,6 +1597,13 @@
 #define   TOOLS_VERSION_JACKHAMMER_PATCH12_V_BASE 25
 
 #ifndef RC_INVOKED
+#define   TOOLS_VERSION_JACKHAMMER_PATCH13 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_JACKHAMMER_PATCH13_V)
+#endif /* RC_INVOKED */
+#define   TOOLS_VERSION_JACKHAMMER_PATCH13_V_MJR  10
+#define   TOOLS_VERSION_JACKHAMMER_PATCH13_V_MNR  3
+#define   TOOLS_VERSION_JACKHAMMER_PATCH13_V_BASE 26
+
+#ifndef RC_INVOKED
 #define   TOOLS_VERSION_SLEDGEHAMMER_RELEASE TOOLS_VERSION_TO_UINT(TOOLS_VERSION_SLEDGEHAMMER_RELEASE_V)
 #endif /* RC_INVOKED */
 #define   TOOLS_VERSION_SLEDGEHAMMER_RELEASE_V_MJR  11
@@ -1709,6 +1716,13 @@
 #define   TOOLS_VERSION_SABRE_SAW_UPDATE1_V_BASE 5
 
 #ifndef RC_INVOKED
+#define   TOOLS_VERSION_SABRE_SAW_PATCH1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_SABRE_SAW_PATCH1_V)
+#endif /* RC_INVOKED */
+#define   TOOLS_VERSION_SABRE_SAW_PATCH1_V_MJR  12
+#define   TOOLS_VERSION_SABRE_SAW_PATCH1_V_MNR  0
+#define   TOOLS_VERSION_SABRE_SAW_PATCH1_V_BASE 6
+
+#ifndef RC_INVOKED
 #define   TOOLS_VERSION_MITER_SAW_RELEASE TOOLS_VERSION_TO_UINT(TOOLS_VERSION_MITER_SAW_RELEASE_V)
 #endif /* RC_INVOKED */
 #define   TOOLS_VERSION_MITER_SAW_RELEASE_V_MJR  12
@@ -1722,9 +1736,16 @@
 #define   TOOLS_VERSION_MITER_SAW_UPDATE1_V_MNR  1
 #define   TOOLS_VERSION_MITER_SAW_UPDATE1_V_BASE 5
 
-#define   TOOLS_VERSION_CURRENT        TOOLS_VERSION_MITER_SAW_UPDATE1
-#define   TOOLS_VERSION_CURRENT_STR    TOOLS_VERSION_TO_STR(TOOLS_VERSION_MITER_SAW_UPDATE1)
-#define   TOOLS_VERSION_CURRENT_CSV    TOOLS_VERSION_TO_CSV(TOOLS_VERSION_MITER_SAW_UPDATE1)
+#ifndef RC_INVOKED
+#define   TOOLS_VERSION_NEXT TOOLS_VERSION_TO_UINT(TOOLS_VERSION_NEXT_V)
+#endif /* RC_INVOKED */
+#define   TOOLS_VERSION_NEXT_V_MJR  12
+#define   TOOLS_VERSION_NEXT_V_MNR  2
+#define   TOOLS_VERSION_NEXT_V_BASE 0
+
+#define   TOOLS_VERSION_CURRENT        TOOLS_VERSION_NEXT
+#define   TOOLS_VERSION_CURRENT_STR    TOOLS_VERSION_TO_STR(TOOLS_VERSION_NEXT)
+#define   TOOLS_VERSION_CURRENT_CSV    TOOLS_VERSION_TO_CSV(TOOLS_VERSION_NEXT)
 
 /*
  * The extended Tools version is the current Tools version with the
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/include/x86cpuid.h open-vm-tools-12.2.0/open-vm-tools/lib/include/x86cpuid.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/include/x86cpuid.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/include/x86cpuid.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -162,7 +162,8 @@
    CPUIDLEVEL(TRUE,  1E,  0x1e,       1, 19) \
    CPUIDLEVEL(FALSE, 1F,  0x1f,       6, 17) \
    CPUIDLEVEL(TRUE,  20,  0x20,       1, 20) \
-   CPUIDLEVEL(TRUE , 21,  0x21,       1, 20) \
+   CPUIDLEVEL(TRUE,  21,  0x21,       1, 20) \
+   CPUIDLEVEL(TRUE,  23,  0x23,       4, 21) \
    CPUIDLEVEL(FALSE, 400, 0x40000000, 0,  0) \
    CPUIDLEVEL(FALSE, 401, 0x40000001, 0,  0) \
    CPUIDLEVEL(FALSE, 402, 0x40000002, 0,  0) \
@@ -497,6 +498,7 @@
 FLAG(   6,  0, EAX, 19,  1, HW_FEEDBACK,                         NO,    0 ) \
 FLAG(   6,  0, EAX, 20,  1, HWP_IGNORE_IDLE_REQUEST,             NO,    0 ) \
 FLAG(   6,  0, EAX, 23,  1, HW_FEEDBACK_ENHANCED,                NO,    0 ) \
+FLAG(   6,  0, EAX, 24,  1, HWP_THERM_INTERRUPT_MSR,             NO,    0 ) \
 FIELD(  6,  0, EBX,  0,  4, NUM_INTR_THRESHOLDS,                 NO,    0 ) \
 FLAG(   6,  0, ECX,  0,  1, HW_COORD_FEEDBACK,                   NO,    0 ) \
 FLAG(   6,  0, ECX,  1,  1, ACNT2,                               ANY,  13 ) \
@@ -546,7 +548,7 @@
 FLAG(   7,  0, ECX,  2,  1, UMIP,                                YES,  17 ) \
 FLAG(   7,  0, ECX,  3,  1, PKU,                                 YES,  13 ) \
 FLAG(   7,  0, ECX,  4,  1, OSPKE,                               ANY,  13 ) \
-FLAG(   7,  0, ECX,  5,  1, WAITPKG,                             YES, FUT ) \
+FLAG(   7,  0, ECX,  5,  1, WAITPKG,                             YES,  21 ) \
 FLAG(   7,  0, ECX,  6,  1, AVX512VBMI2,                         YES,  17 ) \
 FLAG(   7,  0, ECX,  7,  1, CET_SS,                              YES,  20 ) \
 FLAG(   7,  0, ECX,  8,  1, GFNI,                                YES,  17 ) \
@@ -567,13 +569,16 @@
 FLAG(   7,  0, ECX, 29,  1, ENQCMD,                              NO,    0 ) \
 FLAG(   7,  0, ECX, 30,  1, SGX_LC,                              ANY,  17 ) \
 FLAG(   7,  0, ECX, 31,  1, PKS,                                 YES,  20 ) \
+FLAG(   7,  0, EDX,  1,  1, SGK_KEYS,                            NO,    0 ) \
 FLAG(   7,  0, EDX,  2,  1, AVX512QVNNIW,                        YES,  16 ) \
 FLAG(   7,  0, EDX,  3,  1, AVX512QFMAPS,                        YES,  16 ) \
 FLAG(   7,  0, EDX,  4,  1, FAST_SHORT_REPMOV,                   YES,  18 ) \
 FLAG(   7,  0, EDX,  5,  1, UINTR,                               NO,    0 ) \
 FLAG(   7,  0, EDX,  8,  1, AVX512VP2INTERSECT,                  YES,  18 ) \
+FLAG(   7,  0, EDX,  9,  1, SRBDS_CTRL,                          NO,    0 ) \
 FLAG(   7,  0, EDX, 10,  1, MDCLEAR,                             YES,   9 ) \
-FLAG(   7,  0, EDX, 13,  1, TSX_FORCE_ABORT,                     NO,    0 ) \
+FLAG(   7,  0, EDX, 11,  1, RTM_ALWAYS_ABORT,                    NO,    0 ) \
+FLAG(   7,  0, EDX, 13,  1, RTM_FORCE_ABORT,                     NO,    0 ) \
 FLAG(   7,  0, EDX, 14,  1, SERIALIZE,                           YES,  20 ) \
 FLAG(   7,  0, EDX, 15,  1, HYBRID,                              NO,    0 ) \
 FLAG(   7,  0, EDX, 16,  1, TSXLDTRK,                            NO,    0 ) \
@@ -590,14 +595,32 @@
 FLAG(   7,  0, EDX, 29,  1, ARCH_CAPABILITIES,                   ANY,   9 ) \
 FLAG(   7,  0, EDX, 30,  1, CORE_CAPABILITIES,                   NO,    0 ) \
 FLAG(   7,  0, EDX, 31,  1, SSBD,                                YES,   9 ) \
+FLAG(   7,  1, EAX,  3,  1, RAO_INT,                             NO,    0 ) \
 FLAG(   7,  1, EAX,  4,  1, AVX_VNNI,                            YES,  20 ) \
 FLAG(   7,  1, EAX,  5,  1, AVX512BF16,                          YES,  18 ) \
+FLAG(   7,  1, EAX,  6,  1, LASS,                                NO,    0 ) \
+FLAG(   7,  1, EAX,  7,  1, CMPCCXADD,                           NO,    0 ) \
+FLAG(   7,  1, EAX,  8,  1, ARCH_PERFMON_EXT,                    NO,    0 ) \
 FLAG(   7,  1, EAX, 10,  1, FAST_ZERO_MOVSB,                     YES,  20 ) \
 FLAG(   7,  1, EAX, 11,  1, FAST_SHORT_STOSB,                    YES,  20 ) \
 FLAG(   7,  1, EAX, 12,  1, FAST_SHORT_CMPSB_SCASB,              YES,  20 ) \
+FLAG(   7,  1, EAX, 19,  1, WRMSRNS,                             NO,    0 ) \
+FLAG(   7,  1, EAX, 21,  1, AMX_FP16,                            NO,    0 ) \
 FLAG(   7,  1, EAX, 22,  1, HRESET,                              NO,    0 ) \
+FLAG(   7,  1, EAX, 23,  1, AVX_IFMA,                            NO,    0 ) \
 FLAG(   7,  1, EAX, 26,  1, LAM,                                 NO,    0 ) \
-FLAG(   7,  2, EDX,  0,  1, PSFD,                                YES,  20 )
+FLAG(   7,  1, EAX, 27,  1, MSRLIST,                             NO,    0 ) \
+FLAG(   7,  1, EBX,  0,  1, LEAF7_PPIN,                          NO,    0 ) \
+FLAG(   7,  1, EDX,  4,  1, AVX_VNNI_INT8,                       NO,    0 ) \
+FLAG(   7,  1, EDX,  5,  1, AVX_NE_CONVERT,                      NO,    0 ) \
+FLAG(   7,  1, EDX, 14,  1, PREFETCHI,                           NO,    0 ) \
+FLAG(   7,  1, EDX, 18,  1, CET_SSS,                             NO,    0 ) \
+FLAG(   7,  2, EDX,  0,  1, PSFD,                                YES,  20 ) \
+FLAG(   7,  2, EDX,  1,  1, IPRED_CTRL,                          NO,    0 ) \
+FLAG(   7,  2, EDX,  2,  1, RRSBA_CTRL,                          NO,    0 ) \
+FLAG(   7,  2, EDX,  3,  1, DDPD_U,                              NO,    0 ) \
+FLAG(   7,  2, EDX,  4,  1, BHI_CTRL,                            NO,    0 ) \
+FLAG(   7,  2, EDX,  5,  1, MCDT_NO,                             NO,    0 )
 
 /*    LEVEL, SUB-LEVEL, REG, POS, SIZE, NAME,               MON SUPP, HWV  */
 #define CPUID_FIELD_DATA_LEVEL_9                                            \
@@ -776,6 +799,7 @@
 FLAG(  12,  0, EAX,  1,  1, SGX2,                                ANY, FUT ) \
 FLAG(  12,  0, EAX,  5,  1, SGX_OVERSUB_ENCLV,                   ANY, FUT ) \
 FLAG(  12,  0, EAX,  6,  1, SGX_OVERSUB_ENCLS,                   ANY, FUT ) \
+FLAG(  12,  0, EAX, 10,  1, SGX_EUPDATESVN,                      NO,    0 ) \
 FLAG(  12,  0, EBX,  0,  1, SGX_MISCSELECT_EXINFO,               ANY, FUT ) \
 FIELD( 12,  0, EBX,  1, 31, SGX_MISCSELECT_RSVD,                 NO,    0 ) \
 FIELD( 12,  0, EDX,  0,  8, MAX_ENCLAVE_SIZE_NOT64,              ANY,  17 ) \
@@ -806,6 +830,9 @@
 FLAG(  14,  0, EBX,  3,  1, PT_MTC,                              NO,    0 ) \
 FLAG(  14,  0, EBX,  4,  1, PT_PTWRITE,                          NO,    0 ) \
 FLAG(  14,  0, EBX,  5,  1, PT_POWER_EVENT,                      NO,    0 ) \
+FLAG(  14,  0, EBX,  6,  1, PT_PSB_PMI,                          NO,    0 ) \
+FLAG(  14,  0, EBX,  7,  1, PT_EVENT_TRACE_ENABLE,               NO,    0 ) \
+FLAG(  14,  0, EBX,  8,  1, PT_TNT_DISABLE,                      NO,    0 ) \
 FLAG(  14,  0, ECX,  0,  1, PT_TOPA,                             NO,    0 ) \
 FLAG(  14,  0, ECX,  1,  1, PT_TOPA_MULTI,                       NO,    0 ) \
 FLAG(  14,  0, ECX,  2,  1, PT_SRO,                              NO,    0 ) \
@@ -933,6 +960,24 @@
 FIELD( 21,  0, EDX,  0, 32, TDX_VENDOR2,                         NO,    0 )
 
 /*    LEVEL, SUB-LEVEL, REG, POS, SIZE, NAME,               MON SUPP, HWV  */
+#define CPUID_FIELD_DATA_LEVEL_23                                           \
+FIELD( 23,  0, EAX,  0, 32, ARCH_PMC_MAX_SUBLEAF,                NO,    0 ) \
+FIELD( 23,  1, EAX,  0, 32, ARCH_PMC_GEN_BITMAP,                 NO,    0 ) \
+FIELD( 23,  1, EBX,  0, 32, ARCH_PMC_FIXED_BITMAP,               NO,    0 ) \
+FLAG(  23,  3, EAX,  0,  1, ARCH_PMC_CORE_CYCLES,                NO,    0 ) \
+FLAG(  23,  3, EAX,  1,  1, ARCH_PMC_INSTR_RETIRED,              NO,    0 ) \
+FLAG(  23,  3, EAX,  2,  1, ARCH_PMC_REF_CYCLES,                 NO,    0 ) \
+FLAG(  23,  3, EAX,  3,  1, ARCH_PMC_LAST_LVL_CREF,              NO,    0 ) \
+FLAG(  23,  3, EAX,  4,  1, ARCH_PMC_LAST_LVL_CMISS,             NO,    0 ) \
+FLAG(  23,  3, EAX,  5,  1, ARCH_PMC_BR_INST_RETIRED,            NO,    0 ) \
+FLAG(  23,  3, EAX,  6,  1, ARCH_PMC_BR_MISS_RETIRED,            NO,    0 ) \
+FLAG(  23,  3, EAX,  7,  1, ARCH_PMC_TOPDOWN_SLOTS,              NO,    0 ) \
+FLAG(  23,  3, EAX,  8,  1, ARCH_PMC_TOPDOWN_BACKEND,            NO,    0 ) \
+FLAG(  23,  3, EAX,  9,  1, ARCH_PMC_TOPDOWN_BAD_SPEC,           NO,    0 ) \
+FLAG(  23,  3, EAX, 10,  1, ARCH_PMC_TOPDOWN_FRONTEND,           NO,    0 ) \
+FLAG(  23,  3, EAX, 11,  1, ARCH_PMC_TOPDOWN_RETIRE,             NO,    0 )
+
+/*    LEVEL, SUB-LEVEL, REG, POS, SIZE, NAME,               MON SUPP, HWV  */
 #define CPUID_FIELD_DATA_LEVEL_400                                          \
 FIELD(400,  0, EAX,  0, 32, MAX_HYP_LEVEL,                       NA,    0 ) \
 FIELD(400,  0, EBX,  0, 32, HYPERVISOR_VENDOR0,                  NA,    0 ) \
@@ -1082,7 +1127,7 @@
 FLAG(  81,  0, ECX, 26,  1, DATABK,                              NO,    0 ) \
 FLAG(  81,  0, ECX, 27,  1, PERFTSC,                             NO,    0 ) \
 FLAG(  81,  0, ECX, 28,  1, PERFL3,                              NO,    0 ) \
-FLAG(  81,  0, ECX, 29,  1, MONITORX,                            NO,    0 ) \
+FLAG(  81,  0, ECX, 29,  1, MONITORX,                            YES,  21 ) \
 FLAG(  81,  0, ECX, 30,  1, ADDR_MASK_EXT,                       NO,    0 ) \
 FLAG(  81,  0, EDX,  0,  1, LEAF81_FPU,                          YES,   4 ) \
 FLAG(  81,  0, EDX,  1,  1, LEAF81_VME,                          YES,   4 ) \
@@ -1223,6 +1268,7 @@
 FLAG(  88,  0, EBX, 25,  1, LEAF88_SSBD_VIRT_SPEC_CTRL,          NO,    0 ) \
 FLAG(  88,  0, EBX, 26,  1, LEAF88_SSBD_NOT_NEEDED,              NO,    0 ) \
 FLAG(  88,  0, EBX, 28,  1, LEAF88_PSFD,                         YES,  20 ) \
+FLAG(  88,  0, EBX, 29,  1, BTC_NO,                              NO,    0 ) \
 FIELD( 88,  0, ECX,  0,  8, LEAF88_CORE_COUNT,                   YES,   4 ) \
 FIELD( 88,  0, ECX, 12,  4, APICID_COREID_SIZE,                  YES,   7 ) \
 FIELD( 88,  0, ECX, 16,  2, PERFTSC_SIZE,                        NO,    0 ) \
@@ -1419,6 +1465,7 @@
    CPUID_FIELD_DATA_LEVEL_1F                                          \
    CPUID_FIELD_DATA_LEVEL_20                                          \
    CPUID_FIELD_DATA_LEVEL_21                                          \
+   CPUID_FIELD_DATA_LEVEL_23                                          \
    CPUID_FIELD_DATA_LEVEL_400                                         \
    CPUID_FIELD_DATA_LEVEL_401                                         \
    CPUID_FIELD_DATA_LEVEL_402                                         \
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/Makefile.am open-vm-tools-12.2.0/open-vm-tools/lib/Makefile.am
--- open-vm-tools-12.1.5/open-vm-tools/lib/Makefile.am	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/Makefile.am	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 ################################################################################
-### Copyright (c) 2007-2016,2020-2021 VMware, Inc.  All rights reserved.
+### Copyright (c) 2007-2016,2020-2022 VMware, Inc.  All rights reserved.
 ###
 ### This program is free software; you can redistribute it and/or modify
 ### it under the terms of version 2 of the GNU General Public License as
@@ -77,3 +77,5 @@
 SUBDIRS += vmSignal
 SUBDIRS += wiper
 SUBDIRS += xdg
+
+
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/base64.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/base64.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/base64.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/base64.c	2023-03-07 23:57:07.000000000 +0100
@@ -350,6 +350,8 @@
               size_t outSize,      // IN:
               size_t *dataLength)  // OUT:
 {
+   /* -1 is properly handled in the Base64_ChunkDecode method. */
+   /* coverity[overrun-buffer-arg:FALSE] */
    return Base64_ChunkDecode(in, -1, out, outSize, dataLength);
 }
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/codesetOld.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/codesetOld.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/codesetOld.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/codesetOld.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2017,2019,2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017,2019,2021,2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -82,22 +82,14 @@
 #endif
 
 #if defined __ANDROID__
-#include "vm_basic_asm.h"
 /*
- * Android doesn't have swab().
+ * This function will be called when buffer overflows. It will panic the app.
+ * It should be in libc.a. But new Android ndk does not have it.
  */
-void
-swab(const void *__restrict src,  // IN/OUT
-     void *__restrict dest,       // IN/OUT
-     ssize_t nbytes)              // IN
+void __stack_chk_fail(void);
+void __stack_chk_fail_local (void)
 {
-   const uint16 *p = src;
-   uint16 *q = dest;
-   ssize_t i;
-
-   for (i = 0; i < nbytes / sizeof *p; i++) {
-      q[i] = Bswap16(p[i]);
-   }
+   __stack_chk_fail();
 }
 #endif
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/hashTable.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/hashTable.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/hashTable.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/hashTable.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2004-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -148,6 +148,12 @@
       if (sizeof s == 4) {
          h = (uint32) (uintptr_t) s;
       } else {
+         /*
+          * Coverity warns that s >> 32 will always equate to 0 regardless of
+          * what s may be. This is true when uintptr_t is 32 bits, but
+          * not when it is 64 bit.
+          */
+         /* coverity[result_independent_of_operands] */
          h = (uint32) (uintptr_t) s ^ (uint32) ((uint64) (uintptr_t) s >> 32);
       }
       h *= 48271;  // http://www.google.com/search?q=48271+pseudorandom
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfo.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfo.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfo.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfo.c	2023-03-07 23:57:07.000000000 +0100
@@ -335,41 +335,3 @@
 
    return detailedData;
 }
-
-/*
- *----------------------------------------------------------------------
- *
- * Hostinfo_QueryProcessExistence --
- *
- *      Determine if a PID is "alive" or "dead". Failing to be able to
- *      do this perfectly, do not make any assumption - say the answer
- *      is unknown.
- *
- * Results:
- *      HOSTINFO_PROCESS_QUERY_ALIVE    Process is alive
- *      HOSTINFO_PROCESS_QUERY_DEAD     Process is dead
- *      HOSTINFO_PROCESS_QUERY_UNKNOWN  Don't know
- *
- * Side effects:
- *      None
- *
- *----------------------------------------------------------------------
- */
-
-HostinfoProcessQuery
-Hostinfo_QueryProcessExistence(int pid)  // IN:
-{
-   HostinfoProcessQuery ret;
-   HostinfoProcessSnapshot *s = Hostinfo_AcquireProcessSnapshot();
-
-   if (s == NULL) {
-      return HOSTINFO_PROCESS_QUERY_UNKNOWN;
-   }
-
-   ret = Hostinfo_QueryProcessSnapshot(s, pid);
-
-   Hostinfo_ReleaseProcessSnapshot(s);
-
-   return ret;
-}
-
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfoHV.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfoHV.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfoHV.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfoHV.c	2023-03-07 23:57:07.000000000 +0100
@@ -422,35 +422,6 @@
 }
 
 
-/*
- *----------------------------------------------------------------------
- *
- *  Hostinfo_SynchronizedVTSCs --
- *
- *      Access the backdoor to determine if the VCPUs' TSCs are
- *      synchronized.
- *
- * Results:
- *      TRUE if the outer VM provides synchronized VTSCs.
- *	FALSE otherwise.
- *
- * Side effects:
- *	Exception if not in a VM, so don't do that!
- *
- *----------------------------------------------------------------------
- */
-
-Bool
-Hostinfo_SynchronizedVTSCs(void)
-{
-#if defined(__i386__) || defined(__x86_64__)
-   return Hostinfo_VCPUInfoBackdoor(BDOOR_CMD_VCPU_SYNC_VTSCS);
-#else
-   return FALSE;
-#endif
-}
-
-
 #if defined(_WIN32)
 
 #if defined(_WIN64)
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfoInt.h open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfoInt.h
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfoInt.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfoInt.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2009-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2009-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -43,6 +43,8 @@
    ARCH,
    BITNESS,
    BUILD_NUMBER,
+   CPE_STRING,
+   DISTRO_ADDL_VERSION,
    DISTRO_NAME,
    DISTRO_VERSION,
    FAMILY_NAME,
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfoPosix.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfoPosix.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/hostinfoPosix.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/hostinfoPosix.c	2023-03-07 23:57:07.000000000 +0100
@@ -136,7 +136,6 @@
 #endif
 
 #define LGPFX "HOSTINFO:"
-#define MAX_LINE_LEN 128
 
 #define SYSTEM_BITNESS_32 "i386"
 #define SYSTEM_BITNESS_64_SUN "amd64"
@@ -160,25 +159,22 @@
 #define DISTRO_BUF_SIZE 1024
 
 #if !defined(__APPLE__) && !defined(VMX86_SERVER) && !defined(USERWORLD)
-typedef struct {
-   const char *name;
-   const char *scanString;
-} DistroNameScan;
-
-static const DistroNameScan lsbFields[] = {
-   { "DISTRIB_ID=",          "DISTRIB_ID=%s"          },
-   { "DISTRIB_RELEASE=",     "DISTRIB_RELEASE=%s"     },
-   { "DISTRIB_CODENAME=",    "DISTRIB_CODENAME=%s"    },
-   { "DISTRIB_DESCRIPTION=", "DISTRIB_DESCRIPTION=%s" },
-   { NULL,                   NULL                     },
+static const char *lsbFields[] = {
+   "DISTRIB_ID=",
+   "DISTRIB_RELEASE=",
+   "DISTRIB_CODENAME=",
+   "DISTRIB_DESCRIPTION=",
+   NULL                      // MUST BE LAST
 };
 
-static const DistroNameScan osReleaseFields[] = {
-   { "PRETTY_NAME=",        "PRETTY_NAME=%s" },
-   { "NAME=",               "NAME=%s"        },
-   { "VERSION_ID=",         "VERSION_ID=%s"  },
-   { "BUILD_ID=",           "BUILD_ID=%s"    },
-   { NULL,                  NULL             },
+static const char *osReleaseFields[] = {
+   "PRETTY_NAME=",
+   "NAME=",
+   "VERSION_ID=",
+   "BUILD_ID=",
+   "VERSION=",
+   "CPE_NAME=",              // NIST CPE specification
+   NULL                      // MUST BE LAST
 };
 
 typedef struct {
@@ -247,21 +243,34 @@
 };
 #endif
 
-/* Must be sorted. Keep in the same ordering as DetailedDataFieldType */
+/*
+ * Any data obtained about the distro is obtained - UNMODIFIED - from the
+ * standardized (i.e. LSB, os-release) disto description files. Under no
+ * circumstances is code specific to a distro allowed or used. If the data
+ * specified by a distro isn't useful, talk to the disto, not VMware.
+ *
+ * The fields from the standardized distro description files used may be
+ * found above (i.e. lsbFields, osReleaseFields).
+ *
+ * Must be sorted. Keep in the same ordering as DetailedDataFieldType
+ */
+
 DetailedDataField detailedDataFields[] = {
 #if defined(VM_ARM_ANY)
-   { "architecture",  "Arm"   },  // Arm
+   { "architecture",      "Arm"   },  // Arm
 #else
-   { "architecture",  "X86"   },  // Intel/X86
+   { "architecture",      "X86"   },  // Intel/X86
 #endif
-   { "bitness",       ""      },  // "32" or "64"
-   { "buildNumber",   ""      },  // Present for MacOS and some Linux distros.
-   { "distroName",    ""      },  // Defaults to uname -s
-   { "distroVersion", ""      },  // Present for MacOS.
-   { "familyName",    ""      },  // Defaults to uname -s
-   { "kernelVersion", ""      },  // Defaults to uname -r
-   { "prettyName",    ""      },  // Present for MacOS.
-   { NULL,            ""      },  // MUST BE LAST
+   { "bitness",           ""      },  // "32" or "64"
+   { "buildNumber",       ""      },  // When available
+   { "cpeString",         ""      },  // When available
+   { "distroAddlVersion", ""      },  // When available
+   { "distroName",        ""      },  // Defaults to uname -s
+   { "distroVersion",     ""      },  // When available
+   { "familyName",        ""      },  // Defaults to uname -s
+   { "kernelVersion",     ""      },  // Defaults to uname -r
+   { "prettyName",        ""      },  // When available
+   { NULL,                ""      },  // MUST BE LAST
 };
 
 #if defined __ANDROID__ || defined __aarch64__
@@ -1391,29 +1400,32 @@
  */
 
 static char **
-HostinfoReadDistroFile(Bool osReleaseRules,           // IN: osRelease rules
-                       const char *filename,          // IN: distro file
-                       const DistroNameScan *values)  // IN: search strings
+HostinfoReadDistroFile(Bool osReleaseRules,   // IN: osRelease rules
+                       const char *fileName,  // IN: distro file
+                       const char *values[])  // IN: search strings
 {
    int i;
+   int fd;
    DynBuf b;
    int bufSize;
    struct stat st;
-   int fd = -1;
+   char lineBuf[DISTRO_BUF_SIZE];
+   FILE *s = NULL;
    uint32 nArgs = 0;
+   Bool any = FALSE;
    Bool success = FALSE;
    char **result = NULL;
    char *distroOrig = NULL;
 
    /* It's OK for the file to not exist, don't warn for this.  */
-   if ((fd = Posix_Open(filename, O_RDONLY)) == -1) {
+   if ((fd = Posix_Open(fileName, O_RDONLY)) == -1) {
       return FALSE;
    }
 
    DynBuf_Init(&b);
 
    if (fstat(fd, &st)) {
-      Warning("%s: could not stat file '%s': %d\n", __FUNCTION__, filename,
+      Warning("%s: could not stat file '%s': %d\n", __FUNCTION__, fileName,
            errno);
       goto out;
    }
@@ -1428,55 +1440,91 @@
    distroOrig = Util_SafeCalloc(bufSize + 1, sizeof *distroOrig);
 
    if (read(fd, distroOrig, bufSize) != bufSize) {
-      Warning("%s: could not read file '%s': %d\n", __FUNCTION__, filename,
+      Warning("%s: could not read file '%s': %d\n", __FUNCTION__, fileName,
               errno);
       goto out;
    }
 
    distroOrig[bufSize] = '\0';
 
+   lseek(fd, 0, SEEK_SET);
+
+   s = fdopen(fd, "r");
+
+   if (s == NULL) {
+      Warning("%s: fdopen conversion failed.\n", __FUNCTION__);
+      goto out;
+   }
+
    /*
     * Attempt to parse a file with one name=value pair per line. Values are
-    * expected to embedded in double quotes.
+    * expected to be embedded in double quotes.
     */
 
    nArgs = 0;
-   for (i = 0; values[i].name != NULL; i++) {
+   for (i = 0; values[i] != NULL; i++) {
       nArgs++;
    }
    nArgs++;  // For the appended version of the data
 
    result = Util_SafeCalloc(nArgs, sizeof(char *));
 
-   for (i = 0; values[i].name != NULL; i++) {
-      const char *tmpDistroPos = strstr(distroOrig, values[i].name);
+   while (fgets(lineBuf, sizeof lineBuf, s) != NULL) {
+      for (i = 0; values[i] != NULL; i++) {
+          size_t len = strlen(values[i]);
 
-      if (tmpDistroPos != NULL) {
-         char distroPart[DISTRO_BUF_SIZE];
+          if (strncmp(lineBuf, values[i], len) == 0) {
+             char *p;
+             char *data;
 
-         if (i != 0) {
-            DynBuf_Strcat(&b, " ");
-         }
+             if (lineBuf[len] == '"') {
+                data = &lineBuf[len + 1];
+                p = strrchr(data, '"');
 
-         sscanf(tmpDistroPos, values[i].scanString, distroPart);
-         if (distroPart[0] == '"') {
-            char *tmpMakeNull;
-
-            tmpDistroPos += strlen(values[i].name) + 1;
-            tmpMakeNull = strchr(tmpDistroPos + 1 , '"');
-            if (tmpMakeNull != NULL) {
-               *tmpMakeNull = '\0';
-               DynBuf_Strcat(&b, tmpDistroPos);
-               result[i] = Util_SafeStrdup(tmpDistroPos);
-               *tmpMakeNull = '"' ;
-            }
-         } else {
-            DynBuf_Strcat(&b, distroPart);
-            result[i] = Util_SafeStrdup(distroPart);
-         }
+                if (p == NULL) {
+                   Warning("%s: Invalid os-release file.", __FUNCTION__);
+                   goto out;
+                }
+             } else {
+                data = &lineBuf[len];
+
+                p = strchr(data, '\n');
+
+                if (p == NULL) {
+                   Warning("%s: os-release file line too long.",
+                           __FUNCTION__);
+                   goto out;
+                }
+             }
+
+             *p = '\0';
+
+             if (p >= &data[MAX_DETAILED_FIELD_LEN]) {
+                Warning("%s: Unexpectedly long data encountered; truncated.",
+                        __FUNCTION__);
+
+                data[MAX_DETAILED_FIELD_LEN - 1] = '\0';
+             }
+
+             if (any) {
+                DynBuf_Strcat(&b, " ");
+             }
+
+             DynBuf_Strcat(&b, data);
+             result[i] = Util_SafeStrdup(data);
+
+             any = TRUE;
+          }
       }
    }
 
+   if (ferror(s)) {
+       Warning("%s: Error occurred while reading '%s'\n", __FUNCTION__,
+               fileName);
+
+       goto out;
+   }
+
    if (DynBuf_GetSize(&b) == 0) {
       /*
        * The distro identification file was not standards compliant.
@@ -1509,7 +1557,9 @@
    }
 
 out:
-   if (fd != -1) {
+   if (s != NULL) {
+      fclose(s);
+   } else if (fd != -1) {
       close(fd);
    }
 
@@ -1648,12 +1698,11 @@
 {
    int score;
 
-   *args = HostinfoReadDistroFile(TRUE, "/etc/os-release",
-                                  &osReleaseFields[0]);
+   *args = HostinfoReadDistroFile(TRUE, "/etc/os-release", osReleaseFields);
 
    if (*args == NULL) {
       *args = HostinfoReadDistroFile(TRUE, "/usr/lib/os-release",
-                                     &osReleaseFields[0]);
+                                     osReleaseFields);
    }
 
    if (*args == NULL) {
@@ -1756,7 +1805,7 @@
 
       for (i = 0; distroArray[i].filename != NULL; i++) {
          *args = HostinfoReadDistroFile(FALSE, distroArray[i].filename,
-                                        &lsbFields[0]);
+                                        lsbFields);
 
          if (*args != NULL) {
             break;
@@ -1990,6 +2039,17 @@
                     sizeof detailedDataFields[BUILD_NUMBER].value);
       }
 
+      if (osReleaseData[4] != NULL) {
+         Str_Strcpy(detailedDataFields[DISTRO_ADDL_VERSION].value,
+                    osReleaseData[4],
+                    sizeof detailedDataFields[DISTRO_ADDL_VERSION].value);
+      }
+
+      if (osReleaseData[5] != NULL) {
+         Str_Strcpy(detailedDataFields[CPE_STRING].value, osReleaseData[5],
+                    sizeof detailedDataFields[CPE_STRING].value);
+      }
+
       if (osReleaseData[fields] != NULL) {
          Str_Strcpy(distro, osReleaseData[fields], distroSize);
       }
@@ -4452,11 +4512,11 @@
 /*
  *----------------------------------------------------------------------
  *
- * Hostinfo_QueryProcessSnapshot --
+ * Hostinfo_QueryProcessExistence --
  *
- *      Determine if a PID is "alive" or "dead" within the specified
- *      process snapshot. Failing to be able to do this perfectly,
- *      do not make any assumption - say the answer is unknown.
+ *      Determine if a PID is "alive" or "dead". Failing to be able to
+ *      do this perfectly, do not make any assumption - say the answer
+ *      is unknown.
  *
  * Results:
  *      HOSTINFO_PROCESS_QUERY_ALIVE    Process is alive
@@ -4470,26 +4530,54 @@
  */
 
 HostinfoProcessQuery
-Hostinfo_QueryProcessSnapshot(HostinfoProcessSnapshot *s,  // IN:
-                              int pid)                     // IN:
+Hostinfo_QueryProcessExistence(int pid)  // IN:
 {
-   HostinfoProcessQuery ret;
-
-   ASSERT(s != NULL);
+   HostinfoProcessQuery result;
 
    switch ((kill(pid, 0) == -1) ? errno : 0) {
    case 0:
    case EPERM:
-      ret = HOSTINFO_PROCESS_QUERY_ALIVE;
+      result = HOSTINFO_PROCESS_QUERY_ALIVE;
       break;
+
    case ESRCH:
-      ret = HOSTINFO_PROCESS_QUERY_DEAD;
+      result = HOSTINFO_PROCESS_QUERY_DEAD;
       break;
+
    default:
-      ret = HOSTINFO_PROCESS_QUERY_UNKNOWN;
+      result = HOSTINFO_PROCESS_QUERY_UNKNOWN;
       break;
    }
 
-   return ret;
+   return result;
 }
 
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Hostinfo_QueryProcessSnapshot --
+ *
+ *      Determine if a PID is "alive" or "dead" within the specified
+ *      process snapshot. Failing to be able to do this perfectly,
+ *      do not make any assumption - say the answer is unknown.
+ *
+ * Results:
+ *      HOSTINFO_PROCESS_QUERY_ALIVE    Process is alive
+ *      HOSTINFO_PROCESS_QUERY_DEAD     Process is dead
+ *      HOSTINFO_PROCESS_QUERY_UNKNOWN  Don't know
+ *
+ * Side effects:
+ *      None
+ *
+ *----------------------------------------------------------------------
+ */
+
+HostinfoProcessQuery
+Hostinfo_QueryProcessSnapshot(HostinfoProcessSnapshot *s,  // IN:
+                              int pid)                     // IN:
+{
+   ASSERT(s != NULL);
+
+   return Hostinfo_QueryProcessExistence(pid);
+}
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/idLinux.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/idLinux.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/idLinux.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/idLinux.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -201,7 +201,7 @@
 	     uid_t euid,	// IN: new effective uid
 	     uid_t suid)	// IN: new saved uid
 {
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500043)
+#if defined(__FreeBSD__)
    return setresuid(uid, euid, suid);
 #elif defined(__linux__)
    if (uid32) {
@@ -281,7 +281,7 @@
 	     gid_t egid,	// IN: new effective gid
 	     gid_t sgid)	// IN: new saved gid
 {
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500043)
+#if defined(__FreeBSD__)
    return setresgid(gid, egid, sgid);
 #elif defined(__linux__)
    if (uid32) {
@@ -844,7 +844,7 @@
  * Results:
  *      TRUE if the right was granted, FALSE if the user cancelled,
  *      entered the wrong password three times in a row, or if an
- *      error was encountered, or if the Authorization session is 
+ *      error was encountered, or if the Authorization session is
  *      invalid or has not been granted the 'right'.
  *
  * Side effects:
@@ -1045,10 +1045,23 @@
 #else
    static const char envName[] = "VMW_SETUGID_TEST";
 
+   /*
+    * Solves issue where includes are taken from glibc-2.11 while libraries are being
+    * linked against glibc-2.31 for a rde-rft-rel app
+    */
+   extern __attribute__((weak)) char *__secure_getenv(const char *);
+   extern __attribute__((weak)) char *secure_getenv(const char *);
+
    if (setenv(envName, "1", TRUE) == -1) {
       return TRUE; /* Conservative */
    }
-   return __secure_getenv(envName) == NULL;
+   if (__secure_getenv != NULL) {
+      return __secure_getenv(envName) == NULL;
+   }
+   if (secure_getenv != NULL) {
+      return secure_getenv(envName) == NULL;
+   }
+   return TRUE;
 #endif
 #endif
 }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/misc/util_misc.c open-vm-tools-12.2.0/open-vm-tools/lib/misc/util_misc.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/misc/util_misc.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/misc/util_misc.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2019, 2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2019, 2021-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -304,7 +304,7 @@
    return (strcmp(path1, path2) == 0);
 #elif defined(_WIN32)
    return (_stricmp(path1, path2) == 0);
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
    return (strcasecmp(path1, path2) == 0);
 #else
    NOT_IMPLEMENTED();
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/panic/panic.c open-vm-tools-12.2.0/open-vm-tools/lib/panic/panic.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/panic/panic.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/panic/panic.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -19,7 +19,7 @@
 /*
  * panic.c --
  *
- *	Module to encapsulate common Panic behaviors.
+ *      Module to encapsulate common Panic behaviors.
  */
 
 #include <stdio.h>
@@ -60,7 +60,6 @@
    Bool loopOnPanic;
    int coreDumpFlags; /* Memorize for clients without init func */
    PanicBreakAction breakOnPanic; /* XXX: should this be DEVEL only? */
-   char *coreDumpFile;
 } panicState = { TRUE, TRUE }; /* defaults in lieu of Panic_Init() */
 
 
@@ -96,15 +95,15 @@
  *
  * Panic_SetPanicMsgPost --
  *
- *	Allow the Msg_Post() on panic to be suppressed.  If passed FALSE,
- *	then any subsequent Panics will refrain from posting the "VMWARE
- *	Panic:" message.
+ *      Allow the Msg_Post() on panic to be suppressed.  If passed FALSE,
+ *      then any subsequent Panics will refrain from posting the Panic
+ *      message.
  *
  * Results:
- *	void.
+ *      None.
  *
  * Side effects:
- *	Enables/Disables Msg_Post on Panic().
+ *      None.
  *
  *----------------------------------------------------------------------
  */
@@ -120,12 +119,14 @@
  *----------------------------------------------------------------------
  *
  * Panic_GetPanicMsgPost --
- *	Returns panicState.msgPostOnPanic
+ *
+ *      Determines whether to post a message during Panic.
  *
  * Results:
+ *      TRUE iff it's OK to post messages during Panic.
  *
  * Side effects:
- * 	None.
+ *      None.
  *
  *----------------------------------------------------------------------
  */
@@ -445,65 +446,6 @@
 /*
  *-----------------------------------------------------------------------------
  *
- * Panic_SetCoreDumpFileName --
- *
- *    Record the filename of a core dump file so that a subsequent
- *    Panic_PostPanicMsg can mention it by name.
- *
- *    Pass NULL to say there's no core file; pass the empty string to
- *    say there's a core file but you don't know where; pass the name
- *    of the core file if you know it.
- *
- * Results:
- *    void
- *
- * Side effects:
- *    malloc; overwrites panicState.coreDumpFile
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-Panic_SetCoreDumpFileName(const char *fileName)
-{
-   if (panicState.coreDumpFile) {
-      free(panicState.coreDumpFile);
-   }
-
-   if (fileName) {
-      panicState.coreDumpFile = strdup(fileName);
-   } else {
-      panicState.coreDumpFile = NULL;
-   }
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * Panic_GetCoreDumpFileName --
- *
- *    Returns the core dump filename if set.
- *
- * Results:
- *    coredump filename if set, NULL otherwise.
- *
- * Side effects:
- *    None
- *
- *-----------------------------------------------------------------------------
- */
-
-const char *
-Panic_GetCoreDumpFileName(void)
-{
-   return panicState.coreDumpFile;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
  * Panic_Panic --
  *
  *      Panic, possibly core dump
@@ -517,7 +459,7 @@
  *      None.
  *
  * Side effects:
- *	Death.
+ *      Death.
  *
  *-----------------------------------------------------------------------------
  */
@@ -557,9 +499,9 @@
 
    /*
     * Panic loop detection:
-    *	 first time - do the whole report and shutdown sequence
-    *	 second time - log and exit
-    *	 beyond second time - just exit
+    *    first time - do the whole report and shutdown sequence
+    *    second time - log and exit
+    *    beyond second time - just exit
     */
 
    switch (count++) {  // Try HARD to not put code in here!
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/poll/poll.c open-vm-tools-12.2.0/open-vm-tools/lib/poll/poll.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/poll/poll.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/poll/poll.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -442,11 +442,17 @@
  *
  * PollSocketPairPrepare --
  *
- *      Do miscellaneous preparetion for the socket pair before connecting
+ *      Do miscellaneous preparation for the socket pair before connecting
  *
  * Results:
- *      Socket bound to a local address, and another set properly.
- *      TRUE if all preparetion succeed, otherwise FALSE.
+ *      The given 'dst' server socket is bound to (and listening on, if a
+ *      stream socket was requested) the specified 'addr' address, with the
+ *      address updated to contain the actual assigned port number if a
+ *      wildcard port was specified.
+ *
+ *      The given client 'src' socket is set into the specified blocking mode.
+ *
+ *      Returns TRUE if all preparation succeeds, otherwise FALSE.
  *
  * Side effects:
  *      None.
@@ -456,35 +462,35 @@
 
 static Bool
 PollSocketPairPrepare(Bool blocking,           // IN: blocking socket?
-                      SOCKET *src,             // IN: client side socket
+                      SOCKET src,              // IN: client side socket
                       SOCKET dst,              // IN: server side socket
-                      struct sockaddr *addr,   // IN: the address connected to
-                      int addrlen,             // IN: length of struct sockaddr
+                      struct sockaddr *addr,   // IN/OUT: server listener address
+                      int addrlen,             // IN: size of listener address
                       int socketCommType)      // IN: SOCK_STREAM or SOCK_DGRAM?
 {
    if (bind(dst, addr, addrlen) == SOCKET_ERROR) {
-      Log("%s: Could not bind socket %d, error %d.\n",
+      Log("%s: Could not bind dst socket %d, error %d.\n",
           __FUNCTION__, dst, WSAGetLastError());
       return FALSE;
    }
 
    if (!blocking) {
       unsigned long a = 1;
-      if (ioctlsocket(*src, FIONBIO, &a) == SOCKET_ERROR) {
-         Log("%s: Could not make socket %d non-blocking, error %d.\n",
-             __FUNCTION__, *src, WSAGetLastError());
+      if (ioctlsocket(src, FIONBIO, &a) == SOCKET_ERROR) {
+         Log("%s: Could not make src socket %d non-blocking, error %d.\n",
+             __FUNCTION__, src, WSAGetLastError());
          return FALSE;
       }
    }
 
    if (socketCommType == SOCK_STREAM && listen(dst, 1) == SOCKET_ERROR) {
-      Log("%s: Could not listen on a socket %d, error %d.\n",
+      Log("%s: Could not listen on dst socket %d, error %d.\n",
           __FUNCTION__, dst, WSAGetLastError());
       return FALSE;
    }
 
    if (getsockname(dst, addr, &addrlen) == SOCKET_ERROR) {
-      Log("%s: getsockname() failed for socket %d, error %d.\n",
+      Log("%s: getsockname() failed for dst socket %d, error %d.\n",
          __FUNCTION__, dst, WSAGetLastError());
       return FALSE;
    }
@@ -498,7 +504,7 @@
  *
  * PollSocketPairConnect --
  *
- *      Connects a socket to a given address.
+ *      Connects a given socket to a given address.
  *
  * Results:
  *      TRUE if connecting successfully, otherwise FALSE is returned.
@@ -511,21 +517,21 @@
 
 static Bool
 PollSocketPairConnect(Bool blocking,           // IN: blocking socket?
-                      struct sockaddr *addr,   // IN: the address connected to
-                      int addrlen,             // IN: length of struct sockaddr
-                      SOCKET *s,               // IN: connecting socket
+                      struct sockaddr *addr,   // IN: the address to connect to
+                      int addrlen,             // IN: size of 'addr'
+                      SOCKET sock,             // IN: connecting socket
                       SocketSpecialOpts opts)  // IN: socket special options
 {
    if (blocking && (opts & POLL_OPTIONS_SOCKET_PAIR_NONBLOCK_CONN)) {
       /* Change blocking socket to non-blocking socket for timeout */
       unsigned long unblock = 1;
-      if (ioctlsocket(*s, FIONBIO, &unblock) == SOCKET_ERROR) {
+      if (ioctlsocket(sock, FIONBIO, &unblock) == SOCKET_ERROR) {
          Log("%s: Set socket %d to non-blocking mode failed, error %d.\n",
-             __FUNCTION__, *s, WSAGetLastError());
+             __FUNCTION__, sock, WSAGetLastError());
          return FALSE;
       }
 
-      if (connect(*s, addr, addrlen) == SOCKET_ERROR) {
+      if (connect(sock, addr, addrlen) == SOCKET_ERROR) {
          WSAPOLLFD pollFds[1];
          /* wait timeout seconds */
          unsigned int timeout = Preference_GetLong(3,
@@ -534,11 +540,11 @@
          if (ret != WSAEWOULDBLOCK) {
             /* connection failed */
             Log("%s: Non-blocking socket %d could not connect to a local "
-                "socket, error %d.\n", __FUNCTION__, *s, WSAGetLastError());
+                "socket, error %d.\n", __FUNCTION__, sock, WSAGetLastError());
             return FALSE;
          }
 
-         pollFds[0].fd = *s;
+         pollFds[0].fd = sock;
          pollFds[0].events = POLLWRNORM;
          pollFds[0].revents = 0;
 
@@ -548,8 +554,8 @@
             if (ret == 0) {
                 WSASetLastError(WSAETIMEDOUT);
             }
-            Log("%s: Non-blocking socket %d connects to a local socket "
-                "failed, error %d.\n", __FUNCTION__, *s, WSAGetLastError());
+            Log("%s: Non-blocking socket %d connect to listener socket "
+                "failed, error %d.\n", __FUNCTION__, sock, WSAGetLastError());
             return FALSE;
          }
 
@@ -558,31 +564,31 @@
             /* connection failed */
             int error = 0;
             int errLen = sizeof error;
-            getsockopt(*s, SOL_SOCKET, SO_ERROR, (char *)&error, &errLen);
+            getsockopt(sock, SOL_SOCKET, SO_ERROR, (char *)&error, &errLen);
             WSASetLastError(error);
-            Log("%s: Non-blocking socket %d connect to a local socket failed, "
-                "error %d.\n", __FUNCTION__, *s, WSAGetLastError());
+            Log("%s: Non-blocking socket %d connect to listener socket "
+                "failed, error %d.\n", __FUNCTION__, sock, WSAGetLastError());
             return FALSE;
          }
       }
       /* connection successful */
       Log("%s: Non-blocking socket %d connected successfully with "
-          "socket type %d.\n", __FUNCTION__, *s, addr->sa_family);
+          "socket type %d.\n", __FUNCTION__, sock, addr->sa_family);
       unblock = 0;
-      if (ioctlsocket(*s, FIONBIO, &unblock) == SOCKET_ERROR) {
+      if (ioctlsocket(sock, FIONBIO, &unblock) == SOCKET_ERROR) {
          Log("%s: Non-blocking socket %d restored to blocking mode failed, "
-             "error %d.\n", __FUNCTION__, *s, WSAGetLastError());
+             "error %d.\n", __FUNCTION__, sock, WSAGetLastError());
          return FALSE;
       }
-   } else if (connect(*s, addr, addrlen) == SOCKET_ERROR) {
+   } else if (connect(sock, addr, addrlen) == SOCKET_ERROR) {
       if (blocking || WSAGetLastError() != WSAEWOULDBLOCK) {
          Log("%s: socket %d could not connect to a local socket, "
-             "error %d.\n", __FUNCTION__, *s, WSAGetLastError());
+             "error %d.\n", __FUNCTION__, sock, WSAGetLastError());
          return FALSE;
       }
    } else {
-      Log("%s: non-blocking socket %d connected immediately!\n",
-          __FUNCTION__, *s);
+      Log("%s: %s socket %d connected immediately!\n",
+          __FUNCTION__, (blocking ? "Blocking" : "Non-blocking"), sock);
    }
 
    return TRUE;
@@ -639,46 +645,49 @@
                          struct sockaddr *addr,  // IN: the address connected to
                          int addrlen,            // IN: length of struct sockaddr
                          Bool blocking,          // IN: blocking socket?
-                         SOCKET *s,              // OUT: connecting socket
+                         SOCKET *s,              // OUT: connected client socket
                          SocketSpecialOpts opts) // IN: socket special options
 {
-   SOCKET temp = INVALID_SOCKET;
+   SOCKET server = INVALID_SOCKET; // server (listening) socket
 
-   *s = socket(sa_family, socketCommType, 0);
-   if (*s == INVALID_SOCKET) {
-      Log("%s: Could not create socket, socket family: %d.\n", __FUNCTION__,
-          sa_family);
-      goto out;
+   SOCKET client = socket(sa_family, socketCommType, 0);
+   if (client == INVALID_SOCKET) {
+      Log("%s: Could not create client socket, socket family: %d.\n",
+          __FUNCTION__, sa_family);
+      goto outError;
    }
 
-   temp = socket(sa_family, socketCommType, 0);
-   if (temp == INVALID_SOCKET) {
-      PollSocketClose(*s);
-      *s = INVALID_SOCKET;
-      Log("%s: Could not create second socket, socket family: %d.\n",
+   server = socket(sa_family, socketCommType, 0);
+   if (server == INVALID_SOCKET) {
+      Log("%s: Could not create server socket, socket family: %d.\n",
           __FUNCTION__, sa_family);
-      goto out;
+      goto outError;
    }
 
-   if (!PollSocketPairPrepare(blocking, s, temp, addr, addrlen, socketCommType)) {
-      Log("%s: Could not prepare the socket pair for the following "
-          "connecting, socket type: %d, sockets: %d, %d.\n",
-          __FUNCTION__, sa_family, *s, temp);
-      goto outCloseTemp;
+   if (!PollSocketPairPrepare(blocking, client, server, addr, addrlen, socketCommType)) {
+      Log("%s: Could not prepare socket pair for type %d, client %d, "
+          "server %d.\n", __FUNCTION__, sa_family, client, server);
+      goto outError;
    }
 
-   if (!PollSocketPairConnect(blocking, addr, addrlen, s, opts)) {
-      Log("%s: Could not make socket pair connected, socket type: %d, "
-          "sockets: %d, %d.\n", __FUNCTION__, sa_family, *s, temp);
-      goto outCloseTemp;
+   if (!PollSocketPairConnect(blocking, addr, addrlen, client, opts)) {
+      Log("%s: Could not connect socket pair for type %d, client %d, "
+          "server %d.\n", __FUNCTION__, sa_family, client, server);
+      goto outError;
    }
 
-   return temp;
+   *s = client;
+   return server;
 
-outCloseTemp:
-   PollSocketClose(temp);
+outError:
+   if (server != INVALID_SOCKET) {
+      PollSocketClose(server);
+   }
+   if (client != INVALID_SOCKET) {
+      PollSocketClose(client);
+   }
 
-out:
+   *s = INVALID_SOCKET;
    return INVALID_SOCKET;
 }
 
@@ -692,9 +701,12 @@
  *      creates an *IPv4* socket pair.
  *
  * Results:
- *      Socket bound to a local address, and another connecting
- *      to that address.
- *      INVALID_SOCKET on error.  Use WSAGetLastError() for detail.
+ *      On success, returns a listening socket bound to a local address, and
+ *      sets a passed-by-reference argument 's' to a client socket that has
+ *      connected to the listening socket.  The client socket's blocking mode
+ *      is as specified by the 'blocking' argument.
+ *
+ *      Returns INVALID_SOCKET on error.  Use WSAGetLastError() for detail.
  *
  * Side effects:
  *      None.
@@ -732,9 +744,12 @@
  *      creates an *IPv6* socket pair.
  *
  * Results:
- *      Socket bound to a local address, and another connecting
- *      to that address.
- *      INVALID_SOCKET on error.  Use WSAGetLastError() for detail.
+ *      On success, returns a listening socket bound to a local address, and
+ *      sets a passed-by-reference argument 's' to a client socket that has
+ *      connected to the listening socket.  The client socket's blocking mode
+ *      is as specified by the 'blocking' argument.
+ *
+ *      Returns INVALID_SOCKET on error.  Use WSAGetLastError() for detail.
  *
  * Side effects:
  *      None.
@@ -772,9 +787,12 @@
  *      creates a *VMCI* socket pair.
  *
  * Results:
- *      Socket bound to a local address, and another connecting
- *      to that address.
- *      INVALID_SOCKET on error.  Use WSAGetLastError() for detail.
+ *      On success, returns a listening socket bound to a local address, and
+ *      sets a passed-by-reference argument 's' to a client socket that has
+ *      connected to the listening socket.  The client socket's blocking mode
+ *      is as specified by the 'blocking' argument.
+ *
+ *      Returns INVALID_SOCKET on error.  Use WSAGetLastError() for detail.
  *
  * Side effects:
  *      None.
@@ -869,32 +887,33 @@
                 int fds[2],             // OUT: 2 sockets connected to each other
                 SocketSpecialOpts opts) // IN: socket special options
 {
-   SOCKET temp = INVALID_SOCKET;
+   SOCKET server = INVALID_SOCKET;
 
    fds[0] = INVALID_SOCKET;
    fds[1] = INVALID_SOCKET;
 
-   temp = PollSocketPairStartConnecting(vmci, stream, TRUE,
-                                        (SOCKET *)&fds[0], opts);
-   if (temp == INVALID_SOCKET) {
+   server = PollSocketPairStartConnecting(vmci, stream, TRUE,
+                                          (SOCKET *)&fds[0], opts);
+   if (server == INVALID_SOCKET) {
       goto out;
    }
    if (stream) {
-      fds[1] = accept(temp, NULL, NULL);
+      fds[1] = accept(server, NULL, NULL);
       if (fds[1] == INVALID_SOCKET) {
-         Log("%s: Could not accept on a local socket.\n", __FUNCTION__);
+         Log("%s: Could not accept on a server socket %d.\n",
+             __FUNCTION__, server);
          goto out;
       }
-      closesocket(temp);
+      closesocket(server);
    } else {
-      fds[1] = temp;
+      fds[1] = server;
    }
    return 0;
 
 out:
    Warning("%s: Error creating a %s socket pair: %d/%s\n", __FUNCTION__,
            vmci ? "vmci" : "inet", WSAGetLastError(), Err_ErrString());
-   closesocket(temp);
+   closesocket(server);
    closesocket(fds[0]);
    closesocket(fds[1]);
    return SOCKET_ERROR;
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/rpcChannel/simpleSocket.c open-vm-tools-12.2.0/open-vm-tools/lib/rpcChannel/simpleSocket.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/rpcChannel/simpleSocket.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/rpcChannel/simpleSocket.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2013-2017,2019-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2013-2017,2019-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -31,6 +31,7 @@
 #include "simpleSocket.h"
 #include "vmci_defs.h"
 #include "vmci_sockets.h"
+#include "vm_atomic.h"
 #include "dataMap.h"
 #include "err.h"
 #include "debug.h"
@@ -338,6 +339,10 @@
                    ApiError *outApiErr,               // OUT optional
                    int *outSysErr)                    // OUT optional
 {
+#define MAX_ECONNRESET_RETRIES 8
+#define MAX_ENOBUFS_RETRIES    5
+
+   static Atomic_Bool useVsock = { TRUE };
    struct sockaddr_vm addr;
    unsigned int localPort;
    SOCKET fd;
@@ -345,7 +350,8 @@
    ApiError apiErr;
    int vsockDev = -1;
    int family = VMCISock_GetAFValueFd(&vsockDev);
-   int retryCount = 0;
+   int retryCountConnReset = 0;
+   int retryCountNoBufs = 0;
 
    if (family == -1) {
       Warning(LGPFX "Couldn't get VMCI socket family info.");
@@ -380,19 +386,31 @@
       if (fd != INVALID_SOCKET) {
          goto done;
       }
+
       if (apiErr == SOCKERR_BIND && sysErr == SYSERR_EADDRINUSE) {
          --localPort;
          continue; /* Try next port */
       }
-      if (apiErr == SOCKERR_CONNECT && sysErr == SYSERR_ECONNRESET) {
+
+      if (Atomic_ReadBool(&useVsock) &&
+          apiErr == SOCKERR_CONNECT && sysErr == SYSERR_ECONNRESET) {
          /*
           * VMX might be slow releasing a port pair
           * when another client closed the client side end.
           * Simply try next port.
           */
+         if (++retryCountConnReset >= MAX_ECONNRESET_RETRIES) {
+            Warning(LGPFX "Give up after %d connect() retries for ECONNRESET. "
+                          "Check if vmx option guest_rpc.rpci.usevsocket "
+                          "is set to FALSE.\n", MAX_ECONNRESET_RETRIES);
+            Atomic_WriteBool(&useVsock, FALSE);
+            goto done;
+         }
+
          --localPort;
          continue;
       }
+
       if (apiErr == SOCKERR_CONNECT && sysErr == SYSERR_EINTR) {
          /*
           * EINTR on connect due to signal.
@@ -407,9 +425,12 @@
           * Delay a bit and try again using the same port.
           * Have a retry count in case something has gone horribly wrong.
           */
-         if (++retryCount > 5) {
+         if (++retryCountNoBufs >= MAX_ENOBUFS_RETRIES) {
+            Warning(LGPFX "Give up after %d connect() retries for ENOBUFS.\n",
+                    MAX_ENOBUFS_RETRIES);
             goto done;
          }
+
 #ifdef _WIN32
          Sleep(1);
 #else
@@ -417,6 +438,7 @@
 #endif
          continue;
       }
+
       /* Unrecoverable error occurred */
       goto done;
    }
@@ -437,8 +459,13 @@
 
    if (fd != INVALID_SOCKET) {
       Debug(LGPFX "socket %d connected\n", fd);
+      Atomic_WriteBool(&useVsock, TRUE);
    }
+
    return fd;
+
+#undef MAX_ECONNRESET_RETRIES
+#undef MAX_ENOBUFS_RETRIES
 }
 
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/rpcIn/rpcin.c open-vm-tools-12.2.0/open-vm-tools/lib/rpcIn/rpcin.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/rpcIn/rpcin.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/rpcIn/rpcin.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2020, 2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -380,7 +380,7 @@
     * If we called UnregisterCallback on a name that doesn't exist, we
     * have a problem.
     */
-   ASSERT(cur != NULL);
+   VERIFY(cur != NULL);
 
    if (prev == NULL) {
       in->callbacks = cur->next;
@@ -1357,6 +1357,11 @@
    statusStr = status ? "OK " : "ERROR ";
    statusLen = strlen(statusStr);
 
+   /*
+    * Coverity warns that we don't allocate enough space for a null terminator.
+    * A null terminator is not necessary here as we also store the length.
+    */
+   // coverity[alloc_strlen]
    in->last_result = (char *)malloc(statusLen + resultLen);
    if (in->last_result == NULL) {
       *errmsg = "RpcIn: Not enough memory";
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/string/str.c open-vm-tools-12.2.0/open-vm-tools/lib/string/str.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/string/str.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/string/str.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2018, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -67,9 +67,7 @@
  * glibc >= 2.2.  I.e., even though they should be able to work on
  * FreeBSD 5.0+ and Solaris 8+, they aren't made available there.
  */
-#   if !(defined(__linux__) ||                                          \
-         (defined(__FreeBSD__) && (__FreeBSD_version >= 500000)) ||     \
-         defined(sun))
+#   if !(defined(__linux__) || defined(__FreeBSD__) || defined(sun))
 extern int vswprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, va_list args);
 #   endif
 #endif // _WIN32
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/syncDriver/syncDriverLinux.c open-vm-tools-12.2.0/open-vm-tools/lib/syncDriver/syncDriverLinux.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/syncDriver/syncDriverLinux.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/syncDriver/syncDriverLinux.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2011-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 2011-2018, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -32,6 +32,7 @@
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/statfs.h>
 #include "debug.h"
 #include "dynbuf.h"
 #include "syncDriverInt.h"
@@ -43,12 +44,53 @@
 #endif
 
 
+
+typedef struct LinuxFsInfo {
+   int fd;
+   fsid_t fsid;
+} LinuxFsInfo;
+
 typedef struct LinuxDriver {
    SyncHandle  driver;
    size_t      fdCnt;
-   int        *fds;
+   LinuxFsInfo *fds;
 } LinuxDriver;
 
+static
+const fsid_t MISSING_FSID = {};
+
+
+/*
+ *******************************************************************************
+ * LinuxFiFsIdMatch --
+ *
+ * Check the collection of filesystems previously frozen for the specific
+ * FSID.
+ *
+ * @param[in] fds    List of LinuxFsInfo data for filesystems previously
+ *                   frozen.
+ * @param[in] count  Number of fds in the list.
+ * @param[in] nfsid  The Filesystem ID of interest.
+ *
+ * @return TRUE if the FSID matches one previously processed.  Otherwise FALSE
+ *
+ *******************************************************************************
+ */
+
+static Bool
+LinuxFiFsIdMatch(const LinuxFsInfo *fds,
+                 const size_t count,
+                 const fsid_t *nfsid) {
+   size_t i;
+
+   for (i = 0; i < count; i++) {
+      if (fds[i].fsid.__val[0] == nfsid->__val[0] &&
+          fds[i].fsid.__val[1] == nfsid->__val[1]) {
+         return TRUE;
+      }
+   }
+   return FALSE;
+}
 
 /*
  *******************************************************************************
@@ -75,9 +117,11 @@
     * Thaw in the reverse order of freeze
     */
    for (i = sync->fdCnt; i > 0; i--) {
-      Debug(LGPFX "Thawing fd=%d.\n", sync->fds[i-1]);
-      if (ioctl(sync->fds[i-1], FITHAW) == -1) {
-         Debug(LGPFX "Thaw failed for fd=%d.\n", sync->fds[i-1]);
+      int fd = sync->fds[i-1].fd;
+
+      Debug(LGPFX "Thawing fd=%d.\n", fd);
+      if (ioctl(fd, FITHAW) == -1) {
+         Debug(LGPFX "Thaw failed for fd=%d.\n", fd);
          err = SD_ERROR;
       }
    }
@@ -108,8 +152,10 @@
     * Close in the reverse order of open
     */
    for (i = sync->fdCnt; i > 0; i--) {
-      Debug(LGPFX "Closing fd=%d.\n", sync->fds[i-1]);
-      close(sync->fds[i-1]);
+      int fd = sync->fds[i-1].fd;
+
+      Debug(LGPFX "Closing fd=%d.\n", fd);
+      close(fd);
    }
    free(sync->fds);
    free(sync);
@@ -196,8 +242,11 @@
     */
    while (paths != NULL) {
       int fd;
+      LinuxFsInfo fsInfo;
       struct stat sbuf;
+      struct statfs fsbuf;
       const char *path = paths->data;
+
       Debug(LGPFX "opening path '%s'.\n", path);
       paths = g_slist_next(paths);
       fd = open(path, O_RDONLY);
@@ -258,23 +307,53 @@
          continue;
       }
 
+      if (fstatfs(fd, &fsbuf) == 0) {
+         fsInfo.fsid = fsbuf.f_fsid;
+      } else {
+         Debug(LGPFX "failed to get file system id for path '%s'.\n", path);
+         fsInfo.fsid = MISSING_FSID;
+      }
       Debug(LGPFX "freezing path '%s' (fd=%d).\n", path, fd);
       if (ioctl(fd, FIFREEZE) == -1) {
          int ioctlerr = errno;
+
+         close(fd);
+         Debug(LGPFX "freeze on '%s' returned: %d (%s)\n",
+               path, ioctlerr, strerror(ioctlerr));
+         /*
+          * Previously, an EBUSY error was ignored, assuming that we may try
+          * to freeze the same superblock more than once depending on the
+          * OS configuration (e.g., usage of bind mounts).
+          * Using the filesystem Id to check if this is a filesystem that we
+          * have seen previously and will ignore this FD only if that is
+          * the case.  Log a warning otherwise since the quiesced snapshot
+          * attempt will fail.
+          */
+         if (ioctlerr == EBUSY) {
+            if (LinuxFiFsIdMatch(DynBuf_Get(&fds),
+                                 DynBuf_GetSize(&fds),
+                                 &fsInfo.fsid)) {
+               /*
+                * We have previous knowledge of this file system by another
+                * mount point.  Safe to ignore.
+                */
+               Debug(LGPFX "skipping path '%s' - previously frozen", path);
+               continue;
+            }
+            /*
+             * It appears that this FS has been locked or frozen by another
+             * process.  We cannot proceed with the quiesced snapshot request.
+             */
+            Warning(LGPFX "'%s' appears locked or frozen by another process.  "
+                    "Cannot complete the quiesced snapshot request.\n", path);
+         }
          /*
           * If the ioctl does not exist, Linux will return ENOTTY. If it's not
           * supported on the device, we get EOPNOTSUPP. Ignore the latter,
           * since freezing does not make sense for all fs types, and some
           * Linux fs drivers may not have been hooked up in the running kernel.
-          *
-          * Also ignore EBUSY since we may try to freeze the same superblock
-          * more than once depending on the OS configuration (e.g., usage of
-          * bind mounts).
           */
-         close(fd);
-         Debug(LGPFX "freeze on '%s' returned: %d (%s)\n",
-               path, ioctlerr, strerror(ioctlerr));
-         if (ioctlerr != EBUSY && ioctlerr != EOPNOTSUPP) {
+         if (ioctlerr != EOPNOTSUPP) {
             Debug(LGPFX "failed to freeze '%s': %d (%s)\n",
                   path, ioctlerr, strerror(ioctlerr));
             err = first && ioctlerr == ENOTTY ? SD_UNAVAILABLE : SD_ERROR;
@@ -282,7 +361,8 @@
          }
       } else {
          Debug(LGPFX "successfully froze '%s' (fd=%d).\n", path, fd);
-         if (!DynBuf_Append(&fds, &fd, sizeof fd)) {
+         fsInfo.fd = fd;
+         if (!DynBuf_Append(&fds, &fsInfo, sizeof fsInfo)) {
             if (ioctl(fd, FITHAW) == -1) {
                Warning(LGPFX "failed to thaw '%s': %d (%s)\n",
                        path, errno, strerror(errno));
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/vmCheck/vmcheck.c open-vm-tools-12.2.0/open-vm-tools/lib/vmCheck/vmcheck.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/vmCheck/vmcheck.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/vmCheck/vmcheck.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2021, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -144,6 +144,9 @@
 #else
    do {
       int signals[] = {
+#if defined(__FreeBSD__)
+         SIGBUS,
+#endif
          SIGILL,
          SIGSEGV,
       };
diff -Nru open-vm-tools-12.1.5/open-vm-tools/lib/wiper/wiperPosix.c open-vm-tools-12.2.0/open-vm-tools/lib/wiper/wiperPosix.c
--- open-vm-tools-12.1.5/open-vm-tools/lib/wiper/wiperPosix.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/lib/wiper/wiperPosix.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2004-2019, 2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2019, 2021-2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -39,9 +39,9 @@
 # include <sys/ucred.h>
 # include <sys/mount.h>
 # include <fstab.h>
-# if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
-#  include <libgen.h>
-# endif /* __FreeBSD_version >= 500000 */
+#endif
+#if defined(__FreeBSD__)
+#include <libgen.h>
 #endif
 #include <unistd.h>
 
@@ -344,27 +344,6 @@
     * function, as a whole, does not even apply to OS X, so this caveat is
     * only minor.
     */
-#if __FreeBSD_version < 500000
-   /*
-    * Before FreeBSD 5, device nodes had static major/minor numbers.
-    * (FreeBSD 5 included devfs which got rid of this concept.)  So
-    * we'll stat(2) the mount source and test its major numbers
-    * against the values lifted from
-    *   http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/conf/Attic/majors.i386 (rev 1.65)
-    *
-    * Devnode Type      Description                             Major
-    * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    * block             "Winchester" (IDE, ATA, /dev/wd*)       0
-    * character         "                                       3
-    * block             SCSI "direct access" (/dev/da*)         4
-    * character         "                                       13
-    */
-   int maj = major(s->st_rdev);
-   if ((S_ISBLK(s->st_mode) && ((maj == 0) || (maj == 4))) ||
-       (S_ISCHR(s->st_mode) && ((maj == 3) || (maj == 13)))) {
-      retval = TRUE;
-   }
-#else
    /*
     * Begin by testing whether file system source is really a character
     * device node.  (FreeBSD dropped support for block devices long ago.)
@@ -382,7 +361,6 @@
    }
 #undef MASK_ATA_DISK
 #undef MASK_SCSI_DISK
-#endif /* __FreeBSD_version */
 
    return retval;
 }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/libDeployPkg/deployPkgFormat.h open-vm-tools-12.2.0/open-vm-tools/libDeployPkg/deployPkgFormat.h
--- open-vm-tools-12.1.5/open-vm-tools/libDeployPkg/deployPkgFormat.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/libDeployPkg/deployPkgFormat.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,152 +0,0 @@
-/*********************************************************
- * Copyright (C) 2006-2021 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation version 2.1 and no later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
- *
- *********************************************************/
-
-/*
- * deployPkgFormat.h --
- *
- *      A deployment package format used primarily to
- *      upload and install software in a guest OS.
- *
- *      The package can be a file, or a section embedded inside
- *      of another file or raw block device.
- */
-
-#ifndef _DEPLOY_PKG_FORMAT_H_
-#define _DEPLOY_PKG_FORMAT_H_
-
-#define VMWAREDEPLOYPKG_SIGNATURE_LENGTH 16
-#define VMWAREDEPLOYPKG_SIGNATURE "VMWAREDEPLOYPKG_"
-
-#define VMWAREDEPLOYPKG_CMD_LENGTH 456
-#define VMWAREDEPLOYPKG_SEED_LENGTH 8
-
-#define VMWAREDEPLOYPKG_PAYLOAD_TYPE_CAB 0         // cabinet file
-#define VMWAREDEPLOYPKG_PAYLOAD_TYPE_ZIP 1         // zip
-#define VMWAREDEPLOYPKG_PAYLOAD_TYPE_GZIPPED_TAR 2 // tar.gz
-
-// XXX Delete this - it's redundant
-typedef enum {
-   Cabinet,                // cabinet file
-   Zip,
-   GzippedTar              // tar.gz
-} VMwareDeployPkgPayloadType;
-
-#define VMWAREDEPLOYPKG_CURRENT_MAJOR_VERSION 1
-#define VMWAREDEPLOYPKG_CURRENT_MINOR_VERSION 0
-
-#include "vm_basic_types.h"
-
-#define VMWAREDEPLOYPKG_HEADER_FLAGS_NONE 0
-#define VMWAREDEPLOYPKG_HEADER_FLAGS_SKIP_REBOOT 1
-#define VMWAREDEPLOYPKG_HEADER_FLAGS_IGNORE_CLOUD_INIT 2
-#define VMWAREDEPLOYPKG_HEADER_FLAGS_RAW_CLOUD_INIT 4
-
-#ifdef _WIN32
-#include "pshpack4.h" // 4 byte alignment assumed.
-#endif
-
-/*
- * VMware deployment package header. 4 byte alignment assumed.
- * The header size is exactly 512 bytes to make it easier to
- * embed in a disk device, such as a partition.
- *
- * The payload is extracted and expanded into a temporary folder.
- * During expansion, original relative path names are preserved.
- * The specified command is then executed on the host.
- * Its working directory is the extraction folder.
- * The command string may contain OS-specific environment
- * variables.
- * In addition, the variable VMWAREPKGDIR is defined to be
- * the location of the extraction folder.
- *
- * (Request for comment: is VMWAREPKGDIR really necessary?
- *  Remove from spec if not.)
- *
- * The field seed is used by the password obfuscation library to hide details
- * that are required for obfuscating password in the config file.
- *
- * Command string example:
- * deploy.bat -opt1 myfile.exe foo.xml "%WINDIR%\system32"
- *
- * Seed is a piece of information used by the obfuscation code to compute
- * cryptography keys.
- *
- * The extraction folder is deleted after the command returns.
- * A return value of zero indicates successful deployment.
- *
- * Here is the approximate layout. Do not make assumptions about the 
- * exact location and relative position of the individual sections.
- * Use the offset and length fields from the header instead.
- *
- * <pre>
- *
- *         +-------------------------+
- *         |         header          |
- *         +-------------------------+
- *         |         padding         |
- *         +-------------------------+
- *         |        payload          |
- *         +-------------------------+
- *         |      (seed+command)     |
- *         |         padding         |
- *         +-------------------------+
- * </pre>
- */
-
-#pragma pack(push, 1)
-typedef struct {
-   char signature[VMWAREDEPLOYPKG_SIGNATURE_LENGTH]; // Not null terminated.
-   uint8 majorVersion;
-   uint8 minorVersion;
-   uint8 payloadType;
-   uint8 reserved;
-
-   uint16 pkgProcessTimeout; // timeout value for process execution in deployPkg
-
-   /*
-    * Structs are aligned to word length. For 32 bit architecture it is 4 bytes
-    * aligned and for 64 bit it is 8 bytes aligned. Need to make sure package
-    * created in 32 bit architecture can be read correctly in 64 bit architecture
-    * and vice-versa. So when adding or removing fields, a padding field maybe
-    * needed to enable the payload section to start at the same place in both 32
-    * and 64 bit architecture.
-    */
-   uint16 archPadding;   // offset 22
-
-   uint64 pkgLength;     // Total length of package including header, offset 24.
-   uint64 payloadOffset; // Relative to beginning of header, offset 32.
-   uint64 payloadLength; // Length of payload, offset 40.
-
-   /*
-    * Command string and padding, null terminated.
-    * This padding makes the header sector-aligned, making it easier
-    * to embed in disks and disk partitions.
-    * This string may contain OS-specific env variables, e.g. %SYSTEMDRIVE%.
-    */
-
-   char seed[VMWAREDEPLOYPKG_SEED_LENGTH];   // offset 48
-   char command[VMWAREDEPLOYPKG_CMD_LENGTH]; // offset 56
-
-} VMwareDeployPkgHdr;
-#pragma pack(pop)
-
-#ifdef _WIN32
-#include "poppack.h"
-#endif
-
-#endif // _DEPLOY_PKG_FORMAT_H_
diff -Nru open-vm-tools-12.1.5/open-vm-tools/libDeployPkg/linuxDeployment.c open-vm-tools-12.2.0/open-vm-tools/libDeployPkg/linuxDeployment.c
--- open-vm-tools-12.1.5/open-vm-tools/libDeployPkg/linuxDeployment.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/libDeployPkg/linuxDeployment.c	2023-03-07 23:57:07.000000000 +0100
@@ -39,7 +39,7 @@
 #include "str.h"
 
 #include "mspackWrapper.h"
-#include "deployPkgFormat.h"
+#include "deployPkg/deployPkgFormat.h"
 #include "deployPkg/linuxDeployment.h"
 #include "imgcust-common/process.h"
 #include "linuxDeploymentUtilities.h"
diff -Nru open-vm-tools-12.1.5/open-vm-tools/libDeployPkg/Makefile.am open-vm-tools-12.2.0/open-vm-tools/libDeployPkg/Makefile.am
--- open-vm-tools-12.1.5/open-vm-tools/libDeployPkg/Makefile.am	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/libDeployPkg/Makefile.am	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 ################################################################################
-### Copyright (C) 2014-2020 VMware, Inc.  All rights reserved.
+### Copyright (C) 2014-2022 VMware, Inc.  All rights reserved.
 ###
 ### This program is free software; you can redistribute it and/or modify
 ### it under the terms of version 2 of the GNU General Public License as
@@ -28,7 +28,6 @@
 libDeployPkg_la_LIBADD += @VMTOOLS_LIBS@
 
 libDeployPkg_la_SOURCES =
-libDeployPkg_la_SOURCES += deployPkgFormat.h
 libDeployPkg_la_SOURCES += linuxDeployment.c
 libDeployPkg_la_SOURCES += mspackConfig.h
 libDeployPkg_la_SOURCES += mspackWrapper.c
@@ -51,6 +50,7 @@
 libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/imgcust-common/process.h
 libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/vm_basic_types.h
 libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/vmware/tools/guestrpc.h
+libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/deployPkg/deployPkgFormat.h
 libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/deployPkg/linuxDeployment.h
 libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/vmware/guestrpc/deploypkg.h
 libDeployPkg_include_HEADERS += $(top_srcdir)/lib/include/vmware/guestrpc/guestcust-events.h
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_freebsd.h open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_freebsd.h
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_freebsd.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_freebsd.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -53,12 +53,7 @@
  * FreeBSD version 8 and above uses the kproc API instead of the kthread API in its
  * kernel.
  */
-#if __FreeBSD_version > 800001
 #define compat_kthread_create kproc_create
 #define compat_kthread_exit kproc_exit
-#else
-#define compat_kthread_create kthread_create
-#define compat_kthread_exit kthread_exit
-#endif
 
 #endif // __COMPAT_FREEBSD_H__
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_mount.h open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_mount.h
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_mount.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_mount.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2009 VMware, Inc. All rights reserved.
+ * Copyright (C) 2009, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -44,12 +44,7 @@
 #ifndef __COMPAT_MOUNT_H__
 #   define __COMPAT_MOUNT_H__ 1
 
-#if __FreeBSD_version >= 800011
 #define COMPAT_VFS_STATFS(mp, sbp, threadvar) VFS_STATFS((mp), (sbp))
 #define compat_td curthread
-#else
-#define COMPAT_VFS_STATFS(mp, sbp, threadvar) VFS_STATFS((mp), (sbp), (threadvar))
-#define compat_td td
-#endif
 
 #endif
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_priv.h open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_priv.h
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_priv.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_priv.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2009 VMware, Inc. All rights reserved.
+ * Copyright (C) 2009, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -44,10 +44,6 @@
 #ifndef __COMPAT_PRIV_H__
 #   define __COMPAT_PRIV_H__ 1
 
-#if __FreeBSD_version >= 800011
 #define compat_priv_check(td, priv) priv_check((td), (priv))
-#else
-#define compat_priv_check(td, priv) suser(td)
-#endif
 
 #endif
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_vop.h open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_vop.h
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/shared/compat_vop.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/shared/compat_vop.h	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008, 2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008, 2020, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -44,7 +44,6 @@
 #ifndef __COMPAT_VOP_H__
 #   define __COMPAT_VOP_H__ 1
 
-#if __FreeBSD_version >= 800011
 #define COMPAT_THREAD_VAR(varname, varval)
 #define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags))
 #if __FreeBSD_version >= 1300074
@@ -57,29 +56,13 @@
 #define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags))
 #define compat_accmode_t accmode_t
 #define compat_a_accmode a_accmode
-#else
-#define COMPAT_THREAD_VAR(varname, varval) struct thread *varname = varval
-#define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags), (threadvar))
-#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags), (threadvar))
-#define compat_lockstatus(lock, threadvar) lockstatus((lock), (threadvar))
-#define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags), (threadval))
-#define compat_lockmgr(lock, flags, randompointerparam, threadval) lockmgr((lock), (flags), (randompointerparam), (threadval))
-#define compat_accmode_t mode_t
-#define compat_a_accmode a_mode
-#endif
 
 /*
  * We use defines rather than typedefs here to avoid causing problems for files that
  * don't have a vnode_if.h available.
  */
-#if __FreeBSD_version >= 700055
-#   define compat_vop_lock_t vop_lock1_t
-#   define compat_vop_lock_args struct vop_lock1_args
-#   define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock1
-#else
-#   define compat_vop_lock_t vop_lock_t
-#   define compat_vop_lock_args struct vop_lock_args
-#   define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock
-#endif
+#define compat_vop_lock_t vop_lock1_t
+#define compat_vop_lock_args struct vop_lock1_args
+#define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock1
 
 #endif
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/Makefile open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/Makefile
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/Makefile	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/Makefile	2023-03-07 23:57:07.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 ##########################################################
-# Copyright (C) 2006-2018 VMware, Inc. All rights reserved.
+# Copyright (C) 2006-2018, 2023 VMware, Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -46,8 +46,7 @@
 
 KMOD    = vmblock
 PROG    = ../$(KMOD).ko
-NOMAN   = t
-NO_MAN  = t
+MK_MAN  = no
 KLDMOD  = t
 
 VMBLOCK := $(MAINSRCROOT)/modules/vmblock
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/subr.c open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/subr.c
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/subr.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/subr.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /* **********************************************************
- * Copyright 2007-2014 VMware, Inc.  All rights reserved.
+ * Copyright 2007-2014, 2023 VMware, Inc.  All rights reserved.
  * **********************************************************/
 
 /*
@@ -300,7 +300,6 @@
  *-----------------------------------------------------------------------------
  */
 
-#if __FreeBSD_version >= 700055
 static void
 VMBlockInsMntQueDtr(struct vnode *vp, // IN: node to cleanup
 		    void *xp)         // IN: FS private data
@@ -313,7 +312,6 @@
    vgone(vp);
    vput(vp);
 }
-#endif
 
 
 /*
@@ -391,8 +389,13 @@
       panic("VMBlockNodeGet: Passed a NULL vnlock.\n");
    }
 
-   /* Before FreeBSD 7, insmntque was called by getnewvnode. */
-#if __FreeBSD_version >= 700055
+#if __FreeBSD_version >= 1400051
+   error = insmntque1(vp, mp);
+   if (error != 0) {
+      VMBlockInsMntQueDtr(vp, xp);
+      return error;
+   }
+#else
    error = insmntque1(vp, mp, VMBlockInsMntQueDtr, xp);
    if (error != 0) {
       return error;
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/vfsops.c open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/vfsops.c
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/vfsops.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/vfsops.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /* **********************************************************
- * Copyright 2007-2014 VMware, Inc.  All rights reserved.
+ * Copyright 2007-2014, 2023 VMware, Inc.  All rights reserved.
  * **********************************************************/
 
 /*
@@ -110,12 +110,7 @@
  */
 
 static int
-#if __FreeBSD_version >= 800011
 VMBlockVFSMount(struct mount *mp)        // IN: mount(2) parameters
-#else
-VMBlockVFSMount(struct mount *mp,        // IN: mount(2) parameters
-                struct thread *td)       // IN: caller's thread context
-#endif
 {
    struct VMBlockMount *xmp;
    struct nameidata nd, *ndp = &nd;
@@ -171,14 +166,22 @@
     * Find lower node and lock if not already locked.
     */
 
+#if __FreeBSD_version >= 1400043
+   NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target);
+#else
    NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target, compat_td);
+#endif
    error = namei(ndp);
    if (error) {
       NDFREE(ndp, 0);
       uma_zfree(VMBlockPathnameZone, pathname);
       return error;
    }
+#ifdef NDF_ONLY_PNBUF
    NDFREE(ndp, NDF_ONLY_PNBUF);
+#else
+   NDFREE_PNBUF(ndp);
+#endif
 
    /*
     * Check multi VMBlock mount to avoid `lock against myself' panic.
@@ -228,9 +231,6 @@
     */
    MNT_ILOCK(mp);
    mp->mnt_flag |= lowerrootvp->v_mount->mnt_flag & MNT_LOCAL;
-#if __FreeBSD_version >= 600000 && __FreeBSD_version < 1000000
-   mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
-#endif
    MNT_IUNLOCK(mp);
 
    mp->mnt_data = (qaddr_t) xmp;
@@ -262,14 +262,8 @@
  */
 
 static int
-#if __FreeBSD_version >= 800011
 VMBlockVFSUnmount(struct mount *mp,    // IN: filesystem to unmount
                   int mntflags)        // IN: unmount(2) flags (ex: MNT_FORCE)
-#else
-VMBlockVFSUnmount(struct mount *mp,    // IN: filesystem to unmount
-                  int mntflags,        // IN: unmount(2) flags (ex: MNT_FORCE)
-                  struct thread *td)   // IN: caller's kernel thread context
-#endif
 {
    struct VMBlockMount *xmp;
    struct vnode *vp;
@@ -350,16 +344,9 @@
  */
 
 static int
-#if __FreeBSD_version >= 800011
 VMBlockVFSRoot(struct mount *mp,        // IN: vmblock file system
                int flags,               // IN: lockmgr(9) flags
                struct vnode **vpp)      // OUT: root vnode
-#else
-VMBlockVFSRoot(struct mount *mp,        // IN: vmblock file system
-               int flags,               // IN: lockmgr(9) flags
-               struct vnode **vpp,      // OUT: root vnode
-               struct thread *td)       // IN: caller's thread context
-#endif
 {
    struct vnode *vp;
 
@@ -393,14 +380,8 @@
  */
 
 static int
-#if __FreeBSD_version >= 800011
 VMBlockVFSStatFS(struct mount *mp,      // IN: vmblock file system
                  struct statfs *sbp)    // OUT: statfs(2) arg container
-#else
-VMBlockVFSStatFS(struct mount *mp,      // IN: vmblock file system
-                 struct statfs *sbp,    // OUT: statfs(2) arg container
-                 struct thread *td)     // IN: caller's thread context
-#endif
 {
    int error;
    struct statfs mstat;
@@ -448,14 +429,8 @@
  */
 
 static int
-#if __FreeBSD_version >= 800011
 VMBlockVFSSync(struct mount *mp,        // Ignored
                int waitfor)             // Ignored
-#else
-VMBlockVFSSync(struct mount *mp,        // Ignored
-               int waitfor,             // Ignored
-               struct thread *td)       // Ignored
-#endif
 {
    return 0;
 }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/vnops.c open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/vnops.c
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmblock/vnops.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmblock/vnops.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /* **********************************************************
- * Copyright 2007-2014, 2020 VMware, Inc.  All rights reserved.
+ * Copyright 2007-2014, 2020, 2023 VMware, Inc.  All rights reserved.
  * **********************************************************/
 
 /*
@@ -185,9 +185,7 @@
 #include <sys/filedesc.h>
 #include <sys/kdb.h>
 #include "compat_freebsd.h"
-#if __FreeBSD_version >= 700055
 #include <sys/priv.h>
-#endif
 
 #include "vmblock_k.h"
 #include "vmblock.h"
@@ -249,9 +247,7 @@
 struct vop_vector VMBlockVnodeOps = {
    .vop_bypass =                  VMBlockVopBypass,
    .vop_access =                  VMBlockVopAccess,
-#if __FreeBSD_version >= 900013
    .vop_advlockpurge =            vop_stdadvlockpurge,
-#endif
    .vop_bmap =                    VOP_EOPNOTSUPP,
    .vop_getattr =                 VMBlockVopGetAttr,
    .vop_getwritemount =           VMBlockVopGetWriteMount,
@@ -763,11 +759,7 @@
        * because none of the existing privs seemed to match very well.
        */
       if ((retval = compat_priv_check(ap->a_td, PRIV_DRIVER)) == 0) {
-#if __FreeBSD_version >= 700055
          fp = ap->a_fp;
-#else
-         fp = ap->a_td->td_proc->p_fd->fd_ofiles[ap->a_fdidx];
-#endif
          fp->f_ops = &VMBlockFileOps;
       }
    } else {
@@ -1357,9 +1349,6 @@
 */
 {
    struct vnode *vp = ap->a_vp;
-#if __FreeBSD_version < 1000000
-   struct thread *td = ap->a_td;
-#endif
 
    vp->v_object = NULL;
 
@@ -1367,11 +1356,7 @@
     * If this is the last reference, then free up the vnode so as not to
     * tie up the lower vnode.
     */
-#if __FreeBSD_version < 1000000
-    vrecycle(vp, td);
-#else
    vrecycle(vp);
-#endif
    return 0;
 }
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmmemctl/Makefile open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmmemctl/Makefile
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmmemctl/Makefile	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmmemctl/Makefile	2023-03-07 23:57:07.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 ##########################################################
-# Copyright (C) 2007-2018, 2021 VMware, Inc. All rights reserved.
+# Copyright (C) 2007-2018, 2021, 2023 VMware, Inc. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
@@ -35,8 +35,7 @@
 .endif
 KMOD	= vmmemctl
 PROG    = ../$(KMOD).ko
-NOMAN	= t
-NO_MAN  = t
+MK_MAN  = no
 KLDMOD	= t
 
 # Don't print a warning that the object dir wasn't specified
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmmemctl/os.c open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmmemctl/os.c
--- open-vm-tools-12.1.5/open-vm-tools/modules/freebsd/vmmemctl/os.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/freebsd/vmmemctl/os.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2000,2014,2018-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2000,2014,2018-2021,2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -89,59 +89,21 @@
 MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl metadata");
 
 /*
- * FreeBSD version specific MACROS
+ * FreeBSD specific MACROS
  */
-#if __FreeBSD_version >= 900000
-   #define VM_PAGE_LOCK(page) vm_page_lock(page);
-   #define VM_PAGE_UNLOCK(page) vm_page_unlock(page)
-#else
-   #define VM_PAGE_LOCK(page) vm_page_lock_queues()
-   #define VM_PAGE_UNLOCK(page) vm_page_unlock_queues()
-#endif
+#define VM_PAGE_LOCK(page) vm_page_lock(page);
+#define VM_PAGE_UNLOCK(page) vm_page_unlock(page)
 
-#if __FreeBSD_version > 1000029
-   #define VM_OBJ_LOCK(object) VM_OBJECT_WLOCK(object)
-   #define VM_OBJ_UNLOCK(object) VM_OBJECT_WUNLOCK(object);
-#else
-   #define VM_OBJ_LOCK(object) VM_OBJECT_LOCK(object);
-   #define VM_OBJ_UNLOCK(object) VM_OBJECT_UNLOCK(object);
-#endif
+#define VM_OBJ_LOCK(object) VM_OBJECT_WLOCK(object)
+#define VM_OBJ_UNLOCK(object) VM_OBJECT_WUNLOCK(object);
 
-#if __FreeBSD_version < 1100015
-   #define VM_SYS_PAGES cnt.v_page_count
-#else
-   #define VM_SYS_PAGES vm_cnt.v_page_count
-#endif
+#define VM_SYS_PAGES vm_cnt.v_page_count
 
-/*
- * The kmem_malloc() and kmem_free() APIs changed at different times during
- * the FreeBSD 12.0 ALPHA snapshot releases.  The difference in the
- * __FreeBSD_version values for FreeBSD 12.0 in the following macros are
- * consistent with when each API was changed.
- */
-#if __FreeBSD_version < 1000000
-   #define KVA_ALLOC(size) kmem_alloc_nofault(kernel_map, size)
-   #define KVA_FREE(offset, size) kmem_free(kernel_map, offset, size)
-#else
-   #define KVA_ALLOC(size) kva_alloc(size);
-   #define KVA_FREE(offset, size) kva_free(offset, size)
-#endif
+#define KVA_ALLOC(size) kva_alloc(size);
+#define KVA_FREE(offset, size) kva_free(offset, size)
 
-#if __FreeBSD_version < 1000000
-   #define KMEM_ALLOC(size) kmem_alloc(kernel_map, size)
-#elif  __FreeBSD_version < 1200080
-   #define KMEM_ALLOC(size) kmem_malloc(kernel_arena, size, M_WAITOK | M_ZERO)
-#else
-   #define KMEM_ALLOC(size) kmem_malloc(size, M_WAITOK | M_ZERO)
-#endif
-
-#if __FreeBSD_version < 1000000
-   #define KMEM_FREE(offset, size) kmem_free(kernel_map, offset, size)
-#elif __FreeBSD_version < 1200083
-   #define KMEM_FREE(offset, size) kmem_free(kernel_arena, offset, size)
-#else
-   #define KMEM_FREE(offset, size) kmem_free(offset, size)
-#endif
+#define KMEM_ALLOC(size) kmem_malloc(size, M_WAITOK | M_ZERO)
+#define KMEM_FREE(offset, size) kmem_free(offset, size)
 
 /*
  * Globals
diff -Nru open-vm-tools-12.1.5/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h open-vm-tools-12.2.0/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h
--- open-vm-tools-12.1.5/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h	2023-03-07 23:57:07.000000000 +0100
@@ -133,6 +133,7 @@
    VMXNET3_CMD_UPDATE_FEATURE,
    VMXNET3_CMD_STOP_EMULATION,
    VMXNET3_CMD_LOAD_PLUGIN,
+   VMXNET3_CMD_SET_UPT_INTR_AFFINITY = VMXNET3_CMD_LOAD_PLUGIN,
    VMXNET3_CMD_ACTIVATE_VF,
    VMXNET3_CMD_SET_POLLING,
    VMXNET3_CMD_SET_COALESCE,
@@ -378,15 +379,7 @@
    uint8  segCnt;       /* Number of aggregated packets */
    uint8  dupAckCnt;    /* Number of duplicate Acks */
    __le16 tsDelta;      /* TCP timestamp difference */
-
-#ifdef __BIG_ENDIAN_BITFIELD
-   uint32 encap:1;      /* LRO info refers to inner pkt */
-   uint32 reserved:31;
-#else
-   uint32 reserved:31;
-   uint32 encap:1;      /* LRO info refers to inner pkt */
-#endif  /* __BIG_ENDIAN_BITFIELD */
-
+   __le32 dword2;
 #ifdef __BIG_ENDIAN_BITFIELD
    uint32 gen:1;        /* generation bit */
    uint32 type:7;       /* completion type */
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/appInfo/appInfo.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/appInfo/appInfo.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/appInfo/appInfo.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/appInfo/appInfo.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2019-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2019-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -66,9 +66,9 @@
  * Default value for CONFNAME_APPINFO_DISABLED setting in
  * tools configuration file.
  *
- * FALSE will enable the plugin. TRUE will disable the plugin.
+ * FALSE will activate the plugin. TRUE will deactivate the plugin.
  */
-#define APP_INFO_CONF_DEFAULT_DISABLED_VALUE FALSE
+#define APP_INFO_CONF_DEFAULT_DEACTIVATED_VALUE FALSE
 
 /**
  * Default value for CONFNAME_APPINFO_REMOVE_DUPLICATES setting in
@@ -425,12 +425,12 @@
  * Start, stop, reconfigure a AppInfo Gather poll loop.
  *
  * This function is responsible for creating, manipulating, and resetting a
- * AppInfo Gather loop timeout source. The poll loop will be disabled if
+ * AppInfo Gather loop timeout source. The poll loop will be deactivated if
  * the poll interval is 0.
  *
  * @param[in]     ctx           The application context.
  * @param[in]     pollInterval  Poll interval in seconds. A value of 0 will
- *                              disable the loop.
+ *                              deactivate the loop.
  *
  *****************************************************************************
  */
@@ -460,7 +460,7 @@
                                AppInfoGather, ctx, NULL);
       g_source_unref(gAppInfoTimeoutSource);
    } else if (gAppInfoPollInterval > 0) {
-      g_info("%s: Poll loop for %s disabled.\n",
+      g_info("%s: Poll loop for %s deactivated.\n",
              __FUNCTION__, CONFNAME_APPINFO_POLLINTERVAL);
       SetGuestInfo(ctx, APP_INFO_GUESTVAR_KEY, "");
    }
@@ -491,15 +491,15 @@
 TweakGatherLoop(ToolsAppCtx *ctx,  // IN
                 gboolean force)    // IN
 {
-   gboolean disabled =
+   gboolean deactivated =
       VMTools_ConfigGetBoolean(ctx->config,
                                CONFGROUPNAME_APPINFO,
                                CONFNAME_APPINFO_DISABLED,
-                               APP_INFO_CONF_DEFAULT_DISABLED_VALUE);
+                               APP_INFO_CONF_DEFAULT_DEACTIVATED_VALUE);
 
    gint pollInterval;
 
-   if (gAppInfoEnabledInHost && !disabled) {
+   if (gAppInfoEnabledInHost && !deactivated) {
       pollInterval = VMTools_ConfigGetInteger(ctx->config,
                                               CONFGROUPNAME_APPINFO,
                                               CONFNAME_APPINFO_POLLINTERVAL,
@@ -618,7 +618,8 @@
 
       if (retVal) {
          g_info("%s: State of AppInfo is changed to '%s' at host side.\n",
-                __FUNCTION__, gAppInfoEnabledInHost ? "enabled" : "disabled");
+                __FUNCTION__, gAppInfoEnabledInHost ? "enabled" : "deactivated" );
+
          TweakGatherLoop(ctx, TRUE);
       }
    }
@@ -648,7 +649,7 @@
 {
    /*
     * gAppInfoTimeoutSource is used to figure out if the poll loop is
-    * enabled or not. If the poll loop is disabled, then
+    * enabled or not. If the poll loop is deactivated, then
     * gAppInfoTimeoutSource will be set to NULL.
     */
    if (gAppInfoTimeoutSource != NULL) {
@@ -692,7 +693,7 @@
          gAppInfoEnabledInHost = TRUE;
          TweakGatherLoop(ctx, TRUE);
       } else {
-         g_debug("%s: Poll loop disabled. Ignoring.\n", __FUNCTION__);
+         g_debug("%s: Poll loop deactivated. Ignoring.\n", __FUNCTION__);
       }
    }
 }
@@ -721,7 +722,7 @@
    };
 
    /*
-    * Return NULL to disable the plugin if not running in a VMware VM.
+    * Return NULL to deactivate the plugin if not running in a VMware VM.
     */
    if (!ctx->isVMware) {
       g_info("%s: Not running in a VMware VM.\n", __FUNCTION__);
@@ -729,7 +730,7 @@
    }
 
    /*
-    * Return NULL to disable the plugin if not running in vmsvc daemon.
+    * Return NULL to deactivate the plugin if not running in vmsvc daemon.
     */
    if (!TOOLS_IS_MAIN_SERVICE(ctx)) {
       g_info("%s: Not running in vmsvc daemon: container name='%s'.\n",
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/componentMgr/componentMgrInstallAction.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/componentMgr/componentMgrInstallAction.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/componentMgr/componentMgrInstallAction.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/componentMgr/componentMgrInstallAction.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2021-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -21,8 +21,8 @@
  *
  * Functions to manage the known and enabled components by the componentMgr.
  * Consists of functions periodically handling adding/removing of
- * components in the guest OS. Periodically read the guestVar
- * guestinfo./vmware.components.<comp_name>.desiredstate and take present or
+ * components in the guest OS. Periodically read the guestVar:
+ * "guestinfo./vmware.components.<comp_name>.desiredstate" and take present or
  * absent action on the components.
  * Adding/removing a component managed by the plugin is performed
  * asynchronously using Proc_Manager API's.
@@ -811,17 +811,17 @@
       if (components[i].isEnabled) {
          gchar *scriptFullPath;
          /*
-          * We need to check the existence of the script for a particular
-          * component before we begin the preset/absent action on the component.
+          * We need to check the existence of the script for a component before
+          * we begin the present/absent action on the component.
           * Skipping the component if no script is installed.
           */
          scriptFullPath = ComponentMgrGetScriptFullPath(executionScripts[i].scriptName,
                                                         executionScripts[i].componentDirectory);
 
          if (!File_Exists(scriptFullPath)) {
-            g_info("%s: Script file for component %s does not exist "
-                   "under path %s.\n", __FUNCTION__, components[i].name,
-                   scriptFullPath);
+            g_debug("%s: Script file for component %s does not exist "
+                    "under path %s.\n", __FUNCTION__, components[i].name,
+                    scriptFullPath);
             g_free(scriptFullPath);
             components[i].isEnabled = FALSE;
             continue;
@@ -852,11 +852,11 @@
  *****************************************************************************
  * ComponentMgrIncludedComponents --
  *
- * This function checks and validates the comma seperated list fetched from
+ * This function checks and validates the comma separated list fetched from
  * included tools.conf configuration and classifies the first occurrence of
  * all or none which are special values and returns the result.
  *
- * @param[in] componentString Comma seperated string from the included
+ * @param[in] componentString Comma separated string from the included
  *                            tools.conf configuration.
  *
  * @retun
@@ -904,7 +904,7 @@
  *****************************************************************************
  * ComponentMgr_UpdateComponentEnableStatus --
  *
- * This functions reads the comma seperated list of components in the included
+ * This functions reads the comma separated list of components in the included
  * tools.conf configuration and sets the enabled/disabled status for all the
  * components managed by the plugin.
  * It also publishes guestvar guestinfo.vmware.components.available with
@@ -1090,7 +1090,7 @@
  *      None.
  *
  * Side  effects:
- *       Kills the async process runing any action for a component instantly.
+ *       Kills the async process running any action for a component instantly.
  *
  *****************************************************************************
  */
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/componentMgr/svtminion.sh open-vm-tools-12.2.0/open-vm-tools/services/plugins/componentMgr/svtminion.sh
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/componentMgr/svtminion.sh	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/componentMgr/svtminion.sh	2023-03-07 23:57:07.000000000 +0100
@@ -1,6 +1,7 @@
 #!/usr/bin/env bash
 
-# Copyright (c) 2021-2022 VMware, Inc. All rights reserved.
+# Copyright (c) 2021-2023 VMware, Inc.
+# SPDX-License-Identifier: Apache-2
 
 ## Salt VMware Tools Integration script
 ##  integration with Component Manager and GuestStore Helper
@@ -14,7 +15,7 @@
 # using bash for now
 # run this script as root, as needed to run salt
 
-readonly SCRIPT_VERSION='1.3'
+readonly SCRIPT_VERSION='1.4'
 
 # definitions
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/desktopEvents/x11Lock.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/desktopEvents/x11Lock.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/desktopEvents/x11Lock.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/desktopEvents/x11Lock.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2010-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2018,2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -92,7 +92,7 @@
    XStoreName(gdk_x11_get_default_xdisplay(), myGroupLeader, VMUSER_TITLE);
 
    /*
-    * Sanity check:  Set the override redirect property on our group leader
+    * Confidence check:  Set the override redirect property on our group leader
     * window (not default), then re-parent it to the root window (default).
     * This makes sure that (a) a window manager can't re-parent our window,
     * and (b) that we remain a top-level window.
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2005-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2005-2019,2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -324,7 +324,7 @@
  *      Callback for the gtk signal "selection_received".
  *      Called because we previously requested a copy/paste selection and
  *      finally got results of that asynchronous operation. After some basic
- *      sanity checks, send the result (in selection_data) thru the backdoor
+ *      confidence checks, send the result (in selection_data) thru the backdoor
  *      (version 1) or guestRPC (version 2) so the vmx can copy it to host
  *      clipboard.
  *
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2005-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2005-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -133,6 +133,8 @@
    if (!found) {
       rqContext *context;
 
+      /* We're just using the time as a random seed, not as a timestamp. */
+      /* coverity[store_truncates_time_t] */
       context = Random_QuickSeed((unsigned)time(NULL));
 
       for (i = 0; i < 10; i++) {
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/stringxx/string.cc open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/stringxx/string.cc
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/stringxx/string.cc	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/stringxx/string.cc	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2019,2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -400,6 +400,33 @@
    return ubstr_t(GetUtf16Cache());
 }
 
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * utf::string::t_str --
+ *
+ *      Get the TCHAR representation of this string.
+ *
+ * Results:
+ *      The TCHAR representation.
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+const TCHAR*
+string::t_str() const
+{
+#ifdef UNICODE
+   return w_str();
+#else
+   return c_str();
+#endif
+}
+
 #endif
 
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/stringxx/string.hh open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/stringxx/string.hh
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/dndcp/stringxx/string.hh	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/dndcp/stringxx/string.hh	2023-03-07 23:57:07.000000000 +0100
@@ -152,6 +152,9 @@
    const char *c_str() const;
    const utf16_t *w_str() const;
    const Glib::ustring& ustr() const;
+#ifdef _WIN32
+   const TCHAR* t_str() const;
+#endif
 
    // Mapping functions to Glib::ustring
    void swap(string &s);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -2171,7 +2171,7 @@
  *
  ******************************************************************************
  */
-
+#if !defined(USERWORLD)
 static void
 GuestInfoServerIOFreeze(gpointer src,
                         ToolsAppCtx *ctx,
@@ -2180,7 +2180,7 @@
 {
    TweakGatherLoops(ctx, !freeze);
 }
-
+#endif
 
 /*
  ******************************************************************************
@@ -2371,7 +2371,9 @@
       ToolsPluginSignalCb sigs[] = {
          { TOOLS_CORE_SIG_CAPABILITIES, GuestInfoServerSendCaps, NULL },
          { TOOLS_CORE_SIG_CONF_RELOAD, GuestInfoServerConfReload, NULL },
+#if !defined(USERWORLD)
          { TOOLS_CORE_SIG_IO_FREEZE, GuestInfoServerIOFreeze, NULL },
+#endif
          { TOOLS_CORE_SIG_RESET, GuestInfoServerReset, NULL },
          { TOOLS_CORE_SIG_SET_OPTION, GuestInfoServerSetOption, NULL },
          { TOOLS_CORE_SIG_SHUTDOWN, GuestInfoServerShutdown, NULL }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/guestStore/guestStorePlugin.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/guestStore/guestStorePlugin.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/guestStore/guestStorePlugin.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/guestStore/guestStorePlugin.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2019-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2019-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -222,7 +222,7 @@
  *
  * IsFeatureDisabled --
  *
- *      Check if guest admin/root has disabled GuestStore access.
+ *      Check if guest admin/root has deactivated GuestStore access.
  *
  * Results:
  *      Return the configured boolean value, default is FALSE.
@@ -2757,7 +2757,7 @@
    ASSERT(!pluginData.guestStoreAccessEnabled);
 
    if (!CreateVmxListenSocket() || !CreateClientListenSocket()) {
-      g_warning("GuestStore access is disabled "
+      g_warning("GuestStore access is deactivated "
                 "due to initialization error.\n");
       GuestStoreAccessDisable();
       return;
@@ -2816,7 +2816,7 @@
  *
  * GuestStoreShutdown --
  *
- *      Disable GuestStore access before shutdown.
+ *      Deactivate GuestStore access before shutdown.
  *
  * Results:
  *      None
@@ -2934,17 +2934,13 @@
 #endif
    } else if (pluginData.vmxConnectRequested) {
       /*
-       * Closing pluginData.vmxListenSock cancels pending VmxConnectCb() call,
-       * second call of AsyncSocket_ListenVMCI() results in a new vsocket
-       * listening port number.
+       * GuestStoreAccessDisable() closes pluginData.vmxListensock, which
+       * cancels any pending VmxConnectCb() call.
+       * GuestStoreAccessDisable() also calls StopVmxToGuestConnTimeout().
        */
       g_info("Perform tools reset without VMX connection "
              "but VMX connect request was made.\n");
-      GuestStoreAccessDisable(); // Calls StopVmxToGuestConnTimeout()
-      if (pluginData.guestStoreAccessEnabled &&
-          !CheckAndUpdateFeatureDisabled()) {
-         GuestStoreAccessEnable();
-      }
+      GuestStoreAccessDisable();
    }
 }
 
@@ -2957,7 +2953,7 @@
  *      Handle TOOLSOPTION_ENABLE_GUESTSTORE_ACCESS Set_Option callback.
  *
  * Results:
- *      TRUE on success.
+ *      TRUE if action is taken on the signal.
  *
  * Side-effects:
  *      None
@@ -2980,8 +2976,8 @@
 
       if (strcmp(value, "1") == 0 &&
           !pluginData.guestStoreAccessEnabled) {
-         if (CheckAndUpdateFeatureDisabled()) {
-            g_info("GuestStore access is disabled on guest side.\n");
+         if (pluginData.featureDisabled) { // Use cached state here
+            g_info("GuestStore access is deactivated on guest side.\n");
          } else {
             GuestStoreAccessEnable();
             retVal = TRUE;
@@ -3035,7 +3031,7 @@
    };
 
    /*
-    * Return NULL to disable the plugin if not running in vmsvc daemon.
+    * Return NULL to deactivate the plugin if not running in vmsvc daemon.
     */
    if (!TOOLS_IS_MAIN_SERVICE(ctx)) {
       g_info("Not running in vmsvc daemon: container name='%s'.\n",
@@ -3044,7 +3040,7 @@
    }
 
    /*
-    * Return NULL to disable the plugin if not running in a VMware VM.
+    * Return NULL to deactivate the plugin if not running in a VMware VM.
     */
    if (!ctx->isVMware) {
       g_info("Not running in a VMware VM.\n");
@@ -3052,7 +3048,7 @@
    }
 
    /*
-    * Return NULL to disable the plugin if VM is not running on ESX host.
+    * Return NULL to deactivate the plugin if VM is not running on ESX host.
     */
    if (!VmCheck_GetVersion(&vmxVersion, &vmxType) ||
        vmxType != VMX_TYPE_SCALABLE_SERVER) {
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -1090,7 +1090,7 @@
    }
 
    /*
-    * If not running in a VMware VM, return NULL to disable the plugin.
+    * If not running in a VMware VM, return NULL to deactivate the plugin.
     */
    if (!ctx->isVMware) {
       return NULL;
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/Makefile.am open-vm-tools-12.2.0/open-vm-tools/services/plugins/Makefile.am
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/Makefile.am	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/Makefile.am	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 ################################################################################
-### Copyright (c) 2009-2021 VMware, Inc.  All rights reserved.
+### Copyright (c) 2009-2022 VMware, Inc.  All rights reserved.
 ###
 ### This program is free software; you can redistribute it and/or modify
 ### it under the terms of version 2 of the GNU General Public License as
@@ -55,15 +55,20 @@
 SUBDIRS += vix
 SUBDIRS += vmbackup
 
+
 #
 # plugin_LTLIBRARIES causes both .la and .so files to be installed to the
 # plugin directories. Clean up the .la files and keep just the shared
-# libraries around. Sometimes, even though we're passing "-shared" to
+# libraries around. Sometimes, even though we are passing "-shared" to
 # libtool, .a files are also generated, so clean up those too.
 #
+
+STATICLIBS = *.a
+LTLIBS = *.la
+
 install-exec-local:
-	rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/*.a
-	rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/*.la
-	rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/*.a
-	rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/*.la
+	rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/$(STATICLIBS)
+	rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/$(LTLIBS)
+	rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/$(STATICLIBS)
+	rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/$(LTLIBS)
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/powerOps/powerOps.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/powerOps/powerOps.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/powerOps/powerOps.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/powerOps/powerOps.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2016, 2018-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2016, 2018-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -428,8 +428,10 @@
    PowerOpState *state = data->clientData;
 
    if (state->pid != INVALID_PID) {
-      g_debug("State change already in progress.\n");
-      return RPCIN_SETRETVALS(data,  "State change already in progress", FALSE);
+      g_message("State change already in progress: %d, requested = '%s'\n",
+                state->stateChgInProgress,
+                data->name);
+      return RPCIN_SETRETVALS(data, "State change already in progress", FALSE);
    }
 
    g_debug("State change: %s\n", data->name);
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2010-2017,2019-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2017,2019-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -304,7 +304,7 @@
    }
 
    /*
-    * Sanity checks. This should never really happen with current drivers.
+    * Confidence checks. This should never really happen with current drivers.
     */
 
    if (nVMWOutput != info->nOutput) {
@@ -341,7 +341,7 @@
    }
 
    /*
-    * Sanity check. This should never really happen with our drivers.
+    * Confidence check. This should never really happen with our drivers.
     */
 
    if (numVMWCrtc != nVMWOutput) {
@@ -361,17 +361,17 @@
  *
  * RandR12CrtcDisable --
  *
- *      Disable crtcs and associated outputs before an fb size change.
- *      The function disables crtcs and associated outputs
+ *      Deactivate crtcs and associated outputs before an fb size change.
+ *      The function deactivates crtcs and associated outputs
  *      1) whose scanout area is too big for the new fb size.
- *      2) that are going to be disabled with the new topology.
+ *      2) that are going to be deactivated with the new topology.
  *
  * Results:
  *      TRUE on success, FALSE on failure.
  *
  * Side effects:
  *      The RandR12info context is modified.
- *      The current mode of disabled outputs is set to "None".
+ *      The current mode of deactivated outputs is set to "None".
  *
  *-----------------------------------------------------------------------------
  */
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/Makefile.am open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/Makefile.am
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/Makefile.am	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/Makefile.am	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 ################################################################################
-### Copyright (C) 2009-2016 VMware, Inc.  All rights reserved.
+### Copyright (C) 2009-2016, 2022 VMware, Inc.  All rights reserved.
 ###
 ### This program is free software; you can redistribute it and/or modify
 ### it under the terms of version 2 of the GNU General Public License as
@@ -26,6 +26,7 @@
 
 libtimeSync_la_LIBADD =
 libtimeSync_la_LIBADD += @VMTOOLS_LIBS@
+libtimeSync_la_LIBADD += @GOBJECT_LIBS@
 
 libtimeSync_la_SOURCES =
 libtimeSync_la_SOURCES += timeSync.c
@@ -42,5 +43,6 @@
 if LINUX
 libtimeSync_la_SOURCES += slewLinux.c
 libtimeSync_la_SOURCES += pllLinux.c
+libtimeSync_la_SOURCES += timeInfo.c
 endif
 
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/timeInfo.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/timeInfo.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/timeInfo.c	1970-01-01 01:00:00.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/timeInfo.c	2023-03-07 23:57:07.000000000 +0100
@@ -0,0 +1,313 @@
+/*********************************************************
+ * Copyright (C) 2022 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/**
+ * @file timeInfo.c
+ *
+ * The feature allows tools to subscribe and receive updates from VMX when
+ * time related properties of the host change.
+ */
+
+#include "conf.h"
+#include "timeSync.h"
+#include "system.h"
+#include "strutil.h"
+#include "dynarray.h"
+#include "vmware/tools/log.h"
+#include "vmware/tools/plugin.h"
+#include "vmware/tools/threadPool.h"
+
+typedef struct TimeInfoData {
+   char *timestamp;
+   char *key;
+   char *value;
+} TimeInfoData;
+
+DEFINE_DYNARRAY_TYPE(TimeInfoData);
+
+typedef struct TimeInfoVmxRpcCtx {
+   char *request;
+   struct {
+      char *reply;
+      size_t replyLen;
+      TimeInfoDataArray data;
+   } response;
+} TimeInfoVmxRpcCtx;
+
+// TODO: Move common definitions to a shared header with VMX.
+static const char *TIMEINFO_VMXRPC_CLOCKID         = "precisionclock0";
+static const char *TIMEINFO_VMXRPC_CMD_GETUPDATES  = "get-updates";
+static const char *TIMEINFO_VMXRPC_CMD_SUBSCRIBE   = "subscribe";
+static const char *TIMEINFO_VMXRPC_CMD_UNSUBSCRIBE = "unsubscribe";
+static const char *TIMEINFO_VMXRPC_STATUS_OK       = "OK";
+static ToolsAppCtx *gToolsAppCtx;
+
+
+/**
+ * Cleanup routine after performing GuestRPC.
+ *
+ * @param[in] rpc TimeInfo RPC context.
+ */
+
+static void
+TimeInfoVmxRpcDone(TimeInfoVmxRpcCtx *rpc)
+{
+   free(rpc->request);
+   RpcChannel_Free(rpc->response.reply);
+   TimeInfoDataArray_Destroy(&rpc->response.data);
+   memset(rpc, 0, sizeof *rpc);
+}
+
+
+/**
+ * Perform given GuestRPC.
+ *
+ * @param[in] rpc    TimeInfo RPC context
+ * @param[in] method GuestRPC method to invoke.
+ * @param[in] argv   List of arguments to GuestRPC
+ * @param[in] argc   Number of arguments to GuestRPC
+ *
+ * @return TRUE on successful invocation of GuestRPC, FALSE otherwise.
+ */
+
+static gboolean
+TimeInfoVmxRpcDo(TimeInfoVmxRpcCtx *rpc,
+                 const char *method,
+                 const char *argv[],
+                 size_t argc)
+{
+   Bool ok;
+   char *next;
+   int i;
+   char *status;
+
+   memset(rpc, 0, sizeof *rpc);
+   TimeInfoDataArray_Init(&rpc->response.data, 0);
+
+   StrUtil_SafeStrcatF(&rpc->request, "timeInfo.%s", method);
+   for (i = 0; i < argc; ++i) {
+      StrUtil_SafeStrcatF(&rpc->request, " %s", argv[i]);
+   }
+
+   g_debug("%s: Sending RPC: '%s'", __FUNCTION__, rpc->request);
+   ok = RpcChannel_Send(gToolsAppCtx->rpc, rpc->request,
+                        strlen(rpc->request), &rpc->response.reply,
+                        &rpc->response.replyLen);
+   if (!ok) {
+      g_warning("%s: RpcChannel_Send failed.", __FUNCTION__);
+      return FALSE;
+   }
+
+   if (rpc->response.reply == NULL || rpc->response.replyLen == 0) {
+      g_warning("%s: Empty response received from VMX.", __FUNCTION__);
+      return FALSE;
+   }
+   g_debug("%s: RPC response: %s\n", __FUNCTION__, rpc->response.reply);
+
+   next = rpc->response.reply;
+   status = StrUtil_GetNextItem(&next, '\n');
+
+   if (status == NULL || strcmp(status, TIMEINFO_VMXRPC_STATUS_OK) != 0) {
+      g_warning("%s: RPC was unsuccessful.", __FUNCTION__);
+      return FALSE;
+   }
+
+   /* On success, extract payload. */
+   while (next != NULL) {
+      TimeInfoData data;
+      char *line = StrUtil_GetNextItem(&next, '\n');
+      g_debug("%s: > Response: data: %s", __FUNCTION__, VM_SAFE_STR(line));
+      data.key = StrUtil_GetNextItem(&line, ' ');
+      data.value = StrUtil_GetNextItem(&line, ' ');
+      data.timestamp = StrUtil_GetNextItem(&line, '\n');
+      if (data.timestamp == NULL || data.key == NULL || data.value == NULL) {
+         g_warning("%s: Invalid result payload.", __FUNCTION__);
+         return FALSE;
+      }
+      TimeInfoDataArray_Push(&rpc->response.data, data);
+   }
+   return TRUE;
+}
+
+
+/**
+ * Subscribe to TimeInfo updates. If successful, VMX will send UPDATE
+ * GuestRPCs to tools when host's time related properties change.
+ */
+
+static void
+TimeInfoVmxSubscribe(void)
+{
+   TimeInfoVmxRpcCtx vmxRpc;
+   const char *argv[1] = { TIMEINFO_VMXRPC_CLOCKID };
+
+   g_debug("%s: Subscribing for notifications from VMX.", __FUNCTION__);
+   if (!TimeInfoVmxRpcDo(&vmxRpc, TIMEINFO_VMXRPC_CMD_SUBSCRIBE,
+                         argv, ARRAYSIZE(argv))) {
+      g_warning("%s: Failed to subscribe with VMX for notifications.",
+                __FUNCTION__);
+   }
+   TimeInfoVmxRpcDone(&vmxRpc);
+}
+
+
+/**
+ * Unsubscribe from TimeInfo updates. If successful, VMX will no longer
+ * send UPDATE GuestRPC to the tools.
+ */
+
+static void
+TimeInfoVmxUnsubscribe(void)
+{
+   TimeInfoVmxRpcCtx vmxRpc;
+   const char *argv[1] = { TIMEINFO_VMXRPC_CLOCKID };
+
+   g_debug("%s: Unsubscribing from notifications from VMX.", __FUNCTION__);
+   if (!TimeInfoVmxRpcDo(&vmxRpc, TIMEINFO_VMXRPC_CMD_UNSUBSCRIBE,
+                         argv, ARRAYSIZE(argv))) {
+      g_warning("%s: Failed to unsubscribe from VMX notifications.",
+                __FUNCTION__);
+   }
+   TimeInfoVmxRpcDone(&vmxRpc);
+}
+
+
+/**
+ * Fetch TimeInfo updates from the platform with GuestRPC.
+ *
+ * @param[in] vmxRpc TimeInfo VMX RPC context
+ *
+ * @return TRUE on successful invocation of GuestRPC, FALSE otherwise.
+ */
+
+static gboolean
+TimeInfoVmxGetUpdates(TimeInfoVmxRpcCtx *vmxRpc)
+{
+   const char *argv[1] = { TIMEINFO_VMXRPC_CLOCKID };
+
+   g_debug("%s: Fetching updates from VMX.", __FUNCTION__);
+   if (!TimeInfoVmxRpcDo(vmxRpc, TIMEINFO_VMXRPC_CMD_GETUPDATES,
+                             argv, ARRAYSIZE(argv))) {
+      g_warning("%s: Failed to fetch updates.", __FUNCTION__);
+      return FALSE;
+   }
+   return TRUE;
+}
+
+
+/**
+ * Fetch and log TimeInfo updates.
+ */
+
+static void
+TimeInfoGetAndLogUpdates(void)
+{
+   TimeInfoVmxRpcCtx vmxRpc;
+
+   if (TimeInfoVmxGetUpdates(&vmxRpc)) {
+      int i;
+      for (i = 0; i < TimeInfoDataArray_Count(&vmxRpc.response.data); ++i) {
+         const TimeInfoData *data =
+            TimeInfoDataArray_AddressOf(&vmxRpc.response.data, i);
+         g_info("update: key %s value %s time %s", data->key, data->value,
+                data->timestamp);
+      }
+   } else {
+      g_warning("%s: Failed to perform get-updates.", __FUNCTION__);
+   }
+   TimeInfoVmxRpcDone(&vmxRpc);
+}
+
+
+/**
+ * Handler for async task when a TimeInfo update is received. Fetch updates
+ * from the platform and log them.
+ *
+ * @param[in] ctx  The application context.
+ * @param[in] data data pointer.
+ */
+
+static void
+TimeInfoHandleNotificationTask(ToolsAppCtx *ctx, gpointer data)
+{
+   g_debug("%s: Notification received.", __FUNCTION__);
+   TimeInfoGetAndLogUpdates();
+}
+
+
+/**
+ * GuestRPC handler for TimeInfo_Update. Submits an async task to fetch
+ * and log updates.
+ *
+ * @param[in] data RPC request data.
+ *
+ * @return TRUE on success.
+ */
+
+gboolean
+TimeInfo_TcloHandler(RpcInData *data)
+{
+   if (gToolsAppCtx == NULL) {
+      return RPCIN_SETRETVALS(data, "TimeInfo not enabled", FALSE);
+   }
+   ToolsCorePool_SubmitTask(gToolsAppCtx,
+                            TimeInfoHandleNotificationTask,
+                            NULL,
+                            NULL);
+   return RPCIN_SETRETVALS(data, "", TRUE);
+}
+
+
+/**
+ * Initialize TimeInfo in TimeSync.
+ *
+ * @param[in] ctx The application context.
+ */
+
+void
+TimeInfo_Init(ToolsAppCtx *ctx)
+{
+   gboolean timeInfoEnabled =
+      g_key_file_get_boolean(ctx->config,
+                             CONFGROUPNAME_TIMESYNC,
+                             CONFNAME_TIMESYNC_TIMEINFO_ENABLED,
+                             NULL);
+   ASSERT(vmx86_linux);
+   g_debug("%s: TimeInfo support is %senabled.\n",
+           __FUNCTION__, !timeInfoEnabled ? "not " : "");
+   if (timeInfoEnabled) {
+      gToolsAppCtx = ctx;
+      /* Flush initial updates. */
+      TimeInfoGetAndLogUpdates();
+      TimeInfoVmxSubscribe();
+   }
+}
+
+
+/**
+ * Cleans up internal TimeInfo state.
+ */
+
+void
+TimeInfo_Shutdown(void)
+{
+   if (gToolsAppCtx != NULL) {
+      TimeInfoVmxUnsubscribe();
+      gToolsAppCtx = NULL;
+   }
+}
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/timeInfo.h open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/timeInfo.h
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/timeInfo.h	1970-01-01 01:00:00.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/timeInfo.h	2023-03-07 23:57:07.000000000 +0100
@@ -0,0 +1,33 @@
+/*********************************************************
+ * Copyright (C) 2022 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+#ifndef _TIMEINFO_H_
+#define _TIMEINFO_H_
+
+/**
+ * @file timeInfo.h
+ *
+ * Functions and definitions related to TimeInfo.
+ */
+
+void TimeInfo_Init(ToolsAppCtx *ctx);
+void TimeInfo_Shutdown(void);
+gboolean TimeInfo_TcloHandler(RpcInData *data);
+
+#endif /* _TIMEINFO_H_ */
+
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/timeSync.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/timeSync.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/timeSync/timeSync.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/timeSync/timeSync.c	2023-03-07 23:57:07.000000000 +0100
@@ -120,6 +120,7 @@
 #include "vmware/guestrpc/timesync.h"
 #include "vmware/tools/plugin.h"
 #include "vmware/tools/utils.h"
+#include "timeInfo.h"
 
 #if !defined(__APPLE__)
 #include "vm_version.h"
@@ -1017,6 +1018,9 @@
 {
    TimeSyncData *data = plugin->_private;
 
+#if defined(__linux__) && !defined(USERWORLD)
+   TimeInfo_Shutdown();
+#endif
    if (data->state == TIMESYNC_RUNNING) {
       TimeSyncStopLoop(ctx, data);
    }
@@ -1045,7 +1049,10 @@
 
    TimeSyncData *data = g_malloc(sizeof (TimeSyncData));
    RpcChannelCallback rpcs[] = {
-      { TIMESYNC_SYNCHRONIZE, TimeSyncTcloHandler, data, NULL, NULL, 0 }
+      { TIMESYNC_SYNCHRONIZE, TimeSyncTcloHandler, data, NULL, NULL, 0 },
+#if defined(__linux__) && !defined(USERWORLD)
+      { TIMEINFO_UPDATE, TimeInfo_TcloHandler, data, NULL, NULL, 0 }
+#endif
    };
    ToolsPluginSignalCb sigs[] = {
       { TOOLS_CORE_SIG_SET_OPTION, TimeSyncSetOption, &regData },
@@ -1056,6 +1063,9 @@
       { TOOLS_APP_SIGNALS, VMTools_WrapArray(sigs, sizeof *sigs, ARRAYSIZE(sigs)) }
    };
 
+#if defined(__linux__) && !defined(USERWORLD)
+   TimeInfo_Init(ctx);
+#endif
    data->slewActive = FALSE;
    data->slewCorrection = FALSE;
    data->slewPercentCorrection = TIMESYNC_PERCENT_CORRECTION;
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/plugins/vix/vixTools.c open-vm-tools-12.2.0/open-vm-tools/services/plugins/vix/vixTools.c
--- open-vm-tools-12.1.5/open-vm-tools/services/plugins/vix/vixTools.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/plugins/vix/vixTools.c	2023-03-07 23:57:07.000000000 +0100
@@ -1750,7 +1750,7 @@
       goto quit;
    }
 
-   /* sanity check workingDir if set */
+   /* confidence check workingDir if set */
    if (NULL != workingDir && !File_IsDirectory(workingDir)) {
       err = VIX_E_NOT_A_DIRECTORY;
       goto quit;
@@ -2411,7 +2411,7 @@
    spList = startedProcessList;
    while (spList) {
       /*
-       * Sanity check we don't have a duplicate entry -- this should
+       * Confidence check we don't have a duplicate entry -- this should
        * only happen when the OS re-uses the PID before we reap the record
        * of its exit status.
        */
@@ -4983,6 +4983,9 @@
    }
 
    resultBuffer = VixToolsPrintFileExtendedInfoEx(filePathName, filePathName);
+   if (*resultBuffer == '\0') {
+      err = VIX_E_FILE_ACCESS_ERROR;
+   }
 
 quit:
    if (impersonatingVMWareUser) {
@@ -5798,7 +5801,7 @@
          goto quit;
       }
 
-      // sanity check offset
+      // confidence check offset
       if (listRequest->offset > cachedResult->resultBufferLen) {
          /*
           * Since this isn't user-set, assume any problem is in the
@@ -6582,11 +6585,12 @@
    void *userToken = NULL;
    VixMsgListFilesRequest *listRequest = NULL;
    Bool truncated = FALSE;
-   uint64 offset = 0;
+   int offset = 0;
    Bool listingSingleFile = FALSE;
    const char *pattern = NULL;
    int index = 0;
    int maxResults = 0;
+   int maxOffsetResults = 0;
    int count = 0;
    int remaining = 0;
    int numResults;
@@ -6603,9 +6607,58 @@
    }
 
    listRequest = (VixMsgListFilesRequest *) requestMsg;
-   offset = listRequest->offset;
+
+   /*
+    * listRequest->offset is not part of the interface of ListFilesInGuest API,
+    * listRequest->index and listRequest->maxResults are.
+    *
+    * When hostd sees the results from tools are truncated while requesting
+    * maxResults number of file items, hostd issues another Vigor guest OP
+    * ListFiles with same listRequest->index and listRequest->maxResults but
+    * listRequest->offset set to the items number received. Hostd returns to
+    * API client after seeing the results from tools are no longer truncated.
+    *
+    * listRequest->maxResults defaults to 50 in API spec. If a large number is
+    * passed, truncation can happen when maxBufferSize is not big enough for
+    * the results in one Vigor ListFiles call.
+    *
+    * maxBufferSize = GUESTMSG_MAX_IN_SIZE - vixPrefixDataSize
+    *               = 64 * 1024 - 53
+    */
+   if (listRequest->offset >= (uint64)MAX_INT32) {
+      g_warning("%s: Invalid offset value %"FMT64"u\n",
+                __FUNCTION__, listRequest->offset);
+      err = VIX_E_INVALID_ARG;
+      goto quit;
+   }
+
+   offset = (int)listRequest->offset;
    index = listRequest->index;
    maxResults = listRequest->maxResults;
+   /*
+    * bora/vmx/automation/guestOps.c::GuestOpsListFiles() throws
+    * VIX_E_INVALID_ARG if (index < 0) || (maxResults < 0) is TRUE.
+    */
+   ASSERT(offset >= 0 && index >= 0 && maxResults >= 0);
+
+   /*
+    * Do not fail the API if maxResults is 0, instead, return an empty file
+    * list plus the remaining number of files.
+    */
+   if (maxResults > 0) {
+      if (offset >= maxResults) {
+         g_warning("%s: Invalid offset, offset is %d, maxResults is %d\n",
+                   __FUNCTION__, offset, maxResults);
+         err = VIX_E_INVALID_ARG;
+         goto quit;
+      }
+
+      /*
+       * This is the maximum number of results that can be returned
+       * in this call.
+       */
+      maxOffsetResults = maxResults - offset;
+   }
 
    err = VMAutomationRequestParserGetString(&parser,
                                             listRequest->guestPathNameLength,
@@ -6709,45 +6762,63 @@
    lastGoodResultBufferSize = resultBufferSize;
    ASSERT_NOT_IMPLEMENTED(lastGoodResultBufferSize < maxBufferSize);
 
-   for (fileNum = offset + index;
-        fileNum < numFiles;
-        fileNum++) {
-
-      currentFileName = fileNameList[fileNum];
+   /*
+    * If a regex pattern is specified, apply it first. The request index
+    * and offset parameters are referring to the filtered entries.
+    */
+   if (regex) {
+      int newNumFiles = 0;
 
-      if (regex) {
-         if (!g_regex_match(regex, currentFileName, 0, NULL)) {
-            continue;
+      for (fileNum = 0; fileNum < numFiles; fileNum++) {
+         currentFileName = fileNameList[fileNum];
+         fileNameList[fileNum] = NULL;
+         if (g_regex_match(regex, currentFileName, 0, NULL)) {
+            fileNameList[newNumFiles++] = currentFileName;
+         } else {
+            free(currentFileName);
          }
       }
 
-      if (count < maxResults) {
-         count++;
-      } else {
-         remaining++;
-         continue;   // stop computing buffersize
-      }
+      numFiles = newNumFiles;
+   }
 
-      if (listingSingleFile) {
-         resultBufferSize += VixToolsGetFileExtendedInfoLength(currentFileName,
-                                                               currentFileName);
-      } else {
-         pathName = Str_SafeAsprintf(NULL, "%s%s%s", dirPathName, DIRSEPS,
-                                     currentFileName);
-         resultBufferSize += VixToolsGetFileExtendedInfoLength(pathName,
-                                                               currentFileName);
-         free(pathName);
-      }
+   if (maxResults > 0) {
+      for (fileNum = index + offset;
+           fileNum < numFiles;
+           fileNum++) {
 
-      if (resultBufferSize < maxBufferSize) {
-         lastGoodResultBufferSize = resultBufferSize;
-      } else {
-         truncated = TRUE;
-         break;
+         currentFileName = fileNameList[fileNum];
+
+         if (listingSingleFile) {
+            resultBufferSize += VixToolsGetFileExtendedInfoLength(
+                                   currentFileName, currentFileName);
+         } else {
+            pathName = Str_SafeAsprintf(NULL, "%s%s%s", dirPathName, DIRSEPS,
+                                        currentFileName);
+            resultBufferSize += VixToolsGetFileExtendedInfoLength(
+                                pathName, currentFileName);
+            free(pathName);
+         }
+
+         if (resultBufferSize < maxBufferSize) {
+            lastGoodResultBufferSize = resultBufferSize;
+            count++;
+            if (count == maxOffsetResults) {
+               remaining = numFiles - fileNum - 1;
+               break;
+            }
+         } else {
+            truncated = TRUE;
+            remaining = numFiles - fileNum;
+            break;
+         }
       }
+      resultBufferSize = lastGoodResultBufferSize;
+      numResults = count;
+   } else {
+      remaining = (index < numFiles) ? (numFiles - index) : 0;
+      numResults = 0;
    }
-   resultBufferSize = lastGoodResultBufferSize;
-   numResults = count;
 
    /*
     * Print the result buffer.
@@ -6772,19 +6843,12 @@
    destPtr += Str_Sprintf(destPtr, endDestPtr - destPtr,
                           listFilesRemainingFormatString, remaining);
 
-
-   for (fileNum = offset + index, count = 0;
+   for (fileNum = index + offset, count = 0;
         count < numResults;
         fileNum++) {
 
       currentFileName = fileNameList[fileNum];
 
-      if (regex) {
-         if (!g_regex_match(regex, currentFileName, 0, NULL)) {
-            continue;
-         }
-      }
-
       if (listingSingleFile) {
          pathName = Util_SafeStrdup(currentFileName);
       } else {
@@ -6792,12 +6856,15 @@
                                      currentFileName);
       }
 
+      /*
+       * When File_GetSize(pathName) fails, the file is not printed.
+       */
       VixToolsPrintFileExtendedInfo(pathName, currentFileName,
                                     &destPtr, endDestPtr);
 
       free(pathName);
       count++;
-   } // for (fileNum = 0; fileNum < lastGoodNumFiles; fileNum++)
+   }
    *destPtr = '\0';
 
 quit:
@@ -7339,7 +7406,40 @@
    } else if (File_IsDirectory(filePathName)) {
       fileProperties |= VIX_FILE_ATTRIBUTES_DIRECTORY;
    } else if (File_IsFile(filePathName)) {
+      /*
+       * File_GetSize fails and returns -1 when
+       *  - the file does not exist any more
+       *  - the caller has lost permission to access the file
+       *  - the file is exclusively locked at the moment
+       *
+       * The above could happen as a race condition while guest OP
+       * is in progress.
+       */
+#if defined(VMX86_DEBUG)
+      gchar *failThisFile;
+      failThisFile = VMTools_ConfigGetString(gConfDictRef,
+                                             VIX_TOOLS_CONFIG_API_GROUPNAME,
+                                             "failThisFileGetSize",
+                                             NULL);
+      if (g_strcmp0(failThisFile, filePathName) == 0) {
+         g_info("%s: Fail this File_GetSize(%s)...\n",
+                __FUNCTION__, filePathName);
+         fileSize = -1;
+      } else {
+         fileSize = File_GetSize(filePathName);
+      }
+      g_free(failThisFile);
+#else
       fileSize = File_GetSize(filePathName);
+#endif
+      if (fileSize < 0) {
+         g_warning("%s: File_GetSize(%s) returned %"FMT64"d\n",
+                   __FUNCTION__, filePathName, fileSize);
+         /*
+          * Special handling: skip this file item when File_GetSize fails.
+          */
+         return;
+      }
    }
 
 #if !defined(_WIN32)
diff -Nru open-vm-tools-12.1.5/open-vm-tools/services/vmtoolsd/mainLoop.c open-vm-tools-12.2.0/open-vm-tools/services/vmtoolsd/mainLoop.c
--- open-vm-tools-12.1.5/open-vm-tools/services/vmtoolsd/mainLoop.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/services/vmtoolsd/mainLoop.c	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -52,7 +52,7 @@
 #endif
 
 /*
- * guestStoreClient library is needed for both Gueststore based tools upgrade
+ * guestStoreClient library is needed for both GuestStore-based tools upgrade
  * and also for GlobalConfig module.
  */
 #if defined(_WIN32) || defined(GLOBALCONFIG_SUPPORTED)
@@ -137,11 +137,11 @@
    }
 #endif
 
-/*
- * guestStoreClient library is needed for both Gueststore based tools upgrade
- * and also for GlobalConfig module.
- */
 #if defined(_WIN32) || defined(GLOBALCONFIG_SUPPORTED)
+   /*
+    * guestStoreClient library is needed for both GuestStore-based tools
+    * upgrade and also for GlobalConfig module.
+    */
    if (state->mainService && GuestStoreClient_DeInit()) {
       g_info("%s: De-initialized GuestStore client.\n", __FUNCTION__);
    }
@@ -461,11 +461,22 @@
       ToolsCoreReportVersionData(state);
    }
 
-/*
- * guestStoreClient library is needed for both Gueststore based tools upgrade
- * and also for GlobalConfig module.
- */
+#if defined(_WIN32)
+   /*
+    * Call ToolsNotify_Start() to create the global VMToolsNeedReboot event
+    * before loading plugins so that plugins can open the event in their init
+    * routines.
+    */
+   if (state->mainService && ToolsNotify_Start(&state->ctx)) {
+      g_info("%s: Successfully started tools notifications.\n", __FUNCTION__);
+   }
+#endif
+
 #if defined(_WIN32) || defined(GLOBALCONFIG_SUPPORTED)
+   /*
+    * guestStoreClient library is needed for both GuestStore-based tools
+    * upgrade and also for GlobalConfig module.
+    */
    if (state->mainService && GuestStoreClient_Init()) {
       g_info("%s: Initialized GuestStore client.\n", __FUNCTION__);
    }
@@ -541,20 +552,14 @@
        */
       if (state->mainService) {
          if (ToolsCoreHangDetector_Start(&state->ctx)) {
-            g_info("%s: Successfully started tools hang detector",
+            g_info("%s: Successfully started tools hang detector.\n",
                    __FUNCTION__);
          }
-#if defined(_WIN32)
-         if (ToolsNotify_Start(&state->ctx)) {
-            g_info("%s: Successfully started tools notifications",
-                   __FUNCTION__);
-         }
-#endif
       }
 
 #if defined(GLOBALCONFIG_SUPPORTED)
       if (GlobalConfig_Start(&state->ctx)) {
-         g_info("%s: Successfully started global config module.",
+         g_info("%s: Successfully started global config module.\n",
                   __FUNCTION__);
          gGlobalConfStarted = TRUE;
       }
diff -Nru open-vm-tools-12.1.5/open-vm-tools/tests/Makefile.am open-vm-tools-12.2.0/open-vm-tools/tests/Makefile.am
--- open-vm-tools-12.1.5/open-vm-tools/tests/Makefile.am	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/tests/Makefile.am	2023-03-07 23:57:07.000000000 +0100
@@ -1,5 +1,5 @@
 ################################################################################
-### Copyright (C) 2009-2016 VMware, Inc.  All rights reserved.
+### Copyright (c) 2009-2016,2022 VMware, Inc.  All rights reserved.
 ###
 ### This program is free software; you can redistribute it and/or modify
 ### it under the terms of version 2 of the GNU General Public License as
@@ -21,7 +21,12 @@
 SUBDIRS += testPlugin
 SUBDIRS += testVmblock
 
-install-exec-local:
-	rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/*.a
-	rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/*.la
 
+
+
+STATICLIBS = *.a
+LTLIBS     = *.la
+
+install-exec-local:
+	rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/$(STATICLIBS)
+	rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/$(LTLIBS)
diff -Nru open-vm-tools-12.1.5/open-vm-tools/tools.conf open-vm-tools-12.2.0/open-vm-tools/tools.conf
--- open-vm-tools-12.1.5/open-vm-tools/tools.conf	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/tools.conf	2023-03-07 23:57:07.000000000 +0100
@@ -62,7 +62,7 @@
 # vmusr.TMPDIR=/vmware/vmusr/temp
 
 [logging]
-# set to false to disable logging
+# set to false to turn off logging
 #log = true
 
 # Log destinations for various services
@@ -157,7 +157,7 @@
 #vmvss.level = debug
 #vmvss.handler = vmx
 
-# Default 4096, 0=> disable log caching
+# Default 4096, 0=> deactivate log caching
 #maxCacheEntries=4096
 
 
@@ -204,16 +204,16 @@
 
 [guestinfo]
 
-# Set to true to disable the perf monitor.
+# Set to true to deactivate the perf monitor.
 #disable-perf-mon=false
 
-# Set to true to disable DiskInfo.
+# Set to true to deactivate DiskInfo.
 #disable-query-diskinfo=false
 
-# User-defined poll interval in seconds. Set to 0 to disable polling.
+# User-defined poll interval in seconds. Set to 0 to deactivate polling.
 #poll-interval=30
 
-# User-defined stats interval in seconds. Set to 0 to disable stats collection.
+# User-defined stats interval in seconds. Set to 0 to deactivate stats collection.
 #stats-interval=20
 
 # Whether stat results should be written to the log.
@@ -251,9 +251,9 @@
 # to distribute a 'VMware Tools Configuration File' (tools.conf) via the
 # GuestStore for multiple VMs at scale.
 
-# Defines the configuration to enable/disable the GlobalConf module.
-# Set to true to enable the module.
-# Set to false to disable the module. Default false.
+# Defines the configuration to activate/deactivate the GlobalConf module.
+# Set to true to enable(activate) the module.
+# Set to false to deactivate the module. Default false.
 #enabled=false
 
 # Defines a custom GlobalConf poll interval (in seconds).
@@ -273,7 +273,7 @@
 # The plugin polls at regular interval and triggers action add/remove for
 # all the known and enabled components in the componentMgr plugin.
 
-# Default and minimum polling interval in seconds (0 => polling disabled)
+# Default and minimum polling interval in seconds (0 => polling deactivated)
 #poll-interval=180
 
 # Comma separated list of components managed by the plugin. If not specified,
@@ -287,10 +287,10 @@
 
 # This plugin collects info about running applications in guest OS.
 
-# Set to true to disable the appinfo plugin.
+# Set to true to deactivate the appinfo plugin.
 #disabled=false
 
-# User-defined poll interval in seconds. Set to 0 to disable the plugin.
+# User-defined poll interval in seconds. Set to 0 to deactivate the plugin.
 #poll-interval=21600
 
 # For Windows guest, set to true to use WMI for getting the application
@@ -305,7 +305,7 @@
 
 # This plugin collects info about running containers in guest OS.
 
-# User-defined poll interval in seconds. Set to 0 to disable the plugin.
+# User-defined poll interval in seconds. Set to 0 to deactivate the plugin.
 #poll-interval=21600
 
 # Maximum number of containers to be retrieved per namespace.
@@ -330,7 +330,7 @@
 
 # This plugin provides admins with additional info for better VM management.
 
-# Set to true to disable the servicediscovery plugin.
+# Set to true to deactivate the servicediscovery plugin.
 #disabled=false
 
 [unity]
@@ -428,7 +428,7 @@
 
 [guestoperations]
 
-# to disable all guest ops
+# to deactivate all guest ops
 #disabled=false
 
 # Whether to use vgauth for guest op authentication
@@ -452,7 +452,7 @@
 
 [deployPkg]
 
-# to disable guest customization
+# to deactivate guest customization
 #enable-customization=false
 
 # This "wait-cloudinit-timeout" option controls how long does guest
@@ -462,7 +462,7 @@
 # execution done within this option's value in seconds.
 # If cloud-init is still running beyond this option's value in seconds, guest
 # customization will continue executing regardless cloud-init execution status.
-# Minimum valid value is 0 second, set to 0 to disable waiting.
+# Minimum valid value is 0 second, set to 0 to deactivate waiting.
 # Maximum valid value is 1800 seconds (30 minutes).
 # Default value is 30 seconds.
 #wait-cloudinit-timeout=30
@@ -471,7 +471,7 @@
 
 # The carbonblack helper plugin is only available for Windows.
 
-# User-defined poll interval in seconds. Set to 0 to disable polling.
+# User-defined poll interval in seconds. Set to 0 to deactivate polling.
 #poll-interval=60
 
 [gueststoreupgrade]
@@ -480,7 +480,7 @@
 
 # The policy value is one of the settings listed below.
 # off         = no VMware Tools upgrade from GuestStore. Feature is
-#               disabled.
+#               deactivated.
 # manual      = (Default) VMware Tools upgrade from GuestStore is
 #               manually started.
 # powercycle  = VMware Tools upgrade from GuestStore on system
@@ -490,7 +490,7 @@
 
 # Time interval for periodically checking available VMware Tools package
 # version in the GuestStore.
-# User-defined poll interval in seconds. Set to 0 to disable polling.
+# User-defined poll interval in seconds. Set to 0 to deactivate polling.
 # Minimum valid value is 900 seconds (15 minutes)
 # Default value is 3600 seconds (60 minutes)
 #poll-interval=3600
@@ -506,5 +506,5 @@
 
 # The deviceHelper plugin is only available for Windows.
 
-# Set to true to disable the deviceHelper plugin.
+# Set to true to deactivate the deviceHelper plugin.
 #disabled=false
diff -Nru open-vm-tools-12.1.5/open-vm-tools/vgauth/common/vmxrpc.c open-vm-tools-12.2.0/open-vm-tools/vgauth/common/vmxrpc.c
--- open-vm-tools-12.1.5/open-vm-tools/vgauth/common/vmxrpc.c	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/open-vm-tools/vgauth/common/vmxrpc.c	2023-03-07 23:57:07.000000000 +0100
@@ -47,6 +47,14 @@
 #include <assert.h>
 #include <errno.h>
 
+
+/*
+ * Max number of times to try to connect to the VMX if the connection
+ * keeps getting reset.  This can also occur if vsock is disabled for RPCs.
+ * See PR 3048949, PR 728832.
+ */
+#define MAX_CONN_RETRIES 5
+
 /*
  * VMX listening address
  */
@@ -370,6 +378,7 @@
    int errCode;
    unsigned int localPort = PRIVILEGED_PORT_MAX;
    SOCKET fd;
+   int retryCount = 0;
 
 again:
    fd = socket(gAddressFamily, SOCK_STREAM, 0);
@@ -428,14 +437,20 @@
    ret = connect(fd, (struct sockaddr *)&addr, sizeof addr);
    if (ret < 0) {
       errCode = GetSocketErrCode();
-      if (errCode == SYSERR_ECONNRESET) {
+      if (errCode == SYSERR_ECONNRESET && useSecure) {
          /*
           * VMX might be slow releasing a port pair
           * when another client closed the client side end.
-          * Simply try next port.
+          * Try next port.
+          * This can also occur if there's no listen socket in the VMX.
           */
          g_debug("%s: connect() failed with RESET, trying another port\n",
                  __FUNCTION__);
+         if (++retryCount >= MAX_CONN_RETRIES) {
+            g_warning("%s: connect() RESET %d times, giving up\n",
+                      __FUNCTION__, MAX_CONN_RETRIES);
+            goto err;
+         }
          localPort--;
          Socket_Close(fd);
          goto again;
@@ -626,7 +641,7 @@
       fprintf(stderr, "%s: needs an RPC arg\n", argv[0]);
       exit(-1);
    }
-   ret = VMXRPC_SendRpc(argv[1], TRUE, &reply);
+   ret = VMXRPC_SendRpc(argv[1], FALSE, &reply);
    if (ret < 0) {
       fprintf(stderr, "%s: failed to send RPC\n", argv[0]);
       exit(-1);
diff -Nru open-vm-tools-12.1.5/README.md open-vm-tools-12.2.0/README.md
--- open-vm-tools-12.1.5/README.md	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/README.md	2023-03-07 23:57:07.000000000 +0100
@@ -241,3 +241,4 @@
 - Development related questions : open-vm-tools-devel@lists.sourceforge.net
 - Miscellaneous questions: open-vm-tools-discuss@lists.sourceforge.net
 - General project announcements: open-vm-tools-announce@lists.sourceforge.net
+
diff -Nru open-vm-tools-12.1.5/ReleaseNotes.md open-vm-tools-12.2.0/ReleaseNotes.md
--- open-vm-tools-12.1.5/ReleaseNotes.md	2022-11-29 22:17:22.000000000 +0100
+++ open-vm-tools-12.2.0/ReleaseNotes.md	2023-03-07 23:57:07.000000000 +0100
@@ -1,8 +1,8 @@
-#                      open-vm-tools 12.1.5 Release Notes
+#                      open-vm-tools 12.2.0 Release Notes
 
-Updated on: 29th NOV 2022
+Updated on: 7 MAR 2023
 
-open-vm-tools | 29th NOV 2022 | Build 20735119
+open-vm-tools | 7 MAR 2023 | Build 21223074
 
 Check back for additions and updates to these release notes.
 
@@ -20,17 +20,17 @@
 
 ## <a id="whatsnew" name="whatsnew"></a>What's New
 
-There are no new features in the open-vm-tools 12.1.5 release.  This is primarily a maintenance release that addresses a few critical problems.
+There are no new features in the open-vm-tools 12.2.0 release.  This is primarily a maintenance release that addresses a few critical problems.
 
 *   Please see the [Resolved Issues](#resolvedissues) and [Known Issues](#knownissues) sections below.
 
-*   A complete list of the granular changes in the open-vm-tools 12.1.5 release is available at:
+*   A complete list of the granular changes in the open-vm-tools 12.2.0 release is available at:
 
-    [open-vm-tools ChangeLog](https://github.com/vmware/open-vm-tools/blob/stable-12.1.5/open-vm-tools/ChangeLog)
+    [open-vm-tools ChangeLog](https://github.com/vmware/open-vm-tools/blob/stable-12.2.0/open-vm-tools/ChangeLog)
 
 ## <a id="i18n" name="i18n"></a>Internationalization
 
-open-vm-tools 12.1.5 is available in the following languages:
+open-vm-tools 12.2.0 is available in the following languages:
 
 * English
 * French
@@ -42,6 +42,10 @@
 * Simplified Chinese
 * Traditional Chinese
 
+## <a id="guestop" name="guestop"></a>Guest Operating System Customization Support
+
+The [Guest OS Customization Support Matrix](http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf) provides details about the guest operating systems supported for customization.
+
 ## <a id="interop" name="interop"></a>Interoperability Matrix
 
 The [VMware Product Interoperability Matrix](http://partnerweb.vmware.com/comp_guide2/sim/interop_matrix.php) provides details about the compatibility of current and earlier versions of VMware Products. 
@@ -50,21 +54,34 @@
 
 *   **A number of Coverity reported issues have been addressed.**
 
-*   **The deployPkg plugin may prematurely reboot the guest VM before cloud-init has completed user data setup.**
+*   **The vmtoolsd task is blocked in the uninterruptible state while doing a quiesced snapshot.**
+
+    As the ioctl FIFREEZE is done during a quiesced snapshot operation, an EBUSY could be seen because of an attempt to freeze the same superblock more than once depending on the OS configuration (e.g. usage of bind mounts).  An EBUSY could also mean another process has locked or frozen that filesystem.  That later could lead to the vmtoolsd process being blocked and ultimately other processes on the system could be blocked.
+
+    The Linux quiesced snapshot procedure has been updated that when an EBUSY is received, the filesystem FSID is checked against the list of filesystems that have already been quiesced.  If not previously seen, a warning that the filesystem is controlled by another process is logged and the quiesced snapshot request will be rejected.
+
+    This fix to lib/syncDriver/syncDriverLinux.c is directly applicable to previous releases of open-vm-tools and is available at:
+
+        https://github.com/vmware/open-vm-tools/commit/9d458c53a7a656d4d1ba3a28d090cce82ac4af0e
+
+*   **Updated the guestOps to handle some edge cases.**
+
+    When File_GetSize() fails or returns a -1 indicating the user does not have access permissions:
+
+    1. Skip the file in the output of the ListFiles() request.
+    2. Fail an InitiateFileTransferFromGuest operation.
 
-    If both the Perl based Linux customization script and cloud-init run when the guest VM boots, the deployPkg plugin may reboot the guest before cloud-init has finished.  The deployPkg plugin has been updated to wait for a running cloud-init process to finish before the guest VM reboot is initiated.
+*   **The following pull requests and issues have been addressed.**
 
-    This issue is fixed in this release.
+    * Detect the proto files for the containerd grpc client in alternate locations.
 
-*   **A SIGSEGV may be encountered when a non-quiesing snapshot times out.**
+      [Pull request #626](https://github.com/vmware/open-vm-tools/pull/626)
 
-    This issue is fixed in this release.
+    * FreeBSD: Support newer releases and code clean-up for earlier versions.
 
-*   **Unwanted vmtoolsd service error message if not on a VMware hypervisor.**
+      [Pull request #584](https://github.com/vmware/open-vm-tools/pull/584)
 
-    When open-vm-tools comes preinstalled in a base Linux release, the vmtoolsd services are started automatically at system start and desktop login.  If running on physical hardware or in a non-VMware hypervisor, the services will emit an error message to the Systemd's logging service before stopping.
 
-    This issue is fixed in this release.
 
 ## <a id="knownissues" name="knownissues"></a>Known Issues
 

--- End Message ---
--- Begin Message ---
Unblocked, thanks.

--- End Message ---

Reply to: