hugetlb_next_slice_start() and hugetlb_slice_end() don't take account of
addr aligned with hpage size, so if such a PT_LOAD segment is provided,
a following error appears
INFO: Segment 2's aligned memsz is too small: 0x485d4 < 0x
Signed-off-by: Lans Zhang
--- a/elflink.c
+++ b/e
[V2 PATCH] an alignment bug when both LD_PRELOAD and
HUGETLB_FORCE_ELFMAP are enabled
If program header's p_vaddr is aligned with hpage size, hugetlb_slice_end(vaddr)
returns vaddr-1, and thus such a error appears,
INFO: Segment 2's aligned memsz is too small: 0x485d4 < 0x
slice_
2011/1/8, Eric B Munson :
> On Fri, 07 Jan 2011, jia zhang wrote:
>
>> [V2 PATCH] an alignment bug when both LD_PRELOAD and
>> HUGETLB_FORCE_ELFMAP are enabled
>>
>> If program header's p_vaddr is aligned with hpage size,
>> hugetlb_slice_end(vaddr)