mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
rpc: Size up RPC limits
Since we are allocating RPC buffer dynamically, we can increase limits for max. size of RPC message and RPC string. This is needed to cover some corner cases where libvirt is run on such huge machines that their capabilities XML is 4 times bigger than our current limit. This leaves users with inability to even connect.
This commit is contained in:
parent
a2c304f687
commit
eb635de1fe
@ -7455,6 +7455,7 @@ error:
|
|||||||
* NB. The remote driver imposes a 64K byte limit on 'size'.
|
* NB. The remote driver imposes a 64K byte limit on 'size'.
|
||||||
* For your program to be able to work reliably over a remote
|
* For your program to be able to work reliably over a remote
|
||||||
* connection you should split large requests to <= 65536 bytes.
|
* connection you should split large requests to <= 65536 bytes.
|
||||||
|
* However, with 0.9.13 this RPC limit has been raised to 1M byte.
|
||||||
*
|
*
|
||||||
* Returns: 0 in case of success or -1 in case of failure.
|
* Returns: 0 in case of success or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
@ -7604,6 +7605,7 @@ error:
|
|||||||
* NB. The remote driver imposes a 64K byte limit on 'size'.
|
* NB. The remote driver imposes a 64K byte limit on 'size'.
|
||||||
* For your program to be able to work reliably over a remote
|
* For your program to be able to work reliably over a remote
|
||||||
* connection you should split large requests to <= 65536 bytes.
|
* connection you should split large requests to <= 65536 bytes.
|
||||||
|
* However, with 0.9.13 this RPC limit has been raised to 1M byte.
|
||||||
*
|
*
|
||||||
* Returns: 0 in case of success or -1 in case of failure.
|
* Returns: 0 in case of success or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
* This is an arbitrary limit designed to stop the decoder from trying
|
* This is an arbitrary limit designed to stop the decoder from trying
|
||||||
* to allocate unbounded amounts of memory when fed with a bad message.
|
* to allocate unbounded amounts of memory when fed with a bad message.
|
||||||
*/
|
*/
|
||||||
const REMOTE_STRING_MAX = 65536;
|
const REMOTE_STRING_MAX = 1048576;
|
||||||
|
|
||||||
/* A long string, which may NOT be NULL. */
|
/* A long string, which may NOT be NULL. */
|
||||||
typedef string remote_nonnull_string<REMOTE_STRING_MAX>;
|
typedef string remote_nonnull_string<REMOTE_STRING_MAX>;
|
||||||
@ -79,7 +79,7 @@ typedef remote_nonnull_string *remote_string;
|
|||||||
const REMOTE_DOMAIN_ID_LIST_MAX = 16384;
|
const REMOTE_DOMAIN_ID_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of domain names. */
|
/* Upper limit on lists of domain names. */
|
||||||
const REMOTE_DOMAIN_NAME_LIST_MAX = 1024;
|
const REMOTE_DOMAIN_NAME_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on cpumap (bytes) passed to virDomainPinVcpu. */
|
/* Upper limit on cpumap (bytes) passed to virDomainPinVcpu. */
|
||||||
const REMOTE_CPUMAP_MAX = 256;
|
const REMOTE_CPUMAP_MAX = 256;
|
||||||
@ -94,25 +94,25 @@ const REMOTE_CPUMAPS_MAX = 16384;
|
|||||||
const REMOTE_MIGRATE_COOKIE_MAX = 16384;
|
const REMOTE_MIGRATE_COOKIE_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of network names. */
|
/* Upper limit on lists of network names. */
|
||||||
const REMOTE_NETWORK_NAME_LIST_MAX = 256;
|
const REMOTE_NETWORK_NAME_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of interface names. */
|
/* Upper limit on lists of interface names. */
|
||||||
const REMOTE_INTERFACE_NAME_LIST_MAX = 256;
|
const REMOTE_INTERFACE_NAME_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of defined interface names. */
|
/* Upper limit on lists of defined interface names. */
|
||||||
const REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX = 256;
|
const REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of storage pool names. */
|
/* Upper limit on lists of storage pool names. */
|
||||||
const REMOTE_STORAGE_POOL_NAME_LIST_MAX = 256;
|
const REMOTE_STORAGE_POOL_NAME_LIST_MAX = 4096;
|
||||||
|
|
||||||
/* Upper limit on lists of storage vol names. */
|
/* Upper limit on lists of storage vol names. */
|
||||||
const REMOTE_STORAGE_VOL_NAME_LIST_MAX = 1024;
|
const REMOTE_STORAGE_VOL_NAME_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of node device names. */
|
/* Upper limit on lists of node device names. */
|
||||||
const REMOTE_NODE_DEVICE_NAME_LIST_MAX = 16384;
|
const REMOTE_NODE_DEVICE_NAME_LIST_MAX = 16384;
|
||||||
|
|
||||||
/* Upper limit on lists of node device capabilities. */
|
/* Upper limit on lists of node device capabilities. */
|
||||||
const REMOTE_NODE_DEVICE_CAPS_LIST_MAX = 16384;
|
const REMOTE_NODE_DEVICE_CAPS_LIST_MAX = 65536;
|
||||||
|
|
||||||
/* Upper limit on lists of network filter names. */
|
/* Upper limit on lists of network filter names. */
|
||||||
const REMOTE_NWFILTER_NAME_LIST_MAX = 1024;
|
const REMOTE_NWFILTER_NAME_LIST_MAX = 1024;
|
||||||
@ -160,13 +160,13 @@ const REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX = 1024;
|
|||||||
* Note applications need to be aware of this limit and issue multiple
|
* Note applications need to be aware of this limit and issue multiple
|
||||||
* requests for large amounts of data.
|
* requests for large amounts of data.
|
||||||
*/
|
*/
|
||||||
const REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX = 65536;
|
const REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX = 1048576;
|
||||||
|
|
||||||
/* Maximum length of a memory peek buffer message.
|
/* Maximum length of a memory peek buffer message.
|
||||||
* Note applications need to be aware of this limit and issue multiple
|
* Note applications need to be aware of this limit and issue multiple
|
||||||
* requests for large amounts of data.
|
* requests for large amounts of data.
|
||||||
*/
|
*/
|
||||||
const REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX = 65536;
|
const REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX = 1048576;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maximum length of a security model field.
|
* Maximum length of a security model field.
|
||||||
|
@ -45,13 +45,13 @@
|
|||||||
/*----- Data types. -----*/
|
/*----- Data types. -----*/
|
||||||
|
|
||||||
/* Maximum total message size (serialised). */
|
/* Maximum total message size (serialised). */
|
||||||
const VIR_NET_MESSAGE_MAX = 262144;
|
const VIR_NET_MESSAGE_MAX = 4194304;
|
||||||
|
|
||||||
/* Size of struct virNetMessageHeader (serialised)*/
|
/* Size of struct virNetMessageHeader (serialised)*/
|
||||||
const VIR_NET_MESSAGE_HEADER_MAX = 24;
|
const VIR_NET_MESSAGE_HEADER_MAX = 24;
|
||||||
|
|
||||||
/* Size of message payload */
|
/* Size of message payload */
|
||||||
const VIR_NET_MESSAGE_PAYLOAD_MAX = 262120;
|
const VIR_NET_MESSAGE_PAYLOAD_MAX = 4194280;
|
||||||
|
|
||||||
/* Size of message length field. Not counted in VIR_NET_MESSAGE_MAX */
|
/* Size of message length field. Not counted in VIR_NET_MESSAGE_MAX */
|
||||||
const VIR_NET_MESSAGE_LEN_MAX = 4;
|
const VIR_NET_MESSAGE_LEN_MAX = 4;
|
||||||
@ -60,7 +60,7 @@ const VIR_NET_MESSAGE_LEN_MAX = 4;
|
|||||||
* This is an arbitrary limit designed to stop the decoder from trying
|
* This is an arbitrary limit designed to stop the decoder from trying
|
||||||
* to allocate unbounded amounts of memory when fed with a bad message.
|
* to allocate unbounded amounts of memory when fed with a bad message.
|
||||||
*/
|
*/
|
||||||
const VIR_NET_MESSAGE_STRING_MAX = 65536;
|
const VIR_NET_MESSAGE_STRING_MAX = 1048576;
|
||||||
|
|
||||||
/* Limit on number of File Descriptors allowed to be
|
/* Limit on number of File Descriptors allowed to be
|
||||||
* passed per message
|
* passed per message
|
||||||
|
Loading…
Reference in New Issue
Block a user