Re: Proposed remote protocol (XDR source file qemud/remote_protocol.x)

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

 



Richard W.M. Jones wrote:
The only problem area are the upper limits imposed on the lengths of various strings and arrays. The upper limits seem to be required for safely decoding messages from untrusted sources. Some of them however would impose limits on such things as the number of CPUs supported,
and also on number of domains.

/* For each call we may have a 'remote_CALL_args' and 'remote_CALL_ret'
 * type.  These are omitted when they are NULL.

Instead of "NULL" that should read "void".

struct remote_get_max_vcpus_args {
    /* The only backend which supports this call is Xen HV, and
     * there the type is ignored so it could be NULL.
     */
    remote_string type;
};

AFAICS the 'type' parameter to GetMaxVcpus is never used.

struct remote_domain_lookup_by_name_ret {
    /* XXX "Not found" semantic is ill-defined. */
    remote_nonnull_domain dom;
};

There are various of these FooLookupByBar functions and as far as I can see no one has given much thought to a semantic for "Not found" which differs from some other error. Am I missing something?


struct remote_domain_get_info_ret {
    unsigned char state;
    unsigned hyper max_mem;
    unsigned hyper memory;
    unsigned short nr_virt_cpu;
    /* XXX cpu_time is declared as unsigned long long */
    unsigned hyper cpu_time;
};

It wasn't clear if cpu_time, defined as unsigned long long in C, could be larger than 64 bits. XDR supports 64 bits max, so if it is larger we'd need to send _hi and _lo hypers.

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421

Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.
Registered in England and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David
Owens (Ireland)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]