From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Re: [PATCH v1 3/4] XENVER_build_id: Provide ld-embedded build-ids Date: Fri, 9 Oct 2015 13:40:57 +0200 Message-ID: <5617A7C9.6030406@amazon.com> References: <1444359390-14153-1-git-send-email-konrad.wilk@oracle.com> <1444359390-14153-4-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 1ZkW3Q-0001JY-Qa for xen-devel@lists.xenproject.org; Fri, 09 Oct 2015 11:41:40 +0000 In-Reply-To: <1444359390-14153-4-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk , ian.campbell@citrix.com, xen-devel@lists.xenproject.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, andrew.cooper3@citrix.com, mpohlack@amazon.de, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On 09.10.2015 04:56, Konrad Rzeszutek Wilk wrote: > @@ -367,6 +368,35 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg, > if ( copy_to_guest(arg, saved_cmdline, ARRAY_SIZE(saved_cmdline)) ) > return -EFAULT; > return 0; > + > + case XENVER_build_id: > + { > + int rc; > + char *p = NULL; > + unsigned int sz = 0; > + > + if ( guest_handle_is_null(arg) ) > + return -EINVAL; > + > + if ( len == 0 ) > + return -EINVAL; > + > + if ( !guest_handle_okay(arg, len) ) > + return -EINVAL; Shouldn't this return -EFAULT? > + > + rc = xen_build_id(&p, &sz); > + if ( rc ) > + return rc; > + > + if ( sz > len ) > + return -ENOMEM; > + > + if ( copy_to_guest(arg, p, sz) ) > + return -EFAULT; > + > + return sz; > + } > + > } > > return -ENOSYS; Martin Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B