]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Mon, 15 Oct 2012 04:51:48 +0000 (21:51 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Fri, 19 Oct 2012 18:32:40 +0000 (11:32 -0700)
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/file/fileTempPosix.c
open-vm-tools/lib/include/backdoor_def.h
open-vm-tools/lib/include/file.h
open-vm-tools/lib/include/loglevel_user.h
open-vm-tools/lib/include/mutexRankLib.h
open-vm-tools/lib/include/vixCommands.h
open-vm-tools/lib/include/vm_basic_types.h
open-vm-tools/lib/include/vm_device_version.h
open-vm-tools/lib/include/win32util.h

index c5bf90fe23ea31adb2d5948a758afa512bab424c..306dee86eced801222d66bf58bb6f588dbc59a25 100644 (file)
@@ -456,9 +456,12 @@ FileCreateSafeTmpDir(uid_t userId,            // IN:
  *
  *      Return a safe temporary directory (i.e. a temporary directory which
  *      is not prone to symlink attacks, because it is only writable by the
- *      current effective user). Guaranteed to return the same directory
- *      every time it is called during the lifetime of the current process
- *      (unless that directory is deleted while the process is running).
+ *      current effective user).
+ *
+ *      Guaranteed to return the same directory every time it is
+ *      called during the lifetime of the current process, for the
+ *      current effective user ID. (Barring the user manually deleting
+ *      or renaming the directory.)
  *
  * Results:
  *      The allocated directory path on success.
index bf4a4e1fe885d76f6619f7133d348d3c1481206c..d564f220854958ba214403b3969a8c8360b7624d 100644 (file)
 #define          BDOOR_CMD_GET_FORCE_X2APIC         76 /* CPL 0 only  */
 #define   BDOOR_CMD_SET_PCI_HOLE             77 /* CPL 0 only  */
 #define   BDOOR_CMD_GET_PCI_HOLE             78 /* CPL 0 only  */
-#define   BDOOR_CMD_MAX                      79
+#define   BDOOR_CMD_GET_PCI_BAR              79 /* CPL 0 only  */
+#define   BDOOR_CMD_MAX                      80
 
 
 /* 
index afd17898f9901016a58828dfbdceecc177649c42..2a60aa3742ad376f944cddfa4aa47b998141073e 100644 (file)
@@ -108,7 +108,10 @@ char *FileMacos_DiskDevToVolumeName(char const *bsdDiskDev);
 
 char *FileMacos_DiskDeviceToUniqueID(char const *bsdPath);
 char *FileMacos_UniqueIDToDiskDevice(char const *identifier);
-
+Bool FileMacOS_MakeSecureLibraryCopies(const char   *inDir,
+                                       const char  **dylibName,
+                                       unsigned      numDylibs,
+                                       char        **outDir);
 #elif defined VMX86_SERVER
 struct FS_PartitionListResult;
 
index c499517dad22c3bb03ce72d0ff7984d49e71a6bc..c9aef27b5effd7b6750a7f792dd75eaa720f55e2 100644 (file)
@@ -87,7 +87,7 @@
    LOGLEVEL_VAR(pci_hyper), \
    LOGLEVEL_VAR(pcibridge), \
    LOGLEVEL_VAR(vide), \
-   LOGLEVEL_VAR(ideCdrom), \
+   LOGLEVEL_VAR(atapiCdrom), \
    LOGLEVEL_VAR(hostonly), \
    LOGLEVEL_VAR(oprom), \
    LOGLEVEL_VAR(http), \
    LOGLEVEL_VAR(buslogic), \
    LOGLEVEL_VAR(lsilogic), \
    LOGLEVEL_VAR(pvscsi), \
+   LOGLEVEL_VAR(ahci), \
    LOGLEVEL_VAR(diskVmnix), \
    LOGLEVEL_VAR(hbaCommon), \
    LOGLEVEL_VAR(backdoor), \
index 04b455f1d2be8df6dd0a74c8239b844c2b07cd39..9bc7edc73c6fe6f5bc149a08728c6ba8609ab691 100644 (file)
  * At least:
  *    impersonate < pollDefault
  *    keyLocator < preference (for checking AESNI)
- *    keyLocator < ssl (bug 743010)
+ *    keyLocator < sslState (bug 743010)
  *    configDb < keyLocator (for unlocking dictionaries)
  *    battery/button < preference
  *    workerLib < something for sure under VThread_Create
  *    licenseCheck < preference
+ *    sslState < getSafeTmpDir
  */
 
 #define RANK_vigorTransportListLock  (RANK_libLockBase + 0x7010)
-#define RANK_getSafeTmpDirLock       (RANK_libLockBase + 0x7020)
 #define RANK_batteryLock             (RANK_libLockBase + 0x7030)
 #define RANK_buttonLock              (RANK_libLockBase + 0x7040)
 #define RANK_impersonateLock         (RANK_libLockBase + 0x7045)
 #define RANK_configDbLock            (RANK_libLockBase + 0x7070)
 #define RANK_keyLocatorLock          (RANK_libLockBase + 0x7080)
 #define RANK_sslStateLock            (RANK_libLockBase + 0x7085)
+#define RANK_getSafeTmpDirLock       (RANK_libLockBase + 0x7086)
 #define RANK_licenseCheckLock        (RANK_libLockBase + 0x7090)
 #define RANK_preferenceLock          (RANK_libLockBase + 0x7100)
 
index e48617f6215b17585faa6a2c5a6fc2fa7da47822..09b6b87059be92d57c46964ca27f6c1801b23b60 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * These describe the format of the message objects.
  * This will change when the client/vmx support different
- * structures for the message header. Hopefully, that won't 
+ * structures for the message header. Hopefully, that won't
  * happen.
  */
 #define VIX_COMMAND_MAGIC_WORD        0xd00d0001
  * These give upper bounds for how big any VIX IPC meesage
  * should be. There are for sanity checks and to ignore maliciously
  * large messages that may be part of an DoS attack. The may need to
- * be revised if large messages are added to the protocol. 
+ * be revised if large messages are added to the protocol.
  */
 
-#define VIX_COMMAND_MAX_SIZE           (16 * 1024 * 1024)  
+#define VIX_COMMAND_MAX_SIZE           (16 * 1024 * 1024)
 #define VIX_COMMAND_MAX_REQUEST_SIZE   65536
 
+/*
+ * We don't want to allow guest ops commands with input size too large.
+ * Limit it to the max request size with enough room for the credentials.
+ * Check bugs 824773, 926819 for more details.
+ */
+#define VIX_COMMAND_MAX_USER_INPUT_SIZE (VIX_COMMAND_MAX_REQUEST_SIZE - 5000)
+
 /*
  * The types of credential we can pass with any request.
  */
index 9c637229e9d473694cc5704301237a2f9f263773..842bb19c24458a4c94f4b313f9bb268c05685d3a 100644 (file)
@@ -809,31 +809,6 @@ typedef void * UserVA;
 #  define UNUSED_VARIABLE(_var) (void)_var
 #endif
 
-/*
- * REGPARM defaults to REGPARM3; i.e., a request that gcc
- * put the first three arguments in registers.  (It is fine
- * if the function has fewer than three arguments.)  Gcc only.
- * Syntactically, put REGPARM where you'd put INLINE or NORETURN.
- *
- * Note that 64-bit code already puts the first six arguments in
- * registers, so these attributes are only useful for 32-bit code.
- */
-
-#if defined(__GNUC__)
-# define REGPARM0 __attribute__((regparm(0)))
-# define REGPARM1 __attribute__((regparm(1)))
-# define REGPARM2 __attribute__((regparm(2)))
-# define REGPARM3 __attribute__((regparm(3)))
-# define REGPARM REGPARM3
-#else
-# define REGPARM0
-# define REGPARM1
-# define REGPARM2
-# define REGPARM3
-# define REGPARM
-#endif
-
-
 /*
  * gcc can warn us if we're ignoring returns
  */
index 26f4b06331e33c1779760d250d3bab55df5248b6..13b631ef60041f2ed46bf1316e9098d9a7bc532d 100644 (file)
@@ -65,7 +65,8 @@
 #define PCI_DEVICE_ID_VMWARE_82546EB            0x0760 /* dual port   */
 #define PCI_DEVICE_ID_VMWARE_EHCI               0x0770
 #define PCI_DEVICE_ID_VMWARE_UHCI               0x0774
-#define PCI_DEVICE_ID_VMWARE_XHCI               0x0778
+#define PCI_DEVICE_ID_VMWARE_XHCI_0096          0x0778
+#define PCI_DEVICE_ID_VMWARE_XHCI_0100          0x0779
 #define PCI_DEVICE_ID_VMWARE_1394               0x0780
 #define PCI_DEVICE_ID_VMWARE_BRIDGE             0x0790
 #define PCI_DEVICE_ID_VMWARE_ROOTPORT           0x07A0
@@ -73,6 +74,7 @@
 #define PCI_DEVICE_ID_VMWARE_VMXWIFI            0x07B8
 #define PCI_DEVICE_ID_VMWARE_PVSCSI             0x07C0
 #define PCI_DEVICE_ID_VMWARE_82574              0x07D0
+#define PCI_DEVICE_ID_VMWARE_AHCI               0x07E0
 #define PCI_DEVICE_ID_VMWARE_HDAUDIO_CODEC      0x1975
 #define PCI_DEVICE_ID_VMWARE_HDAUDIO_CONTROLLER 0x1977
 
 #define PCI_REVISION_NEC_UPD720200      0x03
 #define PCI_FIRMWARE_NEC_UPD720200      0x3015
 
+#define SATA_ID_SERIAL_STR "00000000000000000001"  /* Must be 20 Bytes */
+#define SATA_ID_FIRMWARE_STR  "00000001"    /* Must be 8 Bytes */
+
+#define AHCI_ATA_MODEL_STR PRODUCT_GENERIC_NAME " Virtual SATA Hard Drive"
+#define AHCI_ATAPI_MODEL_STR PRODUCT_GENERIC_NAME " Virtual SATA CDRW Drive"
 
 /************* Strings for IDE Identity Fields **************************/
 #define VIDE_ID_SERIAL_STR     "00000000000000000001"  /* Must be 20 Bytes */
 /************* SATA implementation limits ********************************/
 #define SATA_MAX_CONTROLLERS   4
 #define SATA_MAX_DEVICES       30
+#define AHCI_MIN_PORTS         1
+#define AHCI_MAX_PORTS SATA_MAX_DEVICES
 
 /*
  * VSCSI_BV_INTS is the number of uint32's needed for a bit vector
 #define VSCSI_BV_INTS            CEILING(PVSCSI_MAX_DEVICES, 8 * sizeof (uint32))
 #define SCSI_IDE_CHANNEL         SCSI_MAX_CONTROLLERS
 #define SCSI_IDE_HOSTED_CHANNEL  (SCSI_MAX_CONTROLLERS + 1)
-#define SCSI_MAX_CHANNELS        (SCSI_MAX_CONTROLLERS + 2)
+#define SCSI_SATA_CHANNEL_FIRST  (SCSI_IDE_HOSTED_CHANNEL + 1)
+#define SCSI_MAX_CHANNELS        (SCSI_SATA_CHANNEL_FIRST + SATA_MAX_CONTROLLERS)
+
+/************* SCSI-SATA channel IDs********************************/
+#define SATA_ID_TO_SCSI_ID(sataId)    \
+   (SCSI_SATA_CHANNEL_FIRST + (sataId))
+
+#define SCSI_ID_TO_SATA_ID(scsiId)    \
+   ((scsiId) - SCSI_SATA_CHANNEL_FIRST)
 
 /************* Strings for the VESA BIOS Identity Fields *****************/
 #define VBE_OEM_STRING COMPANY_NAME " SVGA"
 #define MAX_FLOPPY_DRIVES      2
 
 /************* PCI Passthrough implementation limits ********************/
-#define MAX_PCI_PASSTHRU_DEVICES 6
+#define MAX_PCI_PASSTHRU_DEVICES 16
 
 /************* Test device implementation limits ********************/
-#define MAX_PCI_TEST_DEVICES 2
+#define MAX_PCI_TEST_DEVICES 16
 
 /************* USB implementation limits ********************************/
 #define MAX_USB_DEVICES_PER_HOST_CONTROLLER 127
index ea04c1fc88d180c44132f5a4aefd86806e85adbf..c1a99a17d0ff35168613e31047e63feeafe169da 100644 (file)
@@ -29,6 +29,7 @@
 #include "includeCheck.h"
 
 #include "vm_basic_types.h"
+#include "vm_atomic.h"
 #include "unicodeTypes.h"
 
 #ifdef _WIN32
@@ -233,5 +234,7 @@ Bool W32Util_CloseDismountHandle(void *handle);
 
 Bool W32Util_EnableSafePathSearching(void);
 
+CRITICAL_SECTION *W32Util_GetSingletonCriticalSection(Atomic_Ptr *csMemory);
+
 #endif // _WIN32
 #endif // WIN32UTIL_H_