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

Re: [Xen-devel] [PATCH v1 07/11] xsplice: Implement payload loading



>>> On 05.11.15 at 12:51, <ross.lagerwall@xxxxxxxxxx> wrote:
> On 11/05/2015 10:35 AM, Jan Beulich wrote:
>>>>> On 04.11.15 at 23:21, <konrad.wilk@xxxxxxxxxx> wrote:
>>>> +int xsplice_perform_rela(struct xsplice_elf *elf,
>>>> +                         struct xsplice_elf_sec *base,
>>>> +                         struct xsplice_elf_sec *rela)
>>>> +{
>>>> +    Elf64_Rela *r;
>>>> +    int symndx, i;
>>>
>>> unsigned int
>>>
>>>> +    uint64_t val;
>>>> +    uint8_t *dest;
>>>> +
>>>
>>> Can you double check that rela->sec-sh_entsize is not zero first?
>>
>> Perhaps not just not zero, but at least a certain minimum? Or even
>> equaling some sizeof()?
>>
> 
> Well it only makes sense if rela->sec-sh_entsize == sizeof(Elf64_Rela) 
> so that is what I shall check for.

The question whether to use == or >= really depends on whether
we expect (theoretical) additions to the structure to be backwards
compatible.

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