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

Re: [Xen-devel] [PATCH v8.1 19/27] xsplice: Add support for alternatives



> >--- a/xen/common/xsplice.c
> >+++ b/xen/common/xsplice.c
> >@@ -533,6 +533,39 @@ static int prepare_payload(struct payload *payload,
>      >}
>  >
>  >#ifndef CONFIG_ARM
> >+    sec = xsplice_elf_sec_by_name(elf, ".altinstructions");
> >+    if ( sec )
> >+    {
> >+        struct alt_instr *a, *start, *end;
> >+
.. snip..
> >+             (sec->sec->sh_size % sizeof(*a)) )
> >+        {
> >+            dprintk(XENLOG_ERR, XSPLICE "%s: Wrong size of .alt_instr 
> >(exp:%lu vs %lu)!\n",
> >+                    elf->name, sizeof(*a),
> 
> sizeof() wants to be formatted with %zu and ...
> 
> >+                    sec->sec->sh_size);
> 
> ... didn't you add an ELF-specific format macro for cases like this?
> 
> Also if you printed the message outside of the conditional, expected and 
> actual
> values would likely disagree anyway (as soon as there are multiple entries), 
> so
> some editing of the text would be nice too.


Why would I want to print the message outside the conditional?
Or did you mean:

             dprintk(XENLOG_ERR, XSPLICE "%s: Size of .alt_instr is not 
multiple of %zu!\n",
                     elf->name, sizeof(*a)); 

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