[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 10/12] livepatch: Handle arbitrary size names with the list operation
On 11/14/19 1:06 PM, Pawel Wieczorkiewicz wrote: > The payloads' name strings can be of arbitrary size (typically small > with an upper bound of XEN_LIVEPATCH_NAME_SIZE). > Current implementation of the list operation interface allows to copy > names in the XEN_LIVEPATCH_NAME_SIZE chunks regardless of its actual > size and enforces space allocation requirements on userland tools. > > To unify and simplify the interface, handle the name strings of > arbitrary size by copying them in adhering chunks to the userland. > In order to let the userland allocate enough space for the incoming > data add an auxiliary interface xc_livepatch_list_get_sizes() that > provides the current number of payload entries and the total size of > all name strings. This is achieved by extending the sysctl list > interface with an extra fields: name_total_size. > > The xc_livepatch_list_get_sizes() issues the livepatch sysctl list > operation with the nr field set to 0. In this mode the operation > returns the number of payload entries and calculates the total sizes > for all payloads' names. > When the sysctl operation is issued with a non-zero nr field (for > instance with a value obtained earlier with the prior call to the > xc_livepatch_list_get_sizes()) the new field name_total_size provides > the total size of actually copied data. > > Extend the libxc to handle the name back-to-back data transfers. > > The xen-livepatch tool is modified to start the list operation with a > call to the xc_livepatch_list_get_sizes() to obtain the actual number > of payloads as well as the necessary space for names. > The tool now always requests the actual number of entries and leaves > the preemption handling to the libxc routine. The libxc still returns > 'done' and 'left' parameters with the same semantic allowing the tool > to detect anomalies and react to them. At the moment it is expected > that the tool receives the exact number of entries as requested. > The xen-livepatch tool has been also modified to handle the name > back-to-back transfers correctly. > > Signed-off-by: Pawel Wieczorkiewicz <wipawel@xxxxxxxxx> > Reviewed-by: Andra-Irina Paraschiv <andraprs@xxxxxxxxxx> > Reviewed-by: Bjoern Doebel <doebel@xxxxxxxxx> > Reviewed-by: Martin Pohlack <mpohlack@xxxxxxxxx> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > --- Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |