The open source OpenXR runtime

ipc: Increase max message buffer size

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2626>

authored by

Jakob Bornecrantz and committed by
Marge Bot
822e93d6 ff04e8a4

+8 -1
+6
src/xrt/ipc/server/ipc_server_per_client_thread.c
··· 253 253 break; 254 254 } 255 255 256 + // This needs to hold true. 257 + if (cmd_size > IPC_BUF_SIZE) { 258 + IPC_ERROR(ics->server, "Command too large! (%u > %u)", (uint32_t)cmd_size, IPC_BUF_SIZE); 259 + break; 260 + } 261 + 256 262 // Read the whole command now that we know its size 257 263 uint8_t buf[IPC_BUF_SIZE] = {0}; 258 264
+2 -1
src/xrt/ipc/shared/ipc_protocol.h
··· 1 1 // Copyright 2020-2024 Collabora, Ltd. 2 + // Copyright 2025, NVIDIA CORPORATION. 2 3 // SPDX-License-Identifier: BSL-1.0 3 4 /*! 4 5 * @file ··· 31 32 32 33 33 34 #define IPC_CRED_SIZE 1 // auth not implemented 34 - #define IPC_BUF_SIZE 512 // must be >= largest message length in bytes 35 + #define IPC_BUF_SIZE 2048 // must be >= largest message length in bytes 35 36 #define IPC_MAX_VIEWS 8 // max views we will return configs for 36 37 #define IPC_MAX_FORMATS 32 // max formats our server-side compositor supports 37 38 #define IPC_MAX_DEVICES 8 // max number of devices we will map using shared mem