Re: [Xen-devel] [PATCH v1 1/3] xen/livepatch: Tighten alignment checks.

2017-07-11 Thread Jan Beulich
>>> Konrad Rzeszutek Wilk 07/11/17 6:53 PM >>> >--- a/xen/common/livepatch.c >+++ b/xen/common/livepatch.c >@@ -406,6 +406,15 @@ static int move_payload(struct payload *payload, struct >livepatch_elf *elf) >ASSERT(offset[i] != UINT_MAX); > >elf->sec[i].load_addr = buf +

[Xen-devel] [PATCH v1 1/3] xen/livepatch: Tighten alignment checks.

2017-07-11 Thread Konrad Rzeszutek Wilk
The ELF specification mentions nothing about the sh_size being modulo the sh_addralign. Only that sh_addr MUST be aligned on sh_addralign if sh_addralign is not zero or one. We on loading did not take this in-to account so this patch adds two checks: One on the ELF file itself as it is being parse