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

Re: [Xen-devel] [PATCH v1 01/11] xsplice: Design document (v2).



On 03.11.2015 19:15, Ross Lagerwall wrote:
[...]
> +struct xen_sysctl_xsplice_summary {  
> +    xen_xsplice_id_t    id;         /* IN, the name of the payload. */  

I still feel a bit confused about the ID vs. name thingy.  IMHO, each
payload should have a name (easily readable by a human, like
"xsa-148-xpatch") and an ID (to safely address it, like
sha1(payload)).

Here the variable is called id but described as name.

The definition of id contains a member called name again:

/*
 * Structure describing an ELF payload. Uniquely identifies the
 * payload. Should be human readable.
 * Recommended length is XEN_XSPLICE_NAME_SIZE.
 */
#define XEN_XSPLICE_NAME_SIZE 128
struct xen_xsplice_id {
    XEN_GUEST_HANDLE_64(char) name;         /* IN: pointer to name. */
    uint32_t    size;                       /* IN: size of name. May be upto
                                               XEN_XSPLICE_NAME_SIZE. */
    uint32_t    pad;                        /* IN: MUST be zero. */
};

If this thing is supposed to carry something like a build_id we should
call it such through out.  If it is supposed to carry a human readable
name, let's call it name throughout.

> sgrep xen_xsplice_id_t
./tools/include/xen/sysctl.h:806:    xen_xsplice_id_t id;                    /* 
IN, name of the patch. */
./tools/include/xen/sysctl.h:838:    xen_xsplice_id_t id;                  /* 
IN, name of the payload. */
./tools/include/xen/sysctl.h:899:    xen_xsplice_id_t id;                    /* 
IN, name of the patch. */


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®.