From: Daniel De Graaf Subject: Re: [PATCH v2 02/21] xen: guestcopy: Provide an helper to safely copy string from guest Date: Wed, 06 Aug 2014 12:06:19 -0400 Message-ID: <53E2527B.3080701@tycho.nsa.gov> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-3-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XF3jg-0001ER-0G for xen-devel@lists.xenproject.org; Wed, 06 Aug 2014 16:06:44 +0000 In-Reply-To: <1406818852-31856-3-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall , xen-devel@lists.xenproject.org Cc: Keir Fraser , ian.campbell@citrix.com, tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org On 07/31/2014 11:00 AM, Julien Grall wrote: > Flask code already provides an helper to copy a string from guest. In a later > patch, the new DT hypercalls will need a similar function. > > To avoid code duplication, copy the flask helper (flask_copying_string) to > common code: > - Rename into safe_copy_string_from_guest > - Update arguments. The size provided by the hypercall is unsigned > not signed > - Add comment to explain the extra +1 > > Signed-off-by: Julien Grall > Cc: Daniel De Graaf > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Jan Beulich > Cc: Keir Fraser > Cc: Tim Deegan Acked-by: Daniel De Graaf