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

Re: [Xen-devel] [PATCH v8.1 12/27] xsplice: Implement support for applying/reverting/replacing patches.



>>> On 21.04.16 at 02:28, <konrad.wilk@xxxxxxxxxx> wrote:
>> >+    ASSERT(sec);
>> >+    if ( sec->sec->sh_size % sizeof(*payload->funcs) )
>> >+    {
>> >+        dprintk(XENLOG_ERR, XSPLICE "%s: Wrong size of .xsplice.funcs!\n",
>> >+                elf->name);
>> >+        return -EINVAL;
>> >+    }
>> >+
>> >+    payload->funcs = sec->load_addr;
>> >+    payload->nfuncs = sec->sec->sh_size / sizeof(*payload->funcs);
>> 
>> Following to our discussion yesterday - can't we (ab)use the section merge
>> flag here to report the structure size, along the lines of what relocation
>> sections do for their elements?
> 
> 
> In other words - the xsplice-tools.git and the test-cases (in
> arch/x86/xen/test) would modify the sec->sh_entsize to have the
> sizeof(xsplice_patch_func) aka 64 (0x40) ?
> 
> [Note this could also extend to .xsplice.hooks.load and
> .xsplice.hooks.unload]
> 
> The xsplice-tools.git could surely do it, but the built-in test-cases -
> not so much. I would need to do some in-place binary handrolling - unless you
> know of some tool or some __section modifiers?

Well, that's why I suggest (ab) using the SHF_MERGE flag, i.e. to
see whether we can make gas do what we want. Fiddling with the
binary I would not recommend, i.e. if we can't get gas to do what
we want we should rather stay with what there is.

Jan


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