From: Kruti Pendharkar Date: Wed, 8 Jan 2025 06:05:51 +0000 (-0800) Subject: Change to common source files not applicable to open-vm-tools. X-Git-Tag: stable-13.0.0~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc6ea576ac000232dc0438ead455b266280ffa0f;p=thirdparty%2Fopen-vm-tools.git Change to common source files not applicable to open-vm-tools. --- diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dnd.h b/open-vm-tools/services/plugins/dndcp/dnd/dnd.h index a1bcbb0ff..f6b950351 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dnd.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dnd.h @@ -1,5 +1,6 @@ /********************************************************* - * Copyright (C) 2005-2021 VMware, Inc. All rights reserved. + * Copyright (c) 2005-2024 Broadcom. All Rights Reserved. + * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * * 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 @@ -55,13 +56,9 @@ extern "C" { #define DNDMSG_HEADERSIZE_V3 ((3 * sizeof (uint32)) + (1 * sizeof (uint8))) /* * Hard limits we never want to exceed. The maximum size of a serializied - * DnDMsg. Close to 4M for Workstion/Fusion, 4G for Horzion. + * DnDMsg. Close to 4M for Workstion/Fusion. */ -#ifdef VMX86_HORIZON_VIEW -#define DNDMSG_MAX_ARGSZ (0xffffffff - DNDMSG_HEADERSIZE_V3) -#else #define DNDMSG_MAX_ARGSZ ((1 << 22) - DNDMSG_HEADERSIZE_V3) -#endif /* The maximum number of arguments we can hold */ #define DNDMSG_MAX_ARGS 64 @@ -202,17 +199,8 @@ typedef struct DnDTransportBuffer { } DnDTransportBuffer; #define DND_TRANSPORT_PACKET_HEADER_SIZE (5 * sizeof(uint32)) -#ifdef VMX86_HORIZON_VIEW -/* - * For Horizon DnD, expand the message size to almost 16M, which provides - * better DnD Performance on text/rich text/image etc. dragging and dropping - * per current performance tuning. - */ -#define DND_MAX_TRANSPORT_PACKET_SIZE ((1 << 24) - 100) -#else /* Close to 64k (maximum guestRpc message size). Leave some space for guestRpc header. */ #define DND_MAX_TRANSPORT_PACKET_SIZE ((1 << 16) - 100) -#endif #define DND_MAX_TRANSPORT_PACKET_PAYLOAD_SIZE (DND_MAX_TRANSPORT_PACKET_SIZE - \ DND_TRANSPORT_PACKET_HEADER_SIZE) diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c index 1c6acb68a..70e4c5cad 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c @@ -1,5 +1,6 @@ /********************************************************* - * Copyright (C) 2010-2019 VMware, Inc. All rights reserved. + * Copyright (c) 2010-2024 Broadcom. All Rights Reserved. + * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * * 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 @@ -73,11 +74,9 @@ DnDCPMsgV4IsPacketValid(const uint8 *packet, * * binarySize should be smaller than DND_CP_MSG_MAX_BINARY_SIZE_V4, so that * integer overflow is not possible since DND_CP_MSG_MAX_BINARY_SIZE_V4 * 2 - * is guaranteed to be less than MAX_UINT32. Horizon removes this limitation + * is guaranteed to be less than MAX_UINT32. */ -#ifndef VMX86_HORIZON_VIEW ASSERT_ON_COMPILE(DND_CP_MSG_MAX_BINARY_SIZE_V4 <= MAX_UINT32 / 2); -#endif if (msgHdr->payloadOffset > msgHdr->binarySize || msgHdr->payloadSize > msgHdr->binarySize || msgHdr->payloadOffset + msgHdr->payloadSize > msgHdr->binarySize) { diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h index 8be9fdb84..603bbcb2f 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h @@ -1,5 +1,6 @@ /********************************************************* - * Copyright (C) 2010-2021 VMware, Inc. All rights reserved. + * Copyright (c) 2010-2024 Broadcom. All Rights Reserved. + * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * * 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 @@ -216,16 +217,8 @@ typedef struct DnDCPMsgHdrV4 { #define DND_CP_MSG_HEADERSIZE_V4 (sizeof (DnDCPMsgHdrV4)) #define DND_CP_PACKET_MAX_PAYLOAD_SIZE_V4 (DND_MAX_TRANSPORT_PACKET_SIZE - \ DND_CP_MSG_HEADERSIZE_V4) -#ifdef VMX86_HORIZON_VIEW -/* - * Horizon has no hard limit, but the size field is type of uint32, - * 4G-1(0xffffffff) is the maximum size represented. - */ -#define DND_CP_MSG_MAX_BINARY_SIZE_V4 0xffffffff -#else // Workstation/fusion have hard limit in size(4M) of DnD Msg, refer to dnd.h #define DND_CP_MSG_MAX_BINARY_SIZE_V4 (1 << 22) -#endif /* DnD version 4 message. */ typedef struct DnDCPMsgV4 {