• Vasily Gorbik's avatar
    s390/ipl: correct kdump reipl block checksum calculation · 3b967847
    Vasily Gorbik authored
    s390 kdump reipl implementation relies on os_info kernel structure
    residing in old memory being dumped. os_info contains reipl block,
    which is used (if valid) by the kdump kernel for reipl parameters.
    
    The problem is that the reipl block and its checksum inside
    os_info is updated only when /sys/firmware/reipl/reipl_type is
    written. This sets an offset of a reipl block for "reipl_type" and
    re-calculates reipl block checksum. Any further alteration of values
    under /sys/firmware/reipl/{reipl_type}/ without subsequent write to
    /sys/firmware/reipl/reipl_type lead to incorrect os_info reipl block
    checksum. In such a case kdump kernel ignores it and reboots using
    default logic.
    
    To fix this, os_info reipl block update is moved right before kdump
    execution.
    Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    3b967847
machine_kexec.c 7.13 KB