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

Re: [Xen-devel] [PATCH v1 3/4] XENVER_build_id: Provide ld-embedded build-ids



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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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