• R
    vmcore: append device dumps to vmcore as elf notes · 7efe48df
    Rahul Lakkireddy 提交于
    Update read and mmap logic to append device dumps as additional notes
    before the other elf notes. We add device dumps before other elf notes
    because the other elf notes may not fill the elf notes buffer
    completely and we will end up with zero-filled data between the elf
    notes and the device dumps. Tools will then try to decode this
    zero-filled data as valid notes and we don't want that. Hence, adding
    device dumps before the other elf notes ensure that zero-filled data
    can be avoided. This also ensures that the device dumps and the
    other elf notes can be properly mmaped at page aligned address.
    
    Incorporate device dump size into the total vmcore size. Also update
    offsets for other program headers after the device dumps are added.
    
    Suggested-by: Eric Biederman <ebiederm@xmission.com>.
    Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
    Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    7efe48df
vmcore.c 39.4 KB