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

Re: [Xen-devel] [PATCH 1/2] xen/livepatch: Clean up arch relocation handling



>>> On 19.06.17 at 20:18, <konrad.wilk@xxxxxxxxxx> wrote:
> On Wed, Jun 14, 2017 at 07:28:39PM +0100, Andrew Cooper wrote:
>> Having said that, there is no sanity check that r->r_offset is within
>> base->load_addr + sec->sh_size in arm32, whereas both arm64 and x86
>> appear to do this check.
> 
> True.
> 
> And the tricky part (it was to me at least) was that ARM32 is all
> REL and not RELA so the opcode gets modified after the operation.
> 
> Which means it gets a bit complex to add a boundary check in
> 'get_addend' .
> 
> Hm, it would seem the best way is to add a
> 
> if ( r->r_offset >= base->sec->sh_size ||                               
>     (r->r_offset + sizeof(uint32_t)) > base->sec->sh_size )             

Where's the uint32_t coming from here?

Jan


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

 


Rackspace

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