[PATCH 0/2] Fix the regression issue in makedumpfile-1.5.3.

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

 



Hello,

I found a regression issue in v1.5.3.
If you have already faced this issue, this patchset will help you.
At least, this issue may happen on IA64. Actually, I faced it
in my environment.


- DESCRIPTION

If reading the separated page on different PT_LOAD segments,
we have to read the page data from both segments.
And read_pfn() was introduced for such cases as described as below.

    /*
     * This function is specific for reading page.
     *
     * If reading the separated page on different PT_LOAD segments,
     * this function gets the page data from both segments. This is
     * worthy of ia64 /proc/vmcore. In ia64 /proc/vmcore, region 5
     * segment is overlapping to region 7 segment. The following is
     * example (page_size is 16KBytes):
     *
     *  region |       paddr        |       memsz
     * --------+--------------------+--------------------
     *     5   | 0x0000000004000000 | 0x0000000000638ce0
     *     7   | 0x0000000004000000 | 0x0000000000db3000
     *
     * In the above example, the last page of region 5 is 0x4638000
     * and the segment does not contain complete data of this page.
     * Then this function gets the data of 0x4638000 - 0x4638ce0
     * from region 5, and gets the remaining data from region 7.
     */
    int
    read_pfn(unsigned long long pfn, unsigned char *buf)
    {

But read_pfn() hasn't worked as expected since the caching feature
was introduced. 

The current call stack can be broken into as follows:

  read_pfn()
    readmem()
      readpage_elf()
        read(2)

If the target of read_pfn() is separated page, readmem() is called
twice as for the former part and later part of the page.
But readpage_elf() always try to read a whole page and cache it
without consideration for separated page. As the result, readmem()
can get the same invalid data in both readmem().

This patchset fix this issue by moving the logic for separated page
from read_pfn() to readpaeg_elf().
And this patchset includes the cleanup of scrubbing feature,
comments for it are welcome too.

----
Atsushi Kumagai (2):
      Move scrubbing process from reader to writer.
      Fix the issue which can happen around overlapping segments.

 makedumpfile.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------
 1 file changed, 64 insertions(+), 67 deletions(-)


Thanks
Atsushi Kumagai



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux