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

Re: [Xen-devel] [PATCH v3 04/24] xen: guestcopy: Provide an helper to safely copy string from guest

>>> On 20.01.15 at 13:45, <julien.grall@xxxxxxxxxx> wrote:
> On 19/01/15 16:51, Jan Beulich wrote:
>>>>> On 13.01.15 at 15:25, <julien.grall@xxxxxxxxxx> wrote:
>>> +void *safe_copy_string_from_guest(XEN_GUEST_HANDLE(char) u_buf,
>>> +                                  size_t size, size_t max_size)
>> Is the "safe_" prefix really meaningful? I.e. is this function more
>> safe than e.g. copy_from_guest()?
> It's safe in the sense, the function adds a NUL to make sure the strings
> is correctly terminated.
> On the first v1, you said that name "copy_string_from_guest" doesn't
> match the behavior of the generic helper [1]. So which name do you
> suggest for this function?

Ah, so the safe_ here follows safe_str{cat,cpy}() - that's fine then
I guess.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.