[makedumpfile PATCH v2] Prevent data loss in last page of ELF core dumpfile
Atsushi Kumagai
ats-kumagai at wm.jp.nec.com
Thu Jul 6 00:40:39 PDT 2017
>> diff --git a/makedumpfile.c b/makedumpfile.c
>> index e69b6df..26296f1 100644
>> --- a/makedumpfile.c
>> +++ b/makedumpfile.c
>> @@ -5410,7 +5410,8 @@ create_1st_bitmap_file(void)
>> if (pfn_start > info->max_mapnr)
>> continue;
>> pfn_end = MIN(pfn_end, info->max_mapnr);
>> -
>> + /* Account for last page if it has less than page_size data in it */
>> + if (phys_end & (info->page_size-1)) ++pfn_end;
>
>Something is wrong with column alignment. Tabs instead of spaces?
>And "++pfn_end;" should be in new line.
>
>Daniel
I have no additional comments, thanks for your work.
BTW, I found the same issues in places where paddr_to_pfn() expects that
the end physical address is page-size aligned like get_max_mapnr(),
I'll fix that as well.
Thanks,
Atsushi Kumagai
More information about the kexec
mailing list